You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/07/10 12:43:00 UTC

[jira] [Work logged] (KNOX-3375) KnoxCLI fails if rolesLookupInterceptor is enabled

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

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

                Author: ASF GitHub Bot
            Created on: 10/Jul/26 12:42
            Start Date: 10/Jul/26 12:42
    Worklog Time Spent: 10m 
      Work Description: hanicz opened a new pull request, #1303:
URL: https://github.com/apache/knox/pull/1303

   …ory so KnoxCLI is able to load it
   
   [KNOX-3375](https://issues.apache.org/jira/browse/KNOX-3375) - KnoxCLI fails if rolesLookupInterceptor is enabled
   
   ## What changes were proposed in this pull request?
   
   - Threaded the active `GatewayServices` instance from `LdapServiceFactory` through `KnoxLDAPService` → `KnoxLDAPServerManager` → `InterceptorFactory` → `LDAPRolesLookupInterceptorFactory`, so the factory no longer depends on the null-under-knoxcli static `GatewayServer.getGatewayServices()`. This lets knoxcli commands succeed when rolesLookup is configured, since `CLIGatewayServices` already registers `LDAP_ROLES_LOOKUP_SERVICE`.
   
   ## How was this patch tested?
   
   Enabled rolesLookupInterceptor and tested knoxcli, unit tests
   
   ## Integration Tests
   N/A
   
   ## UI changes
   N/A
   




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

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

> KnoxCLI fails if rolesLookupInterceptor is enabled
> --------------------------------------------------
>
>                 Key: KNOX-3375
>                 URL: https://issues.apache.org/jira/browse/KNOX-3375
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: KnoxCLI
>    Affects Versions: 3.0.0
>            Reporter: Tamás Hanicz
>            Assignee: Tamás Hanicz
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> CLIGatewayServices load the below services
> {code:java}
> addService(ServiceType.LDAP_ROLES_LOOKUP_SERVICE, gatewayServiceFactory.create(this, ServiceType.LDAP_ROLES_LOOKUP_SERVICE, config, options));
> addService(ServiceType.LDAP_SERVICE, gatewayServiceFactory.create(this, ServiceType.LDAP_SERVICE, config, options)); {code}
> If the rolesLookupInterceptor is enabled it needs the below which results in an NPE
>  
> {code:java}
>     protected LDAPRolesLookupService getLDAPRolesLookupService() {
>         final GatewayServices gatewayServices = GatewayServer.getGatewayServices();
>         return gatewayServices.getService(ServiceType.LDAP_ROLES_LOOKUP_SERVICE);
>     } {code}
> Even a simple create-alias fails



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