Add declarative OIDC#1056
Open
aliktb wants to merge 3 commits into
Open
Conversation
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.
Intro
This is an attempt to address #1026
Important
Disclaimer: This code or text was assisted by an AI tool; please review for correctness, security, and style before merging.
I have made this change on a fork and is being used in my Kubernetes homelab environment. Feel free to disregard this change/use it for inspiration for a better PR. I am simply submitting this as a suggestion. I am not precious about having this change merged in upstream. But think it may be helpful for the community to have this functionality in the app
Problem
Currently, OIDC is configured in the UI manually. This is slightly challenging in gitops setups (e.g. ArgoCD/FluxCD) where config is required to be declarative (or Docker Compose etc). The current process of manually setting the values is time-consuming and not reproducible. Backups of the SQLite volume could be made. But this does not not address bootstrapping the app. Nor does it solve the problem of keeping the OIDC client information synchronised with the provider e.g. if the client is managed in gitops, it would be nice to be able to reference the same client information for both the OIDC provider as well as the client applications i.e. 1 source of truth
Fix
Introduce a set of optional env vars to allow the OIDC properties to be set declaratively. Not setting the env vars will allow the values to be set manually in the UI as before. But setting the env vars allows for an easy way to configure the app from scratch (provided the OIDC config values are known)
Testing
Setting the OIDC env vars will configure the OIDc config on the app. This has been smoke-tested in my homelab. Not setting the env vars will have the app function as normal