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

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

                Author: ASF GitHub Bot
            Created on: 03/Jun/25 22:49
            Start Date: 03/Jun/25 22:49
    Worklog Time Spent: 10m 
      Work Description: lmccay opened a new pull request, #1052:
URL: https://github.com/apache/knox/pull/1052

   ## What changes were proposed in this pull request?
   
   Issue: The extension APIs of KNOXTOKEN: APIKEY and CLIENTID APIs are unable 
to be colocated with the KNOXTOKEN API in the same topology due to param name 
conflicts. This results in unexpected results when the TTL or other params are 
set in one or more of the APIs.
   
   Solution: I provided prefixes for all extension APIs that extend the 
PasscodeTokenResourceBase class via a getPrefix() method on each 
implementation. Those prefixes are used to disambiguate the params at 
initialization time and then are stripped from the params and reset to the 
expected names in KNOXTOKEN implementation.
   
   This insures that the params do not collide and that the implementation has 
the expected values at runtime.
   
   Note: there may be a more fundamental issue that has required this change 
that has been lurking for quite some time. The setting of all the params from 
the JAXRS APIs as init params within web.xml in a flat space for the 
GatewayServlet seems problematic. This will require additional investigation. 
In the meantime, this will work for our needs and will still be safe when we 
address that problem.
   
   ## How was this patch tested?
   
   Existing unit tests were run and adjusted to accommodate the new names with 
the prefixes.
   All other unit tests were also run.
   
   Please review [Knox Contributing 
Process](https://cwiki.apache.org/confluence/display/KNOX/Contribution+Process#ContributionProcess-GithubWorkflow)
 before opening a pull request.
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 971709)
    Remaining Estimate: 0h
            Time Spent: 10m

> Isolate the CLIENTID and APIKEY param names from KNOXTOKEN
> ----------------------------------------------------------
>
>                 Key: KNOX-3155
>                 URL: https://issues.apache.org/jira/browse/KNOX-3155
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>            Reporter: Larry McCay
>            Assignee: Larry McCay
>            Priority: Major
>             Fix For: 2.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The new APIs that extend KNOXTOKEN API leverage the param names of the parent 
> API even when it translates from one to the other. There is a problem with 
> colocating any of these three APIs in the same topology as the params are 
> getting confused across the implementations and they step on each other.
> We need to disambiguate them based on prefixes for the extensions that can be 
> used in the init method and set the appropriate member variables in either 
> the parent or the extension for use by the runtime.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to