RFC0055 Identity-Aware Routing#1913
Open
rkoster wants to merge 9 commits into
Open
Conversation
7 tasks
6778b97 to
23a9670
Compare
Add comprehensive test coverage for the Identity-Aware Routing feature that enables mTLS-based authentication and authorization for app-to-app communication on dedicated domains (e.g., *.apps.identity). Test coverage: - Default-deny behavior and access rule creation - Authorization enforcement (denies unauthorized apps) - XFCC header forwarding with caller identity in Envoy format Infrastructure changes: - Extended proxy app with /headers and /mtls_proxy endpoints - Added identity_aware_routing test suite with 3 test cases - Added IncludeIdentityAwareRouting and IdentityAwareDomain config - Added IdentityAwareRoutingDescribe wrapper for test gating Tests use cf add-access-rule/remove-access-rule CLI commands and validate mTLS certificate-based authentication via Diego instance identity certificates. Requires custom CF CLI with access rule management commands.
7010a27 to
2d05f71
Compare
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.
Summary
Add comprehensive acceptance test coverage for the Identity-Aware Routing feature that enables mTLS-based authentication and authorization for app-to-app communication on dedicated domains (e.g.,
*.apps.identity).This PR implements the CATs portion of RFC0055 for domain-scoped mTLS routing in GoRouter.
Changes
Test Coverage
Four test cases across two suites:
Identity-Aware Routing (
identity_aware_routing/identity_aware_routing.go):cf add-route-policy; confirms the policy appears incf route-policies --domainConsistentlyto confirm the denial persistsX-Forwarded-Client-Certheader is forwarded to the backend in Envoy format, containing the frontend app GUID (OU=app:<guid>)Route Policy Domain Management (
identity_aware_routing/identity_aware_routing.go):4. Domain creation: Verifies that
cf create-shared-domain <name> --enforce-route-policies --scope spacesucceeds and the resulting domain appears incf domainsInfrastructure Changes
Extended proxy app (
assets/proxy/main.go):/headersendpoint: Returns all incoming request headers as JSON — used by tests to inspect what the backend receives/mtls_proxy/<host.domain>/<path>endpoint: Dials<host.domain>:443and performs an HTTPS request using the Diego instance identity certificate (CF_INSTANCE_CERT/CF_INSTANCE_KEY) for mTLS client auth; returns status code, body, and headers as JSONNew test suite (
identity_aware_routing/identity_aware_routing.go):cf add-route-policy,cf route-policies, andcf create-shared-domain --enforce-route-policies --scope spaceEventually/Consistentlypolling return aStatusCode: -1sentinel instead of hard-failing, preventing flakiness during route convergenceConfiguration support (
helpers/config/):IncludeIdentityAwareRoutingbool andIdentityAwareDomainstring (default:apps.identity) config fieldsIdentityAwareRoutingDescribe()wrapper for test gatingRequirements
cf add-route-policy <domain> --source-app <app> --hostname <host>cf route-policies --domain <domain>cf create-shared-domain <name> --enforce-route-policies --scope spacerouter.domainsjob property)apps.identity)Testing
Tested against a local CF deployment with all 4 tests passing:
Related Work
community/toc/rfc/rfc-draft-domain-scoped-mtls-gorouter.md