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

fix: if one oidc verifier is failing, do not let the whole API fail #3769

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

kuannie1
Copy link
Contributor

@kuannie1 kuannie1 commented Jan 13, 2025

CCIE-3867
Summary Fix Happy API error
Type Task Task
Status To Do

Sometimes there's an OIDC configuration that doesn't work, but we shouldn't make the entire Happy API fail because of that. In this change, we spit out a warning and an additional warning if there's only one verifier.

https://czi.atlassian.net/browse/CCIE-3867

@kuannie1 kuannie1 requested a review from a team as a code owner January 13, 2025 18:16
@kuannie1 kuannie1 requested review from alldoami, jakeyheath and hspitzley-czi and removed request for a team and alldoami January 13, 2025 18:16
Copy link
Contributor

No Jira issue reference found in branch, title, or body of PR.

Please add a reference to a Jira issue in the form of CCIE-#### (eg: CCIE-1400) to the branch name, title, or body of your PR.

continue
}
verifiers = append(verifiers, verifier)
}
if len(verifiers) == 1 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fail if zero, and print the number of verifiers otherwise

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should we fail if zero if you initialize it with one already?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yea I guess that is fine. If none of the OIDC providers configure then no one can talk to it except for Github actions. I guess that is fine. Send it!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the == 1 part, but I added an Infof message to print the # of OIDC verifiers. Hopefully that works!

Copy link
Contributor

No Jira issue reference found in branch, title, or body of PR.

Please add a reference to a Jira issue in the form of CCIE-#### (eg: CCIE-1400) to the branch name, title, or body of your PR.

@kuannie1 kuannie1 merged commit 6f71d32 into main Jan 13, 2025
32 checks passed
@kuannie1 kuannie1 deleted the aku/skip-over-oidc-verifier-error-with-warning branch January 13, 2025 18:29
@czi-github-helper czi-github-helper bot mentioned this pull request Jan 13, 2025
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