Skip to content

KNOX-3368 - Trusted OIDC Issuer admin API for Knox IDF#1321

Open
hsheinblatt wants to merge 8 commits into
apache:knox_idffrom
hsheinblatt:KNOX-3368
Open

KNOX-3368 - Trusted OIDC Issuer admin API for Knox IDF#1321
hsheinblatt wants to merge 8 commits into
apache:knox_idffrom
hsheinblatt:KNOX-3368

Conversation

@hsheinblatt

Copy link
Copy Markdown

KNOX-3368 - Trusted OIDC Issuer admin API for Knox IDF

What changes were proposed in this pull request?

Implement the admin API for the trusted OIDC issuer service
along with the contributor for it.

How was this patch tested?

Unit tests were added

Integration Tests

N/A will be added once the flow can be tested.

smolnar82 and others added 7 commits July 17, 2026 09:37
* KnoxIDF - Initial commit
* KnoxIDF - multi OP support
* KnoxIDF - make token endpoint configurable during discovery
* KnoxIDF - Code cleanup and bug fixes
* KnoxIDF - Multi OP enablement improvements and code adoption to Larry's recent changes
* KnoxIDF - Add REFRESH_TOKEN support
* KnoxIDF - Automatically enable JdbcFederatedIdentityService when KnoxIDF is present in any topology
* KnoxIDF - Added Docker-based integration tests
* KnoxIDF: configurable user params provider (only LDAP for now)
* KnoxIDF: add support for auth code flow with PKCE
* KnoxIDF: fix an issue with the empty user params provider implementation
* KnoxIDF: Refactor Docker build to use local Maven artifacts and unify CI/Dev workflows
…#1311)

* KNOX-3355 - Add TrustedOidcIssuerService schema and interface
Co-authored-by: Harrison <hsheinblatt@cloudera.com>
How this patch was tested:
New unit tests are added.

Follow on changes will integrate in the implementation
into KnoxIDF flows, but now there are no integration or UI changes.
and to use audit sentinel values without special characters.
@github-actions

Copy link
Copy Markdown

Test Results

46 tests   46 ✅  8s ⏱️
 3 suites   0 💤
 3 files     0 ❌

Results for commit 70ca9da.

Comment thread pom.xml
<mina.version>2.2.8</mina.version>
<netty.version>4.1.135.Final</netty.version>
<nimbus-jose-jwt.version>10.9.1</nimbus-jose-jwt.version>
<oauth2-oidc-sdk.version>11.37.2</oauth2-oidc-sdk.version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be left here because of the recent changes in #1320

Comment on lines +40 to +47
protected String[] getPackages() {
return new String[] { "org.apache.knox.gateway.service.knoxidf" };
}

@Override
protected String[] getPatterns() {
return new String[] { "knoxidf/api/**?**" };
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KNOXIDF_ADMIN and KNOXIDF share the same package AND URL pattern. Both contributors return:

  • getPackages(){"org.apache.knox.gateway.service.knoxidf"}
  • getPatterns(){"knoxidf/api/**?**"}

Because Jersey scans the whole package, the TrustedOidcIssuersResource admin endpoints are served by the KNOXIDF role too, not just KNOXIDF_ADMIN.
If the intent is for admin operations to sit behind stricter authorization (a separate role usually implies a separate authz/ACL binding in the topology), that intent is defeated: the same resource is reachable through the non-admin role. Conversely, deploying both roles in one topology with the identical knoxidf/api/? pattern invites a routing conflict. The test even notes this ("Same prefix … so both roles can coexist … Jersey disambiguates by @Path"), but path-based disambiguation doesn't give you role-based access control.

Is KNOXIDF_ADMIN meant to be independently protected, and if so, shouldn't its package/pattern be scoped to the admin resources only?

try {
final Map<String, Object> parsed;
try {
parsed = new ObjectMapper().readValue(body, new TypeReference<Map<String, Object>>() {});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ObjectMapper is expensive to construct and thread-safe to reuse: make it a private static final, or parse via JsonUtils for consistency with the rest of the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants