Skip to content

feat(auth): makes SSO portable via env variables#15

Merged
koalalorenzo merged 8 commits into
mainfrom
refactor-lego-sso-setup
Apr 7, 2026
Merged

feat(auth): makes SSO portable via env variables#15
koalalorenzo merged 8 commits into
mainfrom
refactor-lego-sso-setup

Conversation

@koalalorenzo
Copy link
Copy Markdown
Member

@koalalorenzo koalalorenzo commented Apr 7, 2026

Oh new thing from the fabulab:

  • Creates a new /api/env to provide BUN_PUBLIC_* env (I struggled to get them done in bun :( )
  • Allows to customize OIDC credentials using BUN_PUBLIC_OIDC_* variables
  • Disable SSO/OIDC when BUN_PUBLIC_OIDC_* variables are not provided
  • Does not run queryPrometheus when the user is not authenticated (there was an error constantly)
  • ?
  • Profit!

BTW, I am not a huge fan of /api/env as it could expose values. I have set it up this way, as these env are NOT secrets, but we want to allow people to customize and provide different prometheus endpoints, OIDC config, based on their needs, rather than hard coding the values.

Note: This forces us to run the server with the frontend, those cannot be decoupled because of /api/web 😅

Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
… it will hide it

Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
@koalalorenzo koalalorenzo self-assigned this Apr 7, 2026
@koalalorenzo koalalorenzo requested a review from PaulFarver as a code owner April 7, 2026 12:29
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Signed-off-by: Lorenzo Setale <lorenzo.setale@LEGO.com>
@koalalorenzo koalalorenzo merged commit b388a53 into main Apr 7, 2026
6 checks passed
@koalalorenzo koalalorenzo deleted the refactor-lego-sso-setup branch April 7, 2026 12:36
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.

2 participants