[
https://issues.apache.org/jira/browse/KNOX-3426?focusedWorklogId=1039384&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1039384
]
ASF GitHub Bot logged work on KNOX-3426:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Sep/26 09:40
Start Date: 03/Sep/26 09:40
Worklog Time Spent: 10m
Work Description: smolnar82 opened a new pull request, #1374:
URL: https://github.com/apache/knox/pull/1374
[KNOX-3426](https://issues.apache.org/jira/browse/KNOX-3426) -
Embedded-Derby delegation policy service
## What changes were proposed in this pull request?
- Add `DerbyDBDelegationPolicyService`, the self-provisioning embedded-Derby
default for KnoxIDF delegation policies.
- Consolidate the duplicated DerbyDB boot/shutdown/alias plumbing from the
token-state, federated-identity and trusted-OIDC-issuer services into a shared
`EmbeddedDerbyDatabase` (+ `DerbyDatabaseCredentials`).
- Move multi-statement DDL parsing (`createTablesIfNotExist`,
`parseCreateTableStatements`, license-header stripping) into `KnoxDatabase` and
reuse it from `DelegationPolicyDatabase`; add a command-based
`JDBCUtils.createTableFromSQL` overload.
## How was this patch tested?
- New `KnoxDatabaseTest` (in-memory HSQL) covers `createTablesIfNotExist`:
statement parsing/ordering, table creation, idempotent re-runs, missing-table
re-provisioning, and missing-script failure.
- Updated `DelegationPolicyServiceFactoryTest` / `ServiceFactoryTest`.
- Full gateway-server test suite + checkstyle pass; manually verified clean
Derby boot/login/shutdown on a local gateway.
## Integration Tests
No new integration suite needed — the change is DB-provisioning plumbing
covered by unit tests against HSQL/Derby.
Issue Time Tracking
-------------------
Worklog Id: (was: 1039384)
Time Spent: 4h 10m (was: 4h)
> Delegation policy schema and JDBC implementation
> ------------------------------------------------
>
> Key: KNOX-3426
> URL: https://issues.apache.org/jira/browse/KNOX-3426
> Project: Apache Knox
> Issue Type: Task
> Components: JWT
> Reporter: Harrison Sheinblatt
> Assignee: Harrison Sheinblatt
> Priority: Major
> Time Spent: 4h 10m
> Remaining Estimate: 0h
>
> Persistent storage for delegation policies, with a service interface and JDBC
> implementation. After these tasks, delegation policies can be stored and
> retrieved.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)