Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove user identity validation from ReadFromEnv #144

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jkroepke
Copy link

external data sources depends on ReadFromEnv.

If and admin has enabled user identity, but didn't define a token_url, it would result into an error. It does matter if the data source supports user identity or not.

Bulit-in datasources doesn't have that issue, since they use ReadFromContext and doesn't have that restrictions.

if v := cfg.Get(UserIdentityClientID); v != "" {
settings.UserIdentityTokenEndpoint.ClientId = v
}
if v := cfg.Get(UserIdentityClientSecret); v != "" {
settings.UserIdentityTokenEndpoint.ClientSecret = v
}
if v := cfg.Get(UserIdentityTokenURL); v != "" {
settings.UserIdentityTokenEndpoint.TokenUrl = v
}
if v := cfg.Get(UserIdentityAssertion); v == "username" {
settings.UserIdentityTokenEndpoint.UsernameAssertion = true
}
if v := cfg.Get(UserIdentityFallbackCredentialsEnabled); v == strconv.FormatBool(false) {
settings.UserIdentityFallbackCredentialsEnabled = false
}

@jkroepke jkroepke requested a review from a team as a code owner May 20, 2024 14:32
@CLAassistant
Copy link

CLAassistant commented May 20, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

fix build error
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.

None yet

2 participants