-
Notifications
You must be signed in to change notification settings - Fork 186
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
HTTP Authentication and Authorization Failure always sending 401 Challenge #638
Comments
I think it's the same debate as Naming wise, I would change |
@dblock thank you very much for the feedback. I require the basic security filter provider to be enabled and handle a request. I only don't want the challenge if authorization fails. This first request to my servlet includes an Authorization: Basic bae64creds and if this fails i dont want the challenge sent because the browser because chrome handles the challenge which causes the pop up box. the speech says. I'll update my working example, thats in test, to send the challenge if there was no authorization header. I change my current deployment in Test to use sendChallengeOnFailedAuthorization this will have a default of true and leave the basic security filter provider sending the challenge if there is not Authorization header. The spec says that the vendor MAY send a challenge if authorization fails, the parameter is to make sure that current deployments work as expected. That the first request can include the authorization header and the vendor's implementation. Another approach to address my issue of the browser pop might be to have a Custom Authorzation Scheme and a new Provider |
For enabled I opened #639 so we don't lose it. Maybe someone wants to contribute! |
I send the Authorization Header; I do not want to disable any filters Please see this diagram RFC7617 at MDN where rfc7617 obsoletes 2617 which is the current implementation of BasicSecurityFilterProvider
extract from RFC7617Upon receipt of a request for a URI within the protection space that For instance:
@dblock and @hazendaz - should I close and create a new issue or change this issue's title? |
I see. You should change this issue's title and update to what you really want. I was confused because |
@dblock thanks for challenging my options and helping me find the cause of my issue; I'll update the title and the desciption |
HTTP Authentication Failures are always always returning a challenge.
The Challenge and Response RFC does not require that a Server sends a Challenge for Failed Authentication but if it does require that when a server sends a 401 then it must send 1 or more WWW-Authenticate headers with a comma separated list of parameters describing the Authentication Scheme.
I need thee the following from NegotiateSecurityFilter abilities
See this MDN article for HTTP Basic Authentication Challenge and Basic Authentication Failure
RFC7617 obsoletes RFC2617 which is the current implementation of BasicSecurityFilterProvider
IE and Chrome preemptive Authorization Headers Domain / Enterprise Deployments of Negotiate Security Filter
Withe reference RFC7235#section-3.1 and RFC7231#section-6.5.3 a server is not required to return a challenge and the server can choose to hide the existence of a resource by sending a 404 instead of a 403, (IIS and .NET supports this configuration option) and considering that AD configuration for IE and Chrome for Business provide the ability to use Negotiate or NTLM preemptive means that NegotiateSecurityFilter could be configured to hide the existence of a resource.
I would like to modify NegotiateSecurityFilter or create a new Filter that Extends NegotiateSecurityFilter to Implement the following
Notes on permissiveAuthorization and hideResources:
during Initialization of NegotiateSecurityFilter if permissiveAuthorization is false and hideResources = fase = throw ConflictingParameterRuntimeException message = 404 response will be returned for Forbidden access because permissiveAuthorization has been disabled permissiveAuthorization = false
Notes on behaviour of NegotiateSecurityFilter with the new parameters and only a BasicSecurityFilterProvider configured
Notes about allowGuestLogon false hideResources and successful authentication
https://tools.ietf.org/html/rfc7231#section-6.5.3
The Client MAY submit credentials when receiving a WWW-Authenticate and the Client MAY
preemptivley submit an Authorization on first request to a resource
If failed Authentication then return with 403 or 404 [RFC7231 7231#section-6.5.3)(https://tools.ietf.org/html/rfc7231#section-6.5.3)
6.5.3. 403 Forbidden
The text was updated successfully, but these errors were encountered: