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

OIDC macaroon minting for GitHub #11272

Merged
merged 112 commits into from
Nov 15, 2022
Merged

Conversation

woodruffw
Copy link
Member

@woodruffw woodruffw commented Apr 27, 2022

This adds an API route for converting a JWT into a temporary API token.

Very WIP.

TODO:

  • Actually create the macaroon
  • Local testing
  • Fill in test coverage
  • Feature gate with the other OIDC functionality

Needs #11218.

Closes #10970.

@woodruffw woodruffw requested review from di and ewdurbin May 11, 2022 19:30
@woodruffw
Copy link
Member Author

woodruffw commented May 11, 2022

This is ready for an initial review. I'll leave some comments flagging some things in particular.

Signed-off-by: William Woodruff <william@trailofbits.com>
@di
Copy link
Member

di commented Nov 2, 2022

Is including a link to/ID for the specific run practical? That'd give a greater degree of auditability.

Yeah, would be good to include this with the publishing event/journal, and we can figure out how to externalize it in a followup PR.

We can eventually use this to put more information in the token
creation event, for nicer renderings.

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw
Copy link
Member Author

Yeah, would be good to include this with the publishing event/journal, and we can figure out how to externalize it in a followup PR.

Did this with 8e3d5b1 -- nothing is exposed yet, but we now have access to the claims set that the verified JWT contained.

Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
warehouse/oidc/views.py Outdated Show resolved Hide resolved
Tests not updated, yet.

Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw woodruffw requested a review from di November 7, 2022 19:31
@woodruffw
Copy link
Member Author

This should be up-to-date and ready to go again.

Signed-off-by: William Woodruff <william@trailofbits.com>
Copy link
Member

@di di left a comment

Choose a reason for hiding this comment

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

LGTM. Can you bring this up to date so we can merge? I don't have the ability to do so.

@woodruffw
Copy link
Member Author

LGTM. Can you bring this up to date so we can merge? I don't have the ability to do so.

Done. I also need to rebase the migration, one moment...

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw
Copy link
Member Author

Okay, should be good to go.

@di di merged commit 4841c5b into pypi:main Nov 15, 2022
@woodruffw woodruffw deleted the tob-oidc-macaroon-minting branch November 15, 2022 18:51
@woodruffw
Copy link
Member Author

🎉

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.

Routes and endpoints for JWT consumption
4 participants