KNOX:3353: Add Docker-based integration tests for k8s ServiceAccountValidator#1271
Open
smolnar82 wants to merge 1 commit into
Open
KNOX:3353: Add Docker-based integration tests for k8s ServiceAccountValidator#1271smolnar82 wants to merge 1 commit into
smolnar82 wants to merge 1 commit into
Conversation
Test Results28 tests 28 ✅ 3s ⏱️ Results for commit 3951112. |
pzampino
approved these changes
Jun 19, 2026
moresandeep
approved these changes
Jun 20, 2026
moresandeep
left a comment
Contributor
There was a problem hiding this comment.
Awesome, thank you @smolnar82 !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KNOX-3353 - Add Docker-based integration tests for the k8s ServiceAccountValidator
What changes were proposed in this pull request?
Adds Docker Compose integration test coverage for the new k8s pre-auth
ServiceAccountValidator(SPIFFE id → ServiceAccount annotationmatching).kubeconfig(server rewritten tohttps://k3s:6443, matched by--tls-san=k3s) and applies the test fixtures. The knox service mounts that kubeconfig (KUBECONFIG) and waits for bootstrap to complete. Thekubeconfigis re-derived inside the readiness loop so it always converges on k3s's live CA, even across volume reuse/restarts.test+test-saServiceAccount annotatedknox.apache.org/owner-username: bob.k8sauthtopology (HeaderPreAuth federation backed by ServiceAccountValidator, fronting the HEALTH service).pytestcases.How was this patch tested?
Ran the full Docker Compose suite locally:
All 28 tests pass, including the 6 new ones. No production code changed — this is test infrastructure only:
Integration Tests
Added tests/test_k8s_serviceaccount_validation.py against the k8sauth topology:
200 / OK403403UI changes
N/A