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

Unauthorized action returns 404 error code instead of 401 #1166

Closed
tamaldatta91 opened this issue Jan 22, 2024 Discussed in #1165 · 1 comment
Closed

Unauthorized action returns 404 error code instead of 401 #1166

tamaldatta91 opened this issue Jan 22, 2024 Discussed in #1165 · 1 comment
Labels

Comments

@tamaldatta91
Copy link

Discussed in #1165

Originally posted by tamaldatta91 January 22, 2024
I am trying to authorize a request on git server on Location "/" (where my git app server is running) by keycloak. While sending a wrong token, its giving status code 404.
I tried to use OIDCUnAuthAction 401, but it's not working.
My Location directive:
<Location "/">
AuthType oauth20
Require claim "realm_access.roles:TestRole"
LogLevel debug

For example, if I run a git clone operation with expired token and repo is not available at the moment, the response gives me like below.
error code: HTTP/1.1 404 Not Found
Though I received a header like this
WWW-Authenticate: Bearer error="invalid_token", error_description="JWT token could not be validated"

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

No branches or pull requests

1 participant