[
https://issues.apache.org/jira/browse/KNOX-3119?focusedWorklogId=965081&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-965081
]
ASF GitHub Bot logged work on KNOX-3119:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Apr/25 15:21
Start Date: 07/Apr/25 15:21
Worklog Time Spent: 10m
Work Description: lmccay commented on code in PR #1016:
URL: https://github.com/apache/knox/pull/1016#discussion_r2031486841
##########
gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/ClientCredentialsResource.java:
##########
@@ -40,6 +54,47 @@ public class ClientCredentialsResource extends TokenResource
{
public static final String CLIENT_ID = "client_id";
public static final String CLIENT_SECRET = "client_secret";
+ private GatewayServices services;
+
+ @Override
+ protected ServletContext wrapContextForDefaultParams(ServletContext
context) throws ServletException {
+ ServletContext wrapperContext = new ServletContextWrapper(context);
+
wrapperContext.setInitParameter(TokenStateService.CONFIG_SERVER_MANAGED,
"true");
+ wrapperContext.setInitParameter(TokenResource.TOKEN_TTL_PARAM, "-1");
Review Comment:
Topology level config overrides the defaults.
Issue Time Tracking
-------------------
Worklog Id: (was: 965081)
Time Spent: 40m (was: 0.5h)
> Tune defaults for config params in CLIENTID API
> -----------------------------------------------
>
> Key: KNOX-3119
> URL: https://issues.apache.org/jira/browse/KNOX-3119
> Project: Apache Knox
> Issue Type: Improvement
> Components: Server
> Reporter: Larry McCay
> Assignee: Larry McCay
> Priority: Major
> Fix For: 2.2.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> There are a number of params that should be set by default for the CLIENTID
> extension of the KNOXTOKEN API. This will reduce the likelihood of errors
> based on having to explicitly configure these params which are either
> required or the logical defaults.
> 1. knox.token.exp.server-managed should be enabled by default this service if
> based on passcode tokens and requires server state
> 2. knox.token.ttl - should be -1 by default to not expire - fight me! :)
> 3. knox.token.hash.key should be set by default as well. We need to check
> whether this already exists via the AliasService and if not we should
> generate it automatically or fail to deploy with appropriate error/exception.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)