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

Issue and refresh downstream ID tokens derived from a GitHub IDP #1963

Merged
merged 25 commits into from
May 30, 2024

Conversation

joshuatcasey
Copy link
Member

@joshuatcasey joshuatcasey commented May 20, 2024

The Supervisor will now issue downstream tokens when logging in with GitHub as an identity provider. Will check the user's organization and team membership and ensure that the user meets the login policy specified on the GitHub IDP CR.

Refreshing a GitHub-derived identity is virtually identical to logging in, so that was implemented as well.

Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 82.74510% with 88 lines in your changes are missing coverage. Please review.

Project coverage is 30.57%. Comparing base (80c7022) to head (02ffff0).
Report is 3 commits behind head on github_identity_provider.

Files Patch % Lines
test/testlib/browsertest/browsertest.go 0.00% 55 Missing ⚠️
test/testlib/env.go 0.00% 11 Missing ⚠️
...ternal/testutil/oidctestutil/testgithubprovider.go 86.88% 6 Missing and 2 partials ⚠️
internal/githubclient/githubclient.go 95.80% 4 Missing and 2 partials ⚠️
test/testlib/skip.go 0.00% 6 Missing ⚠️
internal/testutil/testidplister/testidplister.go 95.55% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           github_identity_provider    #1963      +/-   ##
============================================================
+ Coverage                     30.14%   30.57%   +0.43%     
============================================================
  Files                           358      362       +4     
  Lines                         59869    60335     +466     
============================================================
+ Hits                          18046    18448     +402     
- Misses                        41293    41353      +60     
- Partials                        530      534       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joshuatcasey joshuatcasey force-pushed the github-issues-downstream-tokens branch 3 times, most recently from cd5591d to 1289fa8 Compare May 22, 2024 14:47
joshuatcasey and others added 15 commits May 22, 2024 21:21
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Also:
- fix github teams query: fix bug and sort/unique the results
- add IDP display name to github downstream subject
- fix error types returned by LoginFromCallback
- add trace logs to github API results
- update e2e test
- implement placeholder version of refresh for github
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
@joshuatcasey joshuatcasey force-pushed the github-issues-downstream-tokens branch from ac6d56f to bb1737d Compare May 23, 2024 02:21
@joshuatcasey joshuatcasey marked this pull request as ready for review May 23, 2024 02:48
@joshuatcasey joshuatcasey changed the title [DRAFT] GitHub issues downstream tokens GitHub issues downstream tokens May 23, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2024

Codecov Report

Attention: Patch coverage is 82.72425% with 104 lines in your changes are missing coverage. Please review.

Project coverage is 30.60%. Comparing base (80c7022) to head (6327f51).
Report is 3 commits behind head on github_identity_provider.

Files Patch % Lines
test/testlib/browsertest/browsertest.go 0.00% 55 Missing ⚠️
test/testlib/skip.go 0.00% 15 Missing ⚠️
test/testlib/env.go 0.00% 14 Missing ⚠️
...ternal/testutil/oidctestutil/testgithubprovider.go 87.50% 6 Missing and 2 partials ⚠️
internal/githubclient/githubclient.go 95.80% 4 Missing and 2 partials ⚠️
...util/oidctestutil/expected_upstream_state_param.go 60.00% 2 Missing ⚠️
internal/testutil/testidplister/testidplister.go 98.01% 1 Missing and 1 partial ⚠️
internal/testutil/oidctestutil/testldapprovider.go 87.50% 1 Missing ⚠️
internal/testutil/oidctestutil/testoidcprovider.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           github_identity_provider    #1963      +/-   ##
============================================================
+ Coverage                     30.14%   30.60%   +0.46%     
============================================================
  Files                           358      362       +4     
  Lines                         59869    60383     +514     
============================================================
+ Hits                          18046    18481     +435     
- Misses                        41293    41368      +75     
- Partials                        530      534       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joshuatcasey joshuatcasey changed the title GitHub issues downstream tokens Issue and refresh downstream ID tokens derived from a GitHub IDP May 28, 2024
@joshuatcasey joshuatcasey merged commit 037fa65 into github_identity_provider May 30, 2024
38 checks passed
@joshuatcasey joshuatcasey deleted the github-issues-downstream-tokens branch May 30, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants