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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
