[ 
https://issues.apache.org/jira/browse/KNOX-1919?focusedWorklogId=274883&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-274883
 ]

ASF GitHub Bot logged work on KNOX-1919:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jul/19 14:13
            Start Date: 10/Jul/19 14:13
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on pull request #113: KNOX-1919 - 
Taking gateway.path into consideration when processing redirectToUrl provider 
param with the OOTB knoxsso.xml sample
URL: https://github.com/apache/knox/pull/113
 
 
   ## What changes were proposed in this pull request?
   
   Before my change, the `redirectToUrl` parameter in the OOTB `knoxsso.xml` 
topology was hardcoded to `/gateway/knoxsso/knoxauth/login.html`. In case we 
changed the `gateway.path` configuration element the admin UI became 
unreachable. If you knew where to find the root cause it was easy to fix it, 
but we can do this smarter.
   I changed the sample URL to `/${GATEWAY_PATH}/knoxsso/knoxauth/login.html` 
and made sure to replace the `${GATEWAY_PATH}` placeholder with the actual 
value of `gateway.path`.
   
   ## How was this patch tested?
   
   Tested manually as follows: 
   
   1. changed `gateway.path` to `smolnar_test` in `gateway-site.xml`
   2. restarted the server
   3. hit the following URL: 
`https://localhost:8443/smolnar_test/manager/admin-ui/`
   4. as expected I got redirected to the proper URL
   
   <img width="1674" alt="Screen Shot 2019-07-10 at 3 36 09 PM" 
src="https://user-images.githubusercontent.com/34065904/60976271-ab0b2180-a32d-11e9-981f-6ceb7eab0237.png";>
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 274883)
            Time Spent: 10m
    Remaining Estimate: 0h

> Enhance redirectToUrl paremeter in knoxsso.xml
> ----------------------------------------------
>
>                 Key: KNOX-1919
>                 URL: https://issues.apache.org/jira/browse/KNOX-1919
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: KnoxSSO
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 1.4.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> As of now, we provide the following {{knoxsso.xml}} sample OOTB:
> {code:java}
> <topology>
>     <gateway>
>         <provider>
>             <role>webappsec</role>
>             <name>WebAppSec</name>
>             <enabled>true</enabled>
>             <param>
>                 <name>xframe.options.enabled</name>
>                 <value>true</value>
>             </param>
>         </provider>
>         <provider>
>             <role>authentication</role>
>             <name>ShiroProvider</name>
>             <enabled>true</enabled>
>             ...
>             <param>
>                 <name>redirectToUrl</name>
>                 <value>/gateway/knoxsso/knoxauth/login.html</value>
>             </param>
>             ...
>         </provider>
>         <provider>
>             <role>identity-assertion</role>
>             <name>Default</name>
>             <enabled>true</enabled>
>         </provider>
>     </gateway>
>     <application>
>         <name>knoxauth</name>
>     </application>
>     <service>
>         <role>KNOXSSO</role>
>         <param>
>             <name>knoxsso.cookie.secure.only</name>
>             <value>true</value>
>         </param>
>         <param>
>             <name>knoxsso.token.ttl</name>
>             <value>-1</value>
>         </param>
>     </service>
> </topology>
> {code}
> In case you modify the {{gateway.path}} configuration element the admin UI 
> won't be reachable due to the hard-coded gateway path ({{gateway}}) in 
> {{redirectToUrl}}.
> Recommended solution:
> change the current value to {{/${GATEWAY_PATH}/knoxsso/knoxauth/login.html}} 
> and replace the {{${GATEWAY_PATH}}} with the actual configuration value.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to