| Summary: | Kerberos SSO setup enabling API v3 compatibility must not break API v4 functionality | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Gonza <grafuls> | ||||
| Component: | AAA | Assignee: | Ravi Nori <rnori> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Gonza <grafuls> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.0.0 | CC: | bugs, grafuls, juan.hernandez, lsvaty, mgoldboi, mperina, omachace, oourfali | ||||
| Target Milestone: | ovirt-4.0.5 | Flags: | rule-engine:
ovirt-4.0.z+
mgoldboi: planning_ack+ mperina: devel_ack+ rule-engine: testing_ack+ |
||||
| Target Release: | 4.0.5 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: |
For v3 and v4 api compatibility the location match for api in apache config file should be conditionally applied for requests that do not have bearer or basic authorization headers.
<LocationMatch ^/ovirt-engine/api>
<If "req('Authorization') !~ /^(Bearer|Basic)/i">
RewriteEngine on
....
</If>
</LocationMatch>
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-01-18 07:39:37 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Gonza
2016-09-08 12:26:29 UTC
Created attachment 1199058 [details]
image-uploader log
I've checked out the configuration of the machine and debug the queries and the problem was configured '/ovirt-engine/api' endpoint to support gssapi authentication, when removed that, image-uploader worked fine. Can you please re-check? Just a note that SDK v4 obtain the SSO token at {url}/ovirt-engine/sso/oauth/token-http-auth, and then uses this token to access '/ovirt-engine/api', so that endpoint shouldn't be set to support gssapi auth in case of SDK v 4.
Ravi, please take a look, we need to be able to support kerberos SSO for both v3 and v4 API at the same time. One of the simple solution (WA) is to add '/ovirt-engine/api/v4' to the location match and use always /v4 suffix with v4 SDKs. Conditionally applying the LocationMatch to take effect only if the requests do not contain Bearer or Basic authentication resolves the issue. Verified with:
rhevm-4.0.5-0.1.el7ev.noarch
# engine-image-uploader --with-kerberos -e gr05 upload rhevm-appliance-20160922.0-1.x86_64.rhevm.ova
# cat /etc/ovirt-engine/aaa/ovirt-sso.conf
<LocationMatch ^/ovirt-engine/sso/(interactive-login-negotiate|oauth/token-http-auth)|^/ovirt-engine/api>
<If "req('Authorization') !~ /^(Bearer|Basic)/i">
RewriteEngine on
RewriteCond %{LA-U:REMOTE_USER} ^(.*)$
RewriteRule ^(.*)$ - [L,NS,P,E=REMOTE_USER:%1]
RequestHeader set X-Remote-User %{REMOTE_USER}s
AuthType Kerberos
AuthName "Kerberos Login"
Krb5Keytab /etc/httpd/httpd.keytab
KrbAuthRealms IPA-FQDN.COM
Require valid-user
ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0; url=/ovirt-engine/sso/login-unauthorized\"/><body><a href=\"/ovirt-engine/sso/login-unauthorized\">Here</a></body></html>"
</If>
</LocationMatch>
|