[
https://issues.apache.org/jira/browse/KNOX-3332?focusedWorklogId=1022793&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1022793
]
ASF GitHub Bot logged work on KNOX-3332:
----------------------------------------
Author: ASF GitHub Bot
Created on: 29/May/26 10:12
Start Date: 29/May/26 10:12
Worklog Time Spent: 10m
Work Description: hanicz opened a new pull request, #1243:
URL: https://github.com/apache/knox/pull/1243
[KNOX-3332](https://issues.apache.org/jira/browse/KNOX-3332) - Add listeners
on gateway config changes for observers
## What changes were proposed in this pull request?
- Adds an observer pattern so clients are notified if gateway config changes.
- Knox LDAP Server Manager reloads the LDAP configs if there are changes and
restart the LDAP service.
## How was this patch tested?
Unit tests
Manual test:
Started a local Knox and LDAP instance. Changed the knoxsso ldap port to
33390 and tried to login into the homepage which failed. Updated the
gateway-reloadable.xml with the new port 33395 and I was able to log into the
homepage.
```
2026-05-29 11:26:10,426 INFO knox.gateway
(GatewayServer.java:refreshGatewayConfig(275)) - Refreshed gateway config
2026-05-29 11:26:10,426 INFO services.ldap
(KnoxLDAPServerManager.java:onGatewayConfigChanged(109)) - Reloading LDAP
configuration
2026-05-29 11:26:10,427 INFO services.ldap
(KnoxLDAPServerManager.java:stop(218)) - Stopping LDAP service on port 33,390
2026-05-29 11:26:10,445 INFO services.ldap
(KnoxLDAPServerManager.java:stop(236)) - LDAP service stopped successfully
2026-05-29 11:26:10,448 INFO services.ldap
(BackendFactory.java:createBackend(39)) - Loading backend: ldap (via
ServiceLoader)
2026-05-29 11:26:10,448 INFO services.ldap
(LdapProxyBackend.java:initialize(140)) - Loading backend: ldap (via Proxying
dc=hadoop,dc=apache,dc=org to ldap://localhost:33389
(dc=hadoop,dc=apache,dc=org) with uid attribute using group searches)
2026-05-29 11:26:10,449 INFO services.ldap
(LdapProxyBackend.java:initializeConnectionPool(180)) - Loading backend: ldap
(via Initialized connection pool with maxActive=8)
2026-05-29 11:26:10,449 INFO services.ldap
(KnoxLDAPServerManager.java:start(131)) - Starting LDAP service on port 33,395
with base DN: dc=hadoop,dc=apache,dc=org
2026-05-29 11:26:10,540 INFO services.ldap
(KnoxLDAPServerManager.java:start(190)) - LDAP service started successfully on
port 33,395
```
gateway-site.xml
```
<!
Issue Time Tracking
-------------------
Worklog Id: (was: 1022793)
Remaining Estimate: 0h
Time Spent: 10m
> Add listeners on gateway config changes for observers
> -----------------------------------------------------
>
> Key: KNOX-3332
> URL: https://issues.apache.org/jira/browse/KNOX-3332
> Project: Apache Knox
> Issue Type: Improvement
> Components: Server
> Affects Versions: 2.1.0
> Reporter: Tamás Hanicz
> Assignee: Tamás Hanicz
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)