ADR 0515 §1, §5: / greets the operator with what the mail signal told today and when they last looked, then shows today, this week, later, the promises by kind, good to know, read later, handled today and the scam warnings, from mail-reading.list; it records the page opened. The classical list moves to /all, as All mail.
137 lines
3.3 KiB
JSON
137 lines
3.3 KiB
JSON
{
|
|
"module": "mesh-mail-web",
|
|
"version": "1",
|
|
"slug": "mail-web",
|
|
"runs-as": "mesh-mail-web",
|
|
"claims": [
|
|
{
|
|
"name": "mail-webclient",
|
|
"scope": "mesh",
|
|
"serves": ["open", "status"]
|
|
}
|
|
],
|
|
"invokes": [
|
|
"seat:mail-store.accounts",
|
|
"seat:mail-store.search",
|
|
"seat:mail-store.read",
|
|
"seat:mail-store.send",
|
|
"seat:mail-store.send-status",
|
|
"seat:mail-reading.entries",
|
|
"seat:mail-reading.groups",
|
|
"seat:mail-reading.status",
|
|
"seat:mail-reading.correct",
|
|
"seat:mail-reading.lessons",
|
|
"seat:mail-reading.undo",
|
|
"seat:mail-reading.list",
|
|
"seat:mail-reading.handle",
|
|
"seat:mail-reading.unhandle",
|
|
"seat:mail-reading.remind",
|
|
"seat:mail-reading.record"
|
|
],
|
|
"reads": ["mesh-mail.accounts"],
|
|
"requires": ["route", "oidc-client"],
|
|
"contributes": {
|
|
"route": {
|
|
"label": "mail",
|
|
"endpoint": "web"
|
|
},
|
|
"oidc-client": {
|
|
"label": "mail",
|
|
"endpoint": "web",
|
|
"callback": "/signed-in"
|
|
}
|
|
},
|
|
"binds": {
|
|
"route": "${dir:state}/route.json",
|
|
"oidc-client": "${dir:state}/oidc-bound.json"
|
|
},
|
|
"secrets": {
|
|
"oidc-client": "${dir:state}/oidc-bound.secret"
|
|
},
|
|
"listens": [
|
|
{
|
|
"name": "web",
|
|
"port": 8099,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the mail web client's pages, over http; only the route proxy reaches it, and the operator's own browser through the internal name (novox/hq ADR 0440 §2) — its public name, if any, is a route grant"
|
|
}
|
|
],
|
|
"config": {
|
|
"operators": {
|
|
"type": "list",
|
|
"description": "The Keycloak identities (the ID token's preferred_username) let to sign in; nobody by default (novox/hq ADR 0440 §3).",
|
|
"trusted": true,
|
|
"default": []
|
|
}
|
|
},
|
|
"tools": [
|
|
"mail-webclient.open",
|
|
"mail-webclient.status",
|
|
"mail_web_health"
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:state}/broker"
|
|
},
|
|
"secrets-owner": "mesh-mail-web",
|
|
"resources": [
|
|
{
|
|
"id": "account",
|
|
"type": "user",
|
|
"name": "mesh-mail-web",
|
|
"shell": "/usr/bin/nologin",
|
|
"home": "/var/lib/mesh-mail-web"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-mail-web",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "operators",
|
|
"trusted": true,
|
|
"type": "file",
|
|
"path": "${dir:state}/operators.json",
|
|
"mode": "0600",
|
|
"owner": "mesh-mail-web",
|
|
"merge": "json",
|
|
"template": "files/operators.json",
|
|
"takes-config": ["operators"]
|
|
},
|
|
{
|
|
"id": "oidc-config",
|
|
"type": "file",
|
|
"path": "${dir:state}/oidc.json",
|
|
"mode": "0600",
|
|
"owner": "mesh-mail-web",
|
|
"template": "files/oidc.json"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-mail-web",
|
|
"binary": "mesh-mail-web",
|
|
"loads": ["mesh-mail-web"],
|
|
"env": {
|
|
"MESH_MAIL_WEB_OPERATORS": "${dir:state}/operators.json",
|
|
"MESH_MAIL_WEB_OIDC": "${dir:state}/oidc.json",
|
|
"MESH_MAIL_WEB_LISTEN": "${port:8099}"
|
|
}
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
}
|
|
}
|