-
Notifications
You must be signed in to change notification settings - Fork 403
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
More robust authentication #59
Comments
@itaysk thanks for the detailed set of requirements! @liamawhite @SlickNik do you have anything to add here? |
@technosophos @bacongobbler @mattfarina @jzelinskie
Lets align this with the Helm 3 repo proposals as they relate to auth |
Just adding a fly-by comment, but assuming that this is adding additional functionality and not removing (or amending) the existing client/repo auth model for Helm, this could be tackled in core during the Helm 2.0 timeline. It doesn't have to be punted down the line to Helm 3. :) Definitely agree that we should probably visit this proposal when we come to Helm 3 repo discussions. |
Like where your heads at! |
This is all great stuff -- thanks for kicking off the discussion @itaysk and @jdolitsky! I agree that following a similar model to docker/distribution makes sense in this regard. In addition to this, one thing that would be good to flesh out is the scheme and grammar for supported resource scopes. There is some good documentation about the scopes supported by the docker registry at https://github.com/docker/distribution/blob/master/docs/spec/auth/scope.md -- this would be a good starting point to have the discussion around what resource scopes we should support / enforce in ChartMuseum. |
Let's not forget OCI: the distribution protocol for OCI is in a proposal state. I haven't gone over it enough to know what it carves out around auth, but the closer we can map to that, the better. |
@jzelinskie yes, please link that here |
Here's the proposal: opencontainers/tob#35 |
Any progress on that feature? I'd really require it as I'm currently working with a requirements.yaml file in combination with basic auth for authentication against chart museum. This has the ugly side effect that in the requirements.lock file the basic auth credentials are visible in clear text and hence I can't (shouldn't) put this file under version control so I can't lock my dependencies 😔 |
I was giving this issues some more thoughts. I know this is not so much related to chart museum itself but it would be great if helm would provide a login mechanism similar to Azure or other big players.
This would allow the complete removal of any credentials or tokens from the URLs as the client keeps the access token and could include it into each request towards the repository. https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest |
@mattfarina ^^^ @subesokun you are definitely on the right track with this. If you have a solid proposal for how this should work in Helm 3, please open an new PR w/ proposal here: https://github.com/helm/community/tree/master/helm-v3 To solve your basic auth problem short term, I believe that since Helm 2.9, you can add a repo with the
|
@jdolitsky Thanks a lot for the hint! I've tested it and indeed the Regarding the Helm 3 proposals, sure I'll try to add my ideas there :) |
Has anyone considered just running oauth2_proxy as a sidecar to provide authentication? |
@joejulian I've considered this but to the time I've evaluated oauth2_proxy it didn't support passing in OAuth Bearer Tokens, I think this was the related issue bitly/oauth2_proxy#530. Furthermore the Helm client would need to be able to fetch such token (e.g. via a |
Hi all, this work is finally underway (thank you @zachpuck) The "latest" ChartMuseum image can now be configured with public key to verify JWT tokens. It does not yet inspect the claims to check for specific allowed actions etc. Please see this example repo of how this can be used today: https://github.com/chartmuseum/auth-server-example The way to configure ChartMuseum to use this new functionality is like so:
where |
Currently the Helm repo standard is to use anonymous HTTP or HTTP Basic authentication. This is a proposal to support a more robust authentication scheme with Chart Museum. Hopefully it will be embraced by Helm. If it won't, it still shouldn't affect Chart Museum's compliance with the Helm repo standard since this is an additional functionality on top of the standard functionality.
OAuth/JWT clarification:
OAuth2 is the common protocol for API authorization. It defines a set of scenarios (flows) that each describe how the client, server (resource server) and authorization server can work together to allow a client application to obtain an access token to some protected resources. The result of this auth dance is a token which the client can use for accessing the resources. The most common type of token is JWT, which is basically a signed JSON document with an agreed upon schema. When a user gets hold of a valid JWT (by following OAuth2, or by any other means), they will present it to the server which will validate the token, after which point the request is authenticated, and may proceed to making authorization decisions which are out of scope for now.
Chart Museum is a server that hosts charts. In OAuth2 lingo it is a resource server which rely on some other party to issue tokens. If we look at Docker Registry for reference, it seem to take similar approach of promoting OAuth2, but the open registry implementation (distribution) does not implement the entire flow (at least not as part of core), it expects the token to be issued by another component.
Taking this approach has the following benefits:
To implement this, Chart Museum needs to accept JWT token:
References:
The text was updated successfully, but these errors were encountered: