Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KNOX-2950 - Handling application path aliases #787

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

smolnar82
Copy link
Contributor

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>
  1. Validated that the Token Generation page is reachable on both paths:
Screenshot 2023-08-18 at 12 41 09 Screenshot 2023-08-18 at 12 41 20
  1. Validated that the Token Management page is reachable on both paths:
Screenshot 2023-08-18 at 12 42 44 Screenshot 2023-08-18 at 12 42 53
  1. Validated that the Knox Home page is reachable on the original path (/home) as well as on the two path aliases:
Screenshot 2023-08-18 at 12 45 09 Screenshot 2023-08-18 at 12 45 16 Screenshot 2023-08-18 at 12 45 26

@smolnar82 smolnar82 merged commit 0136181 into apache:master Oct 9, 2023
2 checks passed
@smolnar82 smolnar82 deleted the KNOX-2950 branch October 9, 2023 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants