Repository navigation
feat(kellnr): add security hardening settings and non-root support - #104
Merged
Merged
Conversation
Add values for login throttling, docs build timeout and wrapper, the cookie Secure flag and webhook private target blocking. Grant CHOWN, SETUID and SETGID so newer Kellnr images can switch to the unprivileged kellnr user, and mount the doc builder cargo config for the old and new CARGO_HOME.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds chart support for the security hardening in kellnr/kellnr#1445. Chart version 6.3.0.
Changes
kellnr.registry.authMaxFailedAttempts,kellnr.registry.authFailedAttemptsWindowSeconds(login throttling)kellnr.docs.buildTimeoutSeconds,kellnr.docs.buildWrapper(rustdoc build limits and sandbox wrapper)kellnr.origin.cookieSecure(force theSecurecookie flag behind a TLS-terminating ingress)kellnr.webhooks.blockPrivateTargetssecurityContextkeepsdrop: [ALL]but addsCHOWN,SETUIDandSETGID. Newer Kellnr images start as root to install imported certificates and take over volumes written by older images, then switch to thekellnruser (uid 1000). Without these capabilities Kellnr keeps running as root and logs a warning./usr/local/cargo) and the new (/home/kellnr/.cargo)CARGO_HOME, so the chart works with Kellnr 6.10.0 and newer images.runAsUser/fsGroup1000).kellnr.origin.cookieSecure. New CI values fileci/security-settings-values.yaml.Notes
fsGroupdoes not apply tohostPathPVs (pv.enabled), which is why root plus minimal capabilities stays the default.Testing
helm lintwith default values and all CI values files.helm template: no new env vars with defaults, all new env vars with the security values file, both cargo config mounts withdocBuilder.enabled, and the schema rejects a non-booleancookieSecure./etc/ssl/certsand an imported CA, plus all capabilities dropped and--user 1000:1000.