Bug 1481322
| Summary: | mellon-root and mellon-protected-locations need to be validated | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | John Dennis <jdennis> |
| Component: | keycloak-httpd-client-install | Assignee: | John Dennis <jdennis> |
| Status: | CLOSED ERRATA | QA Contact: | Kaleem <ksiddiqu> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.5 | CC: | extras-qa, jdennis, nkinder, spoore |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | keycloak-httpd-client-install-0.6-2.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1456855 | Environment: | |
| Last Closed: | 2018-04-10 18:16:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1456855 | ||
| Bug Blocks: | |||
|
Description
John Dennis
2017-08-14 15:19:14 UTC
Verified. Version :: keycloak-httpd-client-install-0.6-2.el7.noarch Results :: Test 1 with root and protected locations differing: Failed as expected: [root@sp2 ~]# keycloak-httpd-client-install \ > --client-originate-method registration \ > --keycloak-server-url https://idp.keycloak.test:8443 \ > --keycloak-admin-username admin \ > --keycloak-admin-password Secret123 \ > --app-name example_app \ > --keycloak-realm demorealm \ > --mellon-https-port 8443 \ > --mellon-root mellon_root \ > --mellon-protected-locations "/private" \ > --force /mellon_root/ /private/ ValueError: Invalid protected location "/private/" must be equal to or ancestor of the mellon root "/mellon_root/" Test 2 with protected and locations being equal: passed: [root@sp2 ~]# keycloak-httpd-client-install \ > --client-originate-method registration \ > --keycloak-server-url https://idp.keycloak.test:8443 \ > --keycloak-admin-username admin \ > --keycloak-admin-password Secret123 \ > --app-name example_app \ > --keycloak-realm demorealm \ > --mellon-https-port 8443 \ > --mellon-root mellon_root \ > --mellon-protected-locations "/mellon_root" \ > --force /mellon_root/ /mellon_root/ [Step 1] Connect to Keycloak Server [Step 2] Create Directories [Step 3] Set up template environment [Step 4] Set up Service Provider X509 Certificiates [Step 5] Build Mellon httpd config file [Step 6] Build Mellon SP metadata file [Step 7] Query realms from Keycloak server [Step 8] Use existing realm on Keycloak server [Step 9] Query realm clients from Keycloak server [Step 10] Get new initial access token [Step 11] Creating new client using registration service [Step 12] Enable saml.force.post.binding [Step 13] Add group attribute mapper to client [Step 14] Add Redirect URIs to client [Step 15] Retrieve IdP metadata from Keycloak server [Step 16] Completed Successfully And I confirmed proper login from web browser. Test 3 with protected location as ancestor of root: passed First I removed the client from the IdP from the RH-SSO admin interface. Next, cleanup SP from previous test: [root@sp2 ~]# cd /etc/httpd/ [root@sp2 httpd]# rm -rf saml2/ [root@sp2 httpd]# cd conf.d [root@sp2 conf.d]# rm example_app_* rm: remove regular file ‘example_app_mellon_keycloak_demorealm.conf’? y rm: remove regular file ‘example_app_private.conf’? y rm: remove regular file ‘example_app_ssl.conf’? y [root@sp2 ~]# systemctl stop httpd Now run test: [root@sp2 ~]# keycloak-httpd-client-install \ > --client-originate-method registration \ > --keycloak-server-url https://idp.keycloak.test:8443 \ > --keycloak-admin-username admin \ > --keycloak-admin-password Secret123 \ > --app-name example_app \ > --keycloak-realm demorealm \ > --mellon-https-port 8443 \ > --mellon-root mellon_root \ > --mellon-protected-locations "/mellon_root/private" \ > --force /mellon_root/ /mellon_root/private/ [Step 1] Connect to Keycloak Server [Step 2] Create Directories [Step 3] Set up template environment [Step 4] Set up Service Provider X509 Certificiates [Step 5] Build Mellon httpd config file [Step 6] Build Mellon SP metadata file [Step 7] Query realms from Keycloak server [Step 8] Use existing realm on Keycloak server [Step 9] Query realm clients from Keycloak server [Step 10] Get new initial access token [Step 11] Creating new client using registration service [Step 12] Enable saml.force.post.binding [Step 13] Add group attribute mapper to client [Step 14] Add Redirect URIs to client [Step 15] Retrieve IdP metadata from Keycloak server [Step 16] Completed Successfully [root@sp2 ~]# cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/example_app_ssl.conf [root@sp2 ~]# sed -i 's/443/8443/g' /etc/httpd/conf.d/example_app_ssl.conf [root@sp2 ~]# systemctl restart httpd [root@sp2 ~]# vim /var/www/html/mellon_root/logged_out.html Then verified with web browser. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0973 |