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

Capability to set auth header while package download #196

Open
phanidevavarapu opened this issue Aug 29, 2023 · 4 comments
Open

Capability to set auth header while package download #196

phanidevavarapu opened this issue Aug 29, 2023 · 4 comments

Comments

@phanidevavarapu
Copy link
Contributor

phanidevavarapu commented Aug 29, 2023

I have this use case where packages GET is behind the Basic auth.
Can you please check and suggest a way to pass the basic auth info in the header during the call?
https://github.com/open-telemetry/opamp-go/blob/main/client/internal/packagessyncer.go#L261

@tigrannajaryan
Copy link
Member

I think this requires adding the auth headers to be used to the DownloadableFile message: https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#downloadablefile-message

@tpaschalis
Copy link
Member

So do we think this discussion should be moved to the spec first then?

Just for posterity, there is the possibility of using a userinfo to pass in auth (like http://username:password@example.com/) but I'm not sure if it's a good idea; for example a newer HTTP Semantic RFC9110 advocates for its deprecation.

@tigrannajaryan
Copy link
Member

So do we think this discussion should be moved to the spec first then?

Yes. It needs to be a spec change to DownloadableFile message.

Just for posterity, there is the possibility of using a userinfo to pass in auth (like http://username:password@example.com/) but I'm not sure if it's a good idea; for example a newer HTTP Semantic RFC9110 advocates for its deprecation.

I think it is worth discussing, I am not entirely sure what's the best way. We may want to support other auth schemes, not just "Basic" auth. One possible approach is to allow specifying an arbitrary set of Headers that the downloader should include in the GET request. This covers the "Basic" auth by supplying "Authorization: Basic " and also the simple cases of vendor-specific tokens in headers.

@tpaschalis
Copy link
Member

tpaschalis commented Jun 27, 2024

Yeah, agreed. I'll move the discussion over to the spec repo as a new issue, it's gonna be my first one there.

Thanks! 🙏

Edit: opened open-telemetry/opamp-spec#194

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

No branches or pull requests

3 participants