Skip to content

KNOX-3564: Increase DELEGATION_POLICY_USERS.username column size to 2048 to support SPIFFE IDs - #1505

Merged
smolnar82 merged 1 commit into
apache:masterfrom
smolnar82:KNOX-3564
Nov 11, 2026
Merged

smolnar82 merged 1 commit into
apache:masterfrom
smolnar82:KNOX-3564

Conversation

@smolnar82

Copy link
Copy Markdown
Contributor

KNOX-3564 - Increase DELEGATION_POLICY_USERS.username column size to 2048 to support SPIFFE IDs

What changes were proposed in this pull request?

The SPIFFE specification allows SPIFFE IDs of up to 2048 bytes (SPIFFE ID spec, section 2.3), but DELEGATION_POLICY_USERS.username was VARCHAR(1023), so longer SPIFFE IDs could not be stored as permitted users on a delegation policy.

  • createKnoxIDFDelegationPolicyTables.sql: DELEGATION_POLICY_USERS.username changed from VARCHAR(1023) to VARCHAR(2048)
  • createKnoxIDFDelegationPolicyTablesOracle.sql: DELEGATION_POLICY_USERS.username changed from VARCHAR2(1023) to VARCHAR2(2048)

This also aligns the column with DELEGATION_POLICIES.actor_id, which is already 2048.

How was this patch tested?

  • Added DelegationPolicySchemaTest.testUsernameAcceptsMaxLengthSpiffeId, which stores and reads back a 2048-character SPIFFE ID in DELEGATION_POLICY_USERS (H2) and verifies that a 2049-character value is rejected
  • Ran DelegationPolicySchemaTest and JdbcDelegationPolicyServiceTest: all tests pass

Integration Tests

No integration test was added: this is a schema column size change, covered by the unit test above.

@smolnar82 smolnar82 self-assigned this Nov 11, 2026
@smolnar82
smolnar82 requested a review from lmccay November 11, 2026 08:11
@smolnar82

Copy link
Copy Markdown
Contributor Author

Cc. @hsheinblatt

@github-actions

Copy link
Copy Markdown

Test Results

  5 files    5 suites   1m 34s ⏱️
212 tests 210 ✅ 2 💤 0 ❌
253 runs  251 ✅ 2 💤 0 ❌

Results for commit e2bbeab.

@smolnar82
smolnar82 merged commit 8f8ae69 into apache:master Nov 11, 2026
3 checks passed
@smolnar82
smolnar82 deleted the KNOX-3564 branch November 11, 2026 09:41
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