Harden self-hosted installers: generate an embedded IdP session cookie key and restrict config.yaml permissions #7053
Optic00
started this conversation in
Ideas & Feature Requests
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before posting
Product area
Management service / API, Identity provider / SSO, Self-hosting / Deployment
Problem or use case
Fresh self-hosted installations created with the official community or enterprise bootstrap script leave
server.auth.sessionCookieEncryptionKeyunset.The embedded IdP supports a dedicated key for authenticated encryption of its session cookie, so generating one during setup would provide an additional defense-in-depth boundary by default.
The existing server-side nonce validation remains in place when the key is absent.
This proposal does not claim an account takeover, an MFA bypass, or a separate vulnerability.
The community installer also writes the secret-bearing
config.yamlthrough a normal shell redirection, while the enterprise installer already creates that file with mode0600before rendering its contents.Proposed solution
server.auth.sessionCookieEncryptionKeywithout reusing the management datastore key.config.yamlwith mode0600before writing its contents.Alternatives or workarounds considered
No response
Community impact and priority
Examples from other tools or products
No response
Security, privacy, and compatibility considerations
All management instances in an HA deployment need the same persisted key.
Changing or losing the key invalidates existing session cookies and requires users to sign in again.
The change does not protect an already stolen valid cookie and is not presented as an MFA bypass or account-takeover fix.
Implementation ideas
I have a focused local patch and installer regression tests covering decoded key length, separation from the datastore key, YAML placement, and file mode.
The patch remains unpushed pending validation of the scope.
Are you willing to help?
Yes, I can submit a PR if the approach is accepted.
Additional context
Would this be suitable for promotion to a validated Issue and contribution through the normal PR workflow?
All reactions