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

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

                Author: ASF GitHub Bot
            Created on: 07/Apr/21 13:00
            Start Date: 07/Apr/21 13:00
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request #430:
URL: https://github.com/apache/knox/pull/430


   ## What changes were proposed in this pull request?
   
   Added the ability to declare an arbitrary number of homepage profiles in 
`gateway-site.xml`. The relevant configuration prefix is 
`knox.homepage.profile.` which should be finished with the profile name (e.g. 
`knox.homepage.profile.smolnar` declares the profile called `smolnar`).
   The purpose of these profiles is to
   - control what's going to be displayed in General Proxy Information
   - optionally, filter topologies too
   
   The following language elements should be used when declaring a profile in 
`gateway-site.xml`
   - gpi_version - allows `Knox Version`
   - gpi_cert - allows `TLS Public Certificate`
   - gpi_admin_ui - allows `Admin UI URL`
   - gpi_admin_api - allows `Admin API Details`
   - gpi_md_api - allows `Metadata API`
   - gpi_tokens - allows `Integration Tokens`
   - top_$TOPOLOGY_LIST - allows to define a comma-separated list of topology 
names that should be included in the `Topologies` section
   
   Let's see a sample:
   ```
       <property>
           <name>knox.homepage.profile.smolnar</name>
           <value>gpi_version,gpi_tokens,top_other</value>
       </property>
   ```
   The `smolnar` profile will allow displaying the `Knox Version` and 
`Integration Tokens` elements in `General Proxy Information` and will filter 
topologies such as only the topology called `other` will be displayed in 
`Topologies`.
   
   Other than adding homepage profile support I also moved the session 
information block (username and optional logout button) into the top-left 
corner.
   
   ## How was this patch tested?
   
   Manually tested (I used the above described `smolnar` profile during my 
tests):
   <img width="1668" alt="Screen Shot 2021-04-07 at 2 41 43 PM" 
src="https://user-images.githubusercontent.com/34065904/113870239-ead89480-97b1-11eb-95f3-e0f3037a63c4.png";>
   <img width="1673" alt="Screen Shot 2021-04-07 at 2 41 57 PM" 
src="https://user-images.githubusercontent.com/34065904/113870253-edd38500-97b1-11eb-8ed2-451c36ad2791.png";>
   <img width="1668" alt="Screen Shot 2021-04-07 at 2 42 12 PM" 
src="https://user-images.githubusercontent.com/34065904/113870257-ee6c1b80-97b1-11eb-9c49-ec3106648aa4.png";>
   <img width="1668" alt="Screen Shot 2021-04-07 at 2 42 35 PM" 
src="https://user-images.githubusercontent.com/34065904/113870260-ef04b200-97b1-11eb-8302-6c1faac091e4.png";>
   <img width="1672" alt="Screen Shot 2021-04-07 at 2 43 23 PM" 
src="https://user-images.githubusercontent.com/34065904/113870262-ef9d4880-97b1-11eb-97dd-77d0a5fc7b08.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: 578341)
    Remaining Estimate: 0h
            Time Spent: 10m

> Knox Homepage Profiles
> ----------------------
>
>                 Key: KNOX-2571
>                 URL: https://issues.apache.org/jira/browse/KNOX-2571
>             Project: Apache Knox
>          Issue Type: New Feature
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 1.6.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> There may be certain circumstances, when hiding functionality via links in 
> the General Proxy Information section to things like the Knox Admin UI, Knox 
> public certs, etc... is useful.
> This improvement would allow for specific profiles to be defined within 
> gateway-site.xml that would be referenced by name as a query param in the 
> URL. A token profile will allow the homepage to filter itself based on the 
> definition in gateway-site.xml to include only the links and topologies 
> described in the profile.
> This same feature would likely be able to be used as the default app on any 
> topology endpoint. Instead of a 404 we could redirect to the homepage with an 
> implied topology profile and the specific topology name.
> This would lead us to a possible URL like:
> [https://localhost:8443/gateway/homepage/home?profile=topology&name=sandbox]
> This will tell it to filter for only the links described in the general 
> topology profile and the indicated topology name and possibly with any 
> additional topologies that are in the profile as well. Typically, I would 
> imagine it to only have the one named in the query param but it would be up 
> to the profile definition author.
> Using the above idea, the token-based profile URL could be done in a similar 
> way - so that it can differ the filter for token integrations, we would make 
> it a different profile:
> [https://localhost:8443/gateway/homepage/home?profile=token&name=tokenbased]
> There should be 3 pre-configured profiles OOTB:
>  * full - all elements of GPI (General Proxy Information) is shown; no 
> topology filtering
>  * thin - only the version and public certification elements are showing in 
> GPI; no topology filtering
>  * token - only the version and token integration elements are shown in GPI; 
> no topology filtering



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to