-
Notifications
You must be signed in to change notification settings - Fork 464
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
webinterface GSSAPI auth broken in cups >= 2.2 #5596
Comments
@kenshin33 We'll need debug logs from the system in question. (cupsctl --debug-logging) |
tryin to modify the default options of a printer |
@kenshin33 OK, I'll need to see your cupsd.conf file as well - the admin.cgi program is using Peer Credentials for some reason, instead of Negotiate. |
Here it is (removed identifying information): TO be noted it is the safe file used by the older version of cups (2.2.1). |
Also now have reports of this on macOS, investigating... |
at SUSE SLES 15 sp1 it is also broken. Is there anything I could do to help you? |
|
Debug logging reveals that @michaelrsweet does that help? |
Problem seems to be that CGI programs
There are two solutions:
|
One fix is to use S4U2Self when Kerberos is in use. That said, running the CGI programs as a separate user is still a good idea. S4U2Self allows a service (CUPS in this case) to get a service ticket for itself that it can give to another program (here the CGI program) so that it can authenticate to the service using Kerberos. It is mostly meant for cases where the initial authentication is not via Kerberos, but it should work here too. |
SetAuthorizationString with NULL argument sets an empty string. Related: apple#5596 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Related: apple#5596 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
If connecting to localhost then proceed to ask the client for the authorization using cupsGetPassword2. The get password callback will return 401 to the client with WWW-Authenticate: Negotiate. Fixes: apple#5596 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
PeerCred is also possible if address family is AF_LOCAL. This will allow the CGI programs to generate the authorization from the local certificates based on PID also when Negotiate is used for local connections: Client CGI Browser <- Remote conn -> admin.cgi <--- Localhost conn ---> Scheduler | | | + --- HTTP/POST /admin/ --> | | | + --- CUPS-Get-Devices ------------> | | | | | | <-- 401 Unauthorized --------------+ | | WWW-Authenticate: | | | Negotiate, (PeerCred,) Local | | | | | <-- 401 Unauthorized -----+ | | WWW-Authenticate: | | | Negotiate | | | | | | --- HTTP/POST /admin/ --> | | | Authorization: + --- IPP CUPS-GetDevices ---------> | | Negotiate | Authorization: Local <cert> | | | | Fixes: apple#5596 Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Fixed in OpenPrinting CUPS. |
can confirm. Built 2.3.3 with the patch from the pull request, it seems to work ! |
As the tite states, the web interface does no longer work if authentication is required and Negotiate is set.
For example after the last step in modifying a printer the interface hangs. Tcpdump shows no reply after the post (except for the keepalive packets).
cupsd and admin.cgi cpu usage on the server goes up.
Debuggin shows an infinit loop in admin.cgi, precisly the while (response == NULL) in cupsDoIORequest (cups/request.c)
Basic auth works fine
OS :debian stretch
Cups: 2.2.10 (source for buster rebuilt with debuging enabled)
The text was updated successfully, but these errors were encountered: