Platform · security
Secrets stay on the platform side.
A secret is not a string in a manifest. It is a write-only value sealed at rest, resolved server-side for one authorized operation and never returned to the app or the frontend bundle.
The boundary
- Secret values are stored per installation and key, bound to an associated encryption context.
- The app can set a secret and learn that it is configured; it cannot read the plaintext back.
- The renderer, platform snapshot, logs and app asset tree never contain the plaintext.
- A ciphertext moved to another key or installation fails authentication.
Encryption at rest
On a host with a TPM, the field cipher is sealed by the TPM. Development and TPM-less hosts use a random 32-byte key in the state directory with owner-only permissions. The key never enters SQLite, logs or a browser bundle.
manifest setting: type "secret"
↓
platform validates and seals the value
↓
storage: app_setting(installation_id, key)
↓
runtime request: decrypt server-side
↓
attach to the authorized operation
↓
return the result, never the secret
Secret settings
"settings": [
{ "key": "ha.url", "title": "Home Assistant address", "type": "text" },
{ "key": "ha.token", "title": "Access token", "type": "secret", "required": true }
]
A secret must not declare options. An empty secret clears the stored value. A required value must be present after a write, otherwise the request is denied.
| Limit | Value |
|---|---|
| Settings per manifest | 64 |
| Plain value size | 64 KiB |
| Secret value size | 16 KiB |
| Settings per write | 64 |
| Required values | Must be present after the write |
GET /api/v1/shell/apps/com.example.notes/settings?installationId=0199…
Cookie: __Host-rumahl_session=…
HTTP/1.1 200 OK
Content-Type: application/json
{
"settingsVersion": 1,
"id": "com.example.notes",
"installationId": "0199…",
"manifest": [
{ "key": "ha.url", "title": "Home Assistant address", "type": "text", "required": false },
{ "key": "ha.token", "title": "Access token", "type": "secret", "required": true }
],
"values": { "ha.url": "http://homeassistant.local:8123" },
"secrets": ["ha.token"]
}
PUT /api/v1/shell/apps/com.example.notes/settings?installationId=0199…
Origin: https://localhost:8443
Content-Type: application/json
{ "values": { "ha.token": "new-token" } }
Rotation and removal
- Replace a secret by writing a new value; the old ciphertext is overwritten.
- Clear an optional secret by writing an empty value; a required secret cannot be cleared without replacing it.
- Uninstall removes every setting value for that installation.
- An update keeps settings because the installation identity is stable.
- A reinstall is a new installation and does not inherit the old secrets.
- Rotate the publisher key separately from app secrets; a signing key is not a runtime setting.
Runtime delivery
The platform delivers a secret only to an operation that passes the live account, installation and grant checks. For a brokered network request, the platform attaches the configured secret server-side; the app receives the response, not the credential.
| Rule | Reason |
|---|---|
| No secret in manifest | The manifest is public package metadata |
| No secret in app assets | Published web assets are readable |
| No secret in logs or audit body | A log is a second disclosure surface |
| No plaintext over the bridge | The app frame is an untrusted guest |
| No re-use across installations | Associated context binds the ciphertext to one identity |
Storage boundary
The state volume is private to the platform. App data, databases and secrets are addressed through platform resources, not host paths. Uninstall removes runtime access and retained database bindings; physical purge is a separate policy.
Next
- App lifecycle and data — the journal around secrets.
- Identity and OIDC — the account boundary.
- Testing and release — denial and restart checks.
Was this page helpful?