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

The bearer token authentication policy should reject URLs that are not HTTPS. #21674

Closed
ahsonkhan opened this issue Oct 2, 2023 · 0 comments · Fixed by #21673
Closed

The bearer token authentication policy should reject URLs that are not HTTPS. #21674

ahsonkhan opened this issue Oct 2, 2023 · 0 comments · Fixed by #21673
Assignees

Comments

@ahsonkhan
Copy link
Contributor

Similar to C++, .NET, and other language SDKs, consider adding validation that the scheme of the request URL within the bearer token authentication policy is HTTPS. Otherwise, fail.

func (b *BearerTokenPolicy) Do(req *policy.Request) (*http.Response, error) {

For example, see these:
https://github.com/Azure/azure-sdk-for-cpp/blob/35e42b99cfcc5b2797aa278a39694030732da2bc/sdk/core/azure-core/src/http/bearer_token_authentication_policy.cpp#L24-L28
https://github.com/Azure/azure-sdk-for-net/blob/e902ef5a2ed5db3d6104ccb2db29b97a02258634/sdk/core/Azure.Core/src/Pipeline/BearerTokenAuthenticationPolicy.cs#L115-L118

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants