-
Notifications
You must be signed in to change notification settings - Fork 43
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
Enable additional identity providers for machine accounts (GitHub Actions enablement) #5385
Enable additional identity providers for machine accounts (GitHub Actions enablement) #5385
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the size of the diff! I tried not to make it too large, but also not to leave too many things half-way (unlike #4317, which explicitly did that)
// GetUserSubjectFromContext returns the user subject from the context, or nil | ||
func GetUserSubjectFromContext(ctx context.Context) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this because an ID token with a sub
but without the iss
context seems dangerous, so I'd prefer to have our code explicitly get auth.Identity
objects and reason about them.
(Fixed lint and hopefully test failures) |
#5386 may help with the "unit test" leg of PRs timing out. |
e9e12ce
to
452a379
Compare
e5b0115
to
d92257f
Compare
Summary
This cleans up #4317, and enables additional service account (machine identity) providers in
internal/auth
, starting with GitHub Actions. It's possible that this could be generalized to AWS, GCP, etc service accounts, but I wanted to start with a concrete example which enabled a number of other stories.Usage (from #4317):
make run-docker
and set up KeyCloak with GitHub authenticationminder auth login
as a human to create a projectngrok
for port-forwarding, and update minder config with forwarding values for GitHub webhooks (optional)minder project role grant -s githubactions/repo:evankanderson/actions-id-token-testing:ref:refs/heads/main -r admin
or the equivalent with your own repo.minder ruletype apply ...
: https://github.com/evankanderson/actions-id-token-testing/actions/runs/13045189954/job/36394499683Fixes #5145
Change Type
Mark the type of change your PR introduces:
Testing
Added unit tests for new modules, and tested manually.
Review Checklist: