-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hello Guys!
I want to use your NTLM module to authorize users which are part of a certain group to access several resources. To accomplish that, somewhere in the Apache configuration I wrote a line which looks something like that:
require sspi-group "myDomain\myGroup"
That setting works pretty well if I am part of myGroup. However, if I am not in that group, the browser (FF 78) asks for my login credentials. If I provide them correctly, the browser keeps asking for 2 or 3 times. That is weird because I expected a 403 Forbidden page like MDN says instead of another 401. Additionally, I think the server should only send a WWW-Authenticate header in case of a failed authentication but not in case of a missing authorization.
I tried to figure out myself what causes that problem. In your source code I found a function called common_deny_actions, which is called in every authorization handler (e.g. sspi_group_check_authorization). At its end, it calls note_sspi_auth_failure. In my opinion, that is a mistake, because note_sspi_auth_failure seems to initiate another authorization flow which means it will send another 401 instead of 403.
Unfortunately I am neither an Apache nor a HTTP expert, so I am not sure about all that stuff. To me, that behaviour seems to break the HTTP specification and will confuse users, because they cannot recognize if they provided wrong login credentials or if they are not allowed to access a specific resource. If you agree with my opinion, I would appreciate if you could fix that.
Thanks!