[
https://issues.apache.org/jira/browse/KNOX-2950?focusedWorklogId=876947&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-876947
]
ASF GitHub Bot logged work on KNOX-2950:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Aug/23 10:46
Start Date: 18/Aug/23 10:46
Worklog Time Spent: 10m
Work Description: smolnar82 opened a new pull request, #787:
URL: https://github.com/apache/knox/pull/787
## What changes were proposed in this pull request?
With this change, our end-users have a way to define custom application path
aliases next to the ones we have OOTB to reach certain apps, UIs.
I added the following `gateway-site.xml` property(ies) to support this
feature:
```
<property>
<name>gateway.application.path.alias.$original-application-path-to-match</name>
<value>$comma-separated-list-of-alias-names</value>
</property>
```
where
- $original-application-path-to-match indicates the existing application
path we would like to have an alias for
- $comma-separated-list-of-alias-names marks the list of alias names to
register (pointing to the same application as the original path above),
separated by a comma if there are more
For instance:
```
<property>
<name>gateway.application.path.alias.token-generation</name>
<value>tokengen</value>
</property>
```
will allow end-users to reach the Token Generation UI on both
`.../token-generation/index.html` and `.../tokengen/index.html`.
## How was this patch tested?
Updated JUnit tests and conducted manual testing:
1. Added the following application path aliases in `gateway-site.xml` (under
the existing `token-generation/tokengen` entry):
```
<property>
<name>gateway.application.path.alias.token-management</name>
<value>tokenman</value>
</property>
<property>
<name>gateway.application.path.alias.home</name>
<value>knoxhome, knox-home</value>
</property>
```
2. Validated that the Token Generation page is reachable on both paths:
<img width="1784" alt="Screenshot 2023-08-18 at 12 41 09"
src="https://github.com/apache/knox/assets/34065904/be4c1795-50b4-4465-8344-706ca1503203">
<img width="1783" alt="Screenshot 2023-08-18 at 12 41 20"
src="https://github.com/apache/knox/assets/34065904/be931348-b5fc-4df3-937d-13f2e46f7629">
3. Validated that the Token Management page is reachable on both paths:
<img width="1773" alt="Screenshot 2023-08-18 at 12 42 44"
src="https://github.com/apache/knox/assets/34065904/1c87d116-e3ec-445d-8183-aba87cf3a657">
<img width="1780" alt="Screenshot 2023-08-18 at 12 42 53"
src="https://github.com/apache/knox/assets/34065904/df103cba-1b92-456c-b935-f0ec93a7f85f">
4. Validated that the Knox Home page is reachable on the original path
(`/home`) as well as on the two path aliases:
<img width="1780" alt="Screenshot 2023-08-18 at 12 45 09"
src="https://github.com/apache/knox/assets/34065904/e8353916-579f-443a-a1eb-05f11f175985">
<img width="1782" alt="Screenshot 2023-08-18 at 12 45 16"
src="https://github.com/apache/knox/assets/34065904/5500aba3-f822-472f-aa51-acec09dec102">
<img width="1782" alt="Screenshot 2023-08-18 at 12 45 26"
src="https://github.com/apache/knox/assets/34065904/91d72581-5328-47e9-9c36-77fa7e4a23d9">
Issue Time Tracking
-------------------
Worklog Id: (was: 876947)
Remaining Estimate: 0h
Time Spent: 10m
> Token generation should be reachable using the old URL
> ------------------------------------------------------
>
> Key: KNOX-2950
> URL: https://issues.apache.org/jira/browse/KNOX-2950
> Project: Apache Knox
> Issue Type: Bug
> Components: TokenGenerationUI
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 2.1.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> With KNOX-2811, the token generation UI's URL is changed from
> {{'.../tokengen/index.html'}} to {{'.../token-generation/index.html'}}. The
> idea was that clients will use the Knox Home page to go to that particular
> UI. However, it might be the case that other 3rd party tools have that link
> hard-coded.
> So it'd be nice to reach the same UI with an additional context with the old
> name ({{tokengen}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)