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

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

                Author: ASF GitHub Bot
            Created on: 07/Apr/21 20:49
            Start Date: 07/Apr/21 20:49
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on a change in pull request #430:
URL: https://github.com/apache/knox/pull/430#discussion_r609059742



##########
File path: 
gateway-service-metadata/src/main/java/org/apache/knox/gateway/service/metadata/KnoxMetadataResource.java
##########
@@ -250,4 +253,18 @@ private ServiceModel getServiceModel(HttpServletRequest 
request, String gatewayP
     return serviceModel;
   }
 
+  @GET
+  @Produces({ APPLICATION_JSON })
+  @Path("profiles/{profile}")
+  public String getProfile(@PathParam("profile") String profileName) {
+    final GatewayConfig config = (GatewayConfig) 
request.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+    final Map<String, Collection<String>> configuredProfiles = 
config.getHomePageProfiles();
+    if (configuredProfiles.containsKey(profileName)) {

Review comment:
       I'm going to make it case-insensitive.




-- 
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: 578666)
    Time Spent: 1h 10m  (was: 1h)

> 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: 1h 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