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

"Error: Authorization token not supplied.": Missing authHeader in calls to API (store.tsx)? #2277

Open
martin-gutwin opened this issue Feb 27, 2025 · 0 comments

Comments

@martin-gutwin
Copy link

Hello there,

we are using Kuberpult v2.21.1 with AzureAuth configured and have problems with certain features in the UI ("display version" and "show configuration of environment"). For both we get the error "Authorization token not supplied". And if I check the requests sent, the Authorization header is missing (even though I can see the Azure tokens in the Session Storage).

Now I know v2.21.1 is an ancient version, but even if I look at the current code here:

.GetEnvironmentConfig({ environment: environmentName })

and here:

I don't see that the API Calls have the authHeader attached as was done in this PR for getCommitInfo:

#1526

.GetCommitInfo({ commitHash: commitHash, pageNumber: pageNumber }, authHeader)

authHeader, ok := md["authorization"]
if !ok {
// this happens if the caller does not pass the "authHeader".
// correct example: api.overviewService().StreamOverview({}, authHeader)
return nil, status.Errorf(codes.Unauthenticated, "Authorization token not supplied")
}

Am I missing something or is there a problem here (even in the current version) ?

We will be migrating to a new Kuberpult version some time this year, thus it would be nice to know if this issue will be fixed at some point or if I have a misunderstanding of the code here and the issue is already fixed (or maybe it just has a completely different reason).

Thank you in advance for your help!

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

1 participant