-
Notifications
You must be signed in to change notification settings - Fork 987
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
Update Warehouse's models to accomodate OIDC verification #10617
Comments
Open questions about the data model:
TL;DR of the above: if we make the |
Agreed. Not just multiple projects per repo, but that a single workflow in a single repo might publish multiple discrete projects. Considering that it might someday be useful to determine the inverse of the relationship ("which projects correspond to repo X?") I think this could be a separate
We should be able to distinguish based on the artifact being uploaded (filename, metadata), no? Overall, we should think about this in a generic way and not a GitHub-specific way, e.g. as a relationship between a project and a source repository with a "type" of GitHub, which is the default type for now. |
Sounds good! Just to clarify: are you thinking that
Oh, that's a good point -- I forgot that package distributions have well-structured filenames 😅 That does indeed solve the problem without needing the |
The latter, and I think So maybe this is a {
"iss": "https://token.actions.githubusercontent.com",
"sub": "repo:octo-org/octo-repo:environment:prod",
"additonal_claims": {
"whatever": "whatever"
...
}
} Since per https://openid.net/specs/openid-connect-core-1_0.html
|
Also... this is probably actually a many:many relationship. I can't see a reason why a project would be limited to a single delegated publisher. However, in practice, I imagine most users will only want a single publisher, so we can stick to 1 publisher per project for now, but keep in mind that we might make it many:many in the future. |
#10645 (comment) gave us a clearer picture of what claims we want for the GitHub case. What that in mind, here's the data/relationship model I have in mind:
As a result, this might not be the best terminology or the best way to store the "claims." Another option is to store them as a |
Also N.B.: We might not want to store the |
Similar to #10617 (comment): we'll want to verify the |
I think I agree. What we really want is something that can store the necessary key/value details, and that for each claim to be verified, can generate a string from them. A very rough sketch:
|
Follow on: #11096. |
Original thought: Warehouse's
User
model, at minimum, will probably need one or more new columns (possibly relations) for each supported provider.Upon conversation with @di: we don't actually need the AuthN step, so we can probably get away without any changes to the
User
model. Instead, each project model will need a GitHub repository URL and workflow name to check incoming JWTs against.The text was updated successfully, but these errors were encountered: