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">
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]