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

Add support for Basic Authentication to proxyingRegistry #4263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliver-goetz
Copy link

@oliver-goetz oliver-goetz commented Jan 19, 2024

This PR adds support for Basic Authentication to registry proxy.
Before it supported Bearer tokens only. However, basic auth was already almost implemented as there was already an appropriate AuthenticationHandler used to obtain Bearer tokens.

Fixes #3153

@github-actions github-actions bot added the area/proxy Related to registry as a pull-through cache label Jan 19, 2024
@oliver-goetz
Copy link
Author

Could someone help me finding out why these CodeQL are triggered? I don't see it.

@oliver-goetz oliver-goetz force-pushed the enh/support-basic-auth branch 2 times, most recently from a680eee to 800a567 Compare February 5, 2024 15:52
@Jamstah
Copy link
Collaborator

Jamstah commented Feb 5, 2024

Looking at the codeql, you haven't introduced any new issues, the issue already exists in the repo. Because you're editing the code where the issue exists, codeql is flagging this pr.

Is there a reason you're renaming the struct? You might get away with it if you don't :)

@oliver-goetz
Copy link
Author

Looking at the codeql, you haven't introduced any new issues, the issue already exists in the repo. Because you're editing the code where the issue exists, codeql is flagging this pr.

Is there a reason you're renaming the struct? You might get away with it if you don't :)

Good idea, let's see if it helps 😅

@oliver-goetz
Copy link
Author

oliver-goetz commented Feb 6, 2024

It is working, crazy 😄
The Github App just shows the wrong status 😞 It is not tested yet.

Signed-off-by: oliver-goetz <o.goetz@sap.com>
@ialidzhikov
Copy link
Contributor

The Github App just shows the wrong status 😞 It is not tested yet.

@milosgajdos can you help retesting the above failing check?

Can you also help reviewing this PR? Thanks in advance!

@milosgajdos
Copy link
Member

Yeah, I've no idea if these are legit or false positives. These warnings are about logging sensitive data -- I think we "hydrate" context with all kinds of garbage in this project, so I'd have to spend some time and trace/investigate these, but I'm short of time nowadays, so you'll have to wait unless one of 10+ other maintainers have more time

@Jamstah
Copy link
Collaborator

Jamstah commented May 1, 2024

My guess here is that the app struct embeds the context instead of using it as a field, so the context/app are mingled. As app contains sensitive data, CodeQL assumes the context does too.

Having a look at breaking it into a field to see if it cleans up the codeql errors.

Edit: Nope, not that.

@milosgajdos milosgajdos added this to the Registry/3.0.0 milestone May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy Related to registry as a pull-through cache
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pull through proxy does not support basic auth
4 participants