Skip to content

feat(stackit): SSO settings for the deploy/stackit module - #320

Merged
iheitlager merged 2 commits into
mainfrom
feat/stackit-sso
Nov 14, 2026
Merged

iheitlager merged 2 commits into
mainfrom
feat/stackit-sso

Conversation

@iheitlager

Copy link
Copy Markdown
Member

Summary

  • deploy/stackit takes the SSO settings of ADR-020: sso_issuer, sso_client_id, sso_client_secret (sensitive) and sso_organisation, all four or none.
  • The client secret reaches FRANK as a mounted file (FRANK_SSO_CLIENT_SECRET_FILE), never as an environment variable; the redirect URL is built from domain.
  • For the Okta setup of test-frank#2 (Labs/deployments/test-frank on GitLab), on stackit.frank.lab271.dev.

Changes

Added

  • variables.tf: the four sso_* variables, default empty.
  • main.tf: a precondition on the server that refuses a partial set; the values passed to cloud-init.
  • cloud-init.yaml.tftpl, only when sso_issuer is set:
    • /etc/frank/sso.env with FRANK_SSO_ISSUER, _CLIENT_ID, _CLIENT_SECRET_FILE, _REDIRECT_URL (https://<domain>/v1/sso/callback) and _ORGANISATION;
    • /etc/frank/sso-client-secret, 0600, chowned to 65532, written with jsonencode so any character survives the YAML;
    • mounted read-only at /run/secrets/frank-sso-client-secret, plus --env-file /etc/frank/sso.env.
  • README: the options, and that the organisation must exist before SSO is turned on.

Unset, the rendered user data is unchanged apart from one chown line guarded by [ -f … ].

Changelog

  • STACKIT: SSO settings for the module (sso_issuer, sso_client_id, sso_client_secret, sso_organisation), all four or none; the client secret reaches FRANK as a mounted file (ADR-020, test-frank#2).

Testing

  • tofu fmt -check, tofu validate
  • Template rendered with SSO on and off (tofu console); both parse as YAML; a secret with ", : and # comes through unchanged
  • Applied on STACKIT from test-frank with the Okta app (test-frank#2), after this is released

🤖 Generated with Claude Code

iheitlager and others added 2 commits November 14, 2026 18:06
sso_issuer, sso_client_id, sso_client_secret and sso_organisation, all
four or none (a precondition on the server refuses a partial set). With
them, cloud-init writes /etc/frank/sso.env (the FRANK_SSO_* settings,
redirect URL https://<domain>/v1/sso/callback) and the client secret to
/etc/frank/sso-client-secret (0600, uid 65532), mounted read-only into
the container as FRANK_SSO_CLIENT_SECRET_FILE: never an environment
variable. Unset, the user data is as before.

For test-frank#2 (Okta on stackit.frank.lab271.dev).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iheitlager
iheitlager merged commit 033b66a into main Nov 14, 2026
6 checks passed
@iheitlager
iheitlager deleted the feat/stackit-sso branch November 14, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant