125 lines
2.9 KiB
JSON
125 lines
2.9 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"
|
|
],
|
|
"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": "array",
|
|
"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.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:web}"
|
|
}
|
|
},
|
|
{
|
|
"name": "files",
|
|
"kind": "archive",
|
|
"from": "files"
|
|
}
|
|
]
|
|
}
|
|
}
|