feat: Add inbound bypass paths for public endpoints#133
Merged
Conversation
AuthBridge's ext-proc now skips JWT validation for configurable path patterns. Sensible defaults are built in: /.well-known/*, /healthz, /readyz, /livez. This allows agents and tools to expose public endpoints (e.g., Agent Card discovery at /.well-known/agent.json) without requiring OAuth. Defaults can be overridden by setting the BYPASS_INBOUND_PATHS environment variable to a comma-separated list of path patterns using Go's path.Match glob syntax. Setting the env var replaces the defaults entirely. Closes rossoctl#124 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hai Huang <huang195@gmail.com>
huang195
force-pushed
the
feat/bypass-inbound-paths
branch
from
February 20, 2026 19:11
9ee352e to
1f408b6
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds configurable path bypass functionality to AuthBridge's go-processor, allowing specific endpoints to skip inbound JWT validation for public access. This addresses issue #124 by enabling agents and tools to expose public endpoints like AgentCard discovery and health checks without OAuth requirements.
Changes:
- Added bypass path matching with default patterns for common public endpoints (
/.well-known/*,/healthz,/readyz,/livez) - Implemented
BYPASS_INBOUND_PATHSenvironment variable for custom configuration with comma-separated glob patterns - Integrated bypass logic into the inbound authentication flow to skip JWT validation for matched paths
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| AuthBridge/AuthProxy/go-processor/main.go | Adds matchBypassPath function, default bypass patterns, env var parsing, and bypass check in handleInbound before JWT validation |
| AuthBridge/AuthProxy/go-processor/main_test.go | Adds comprehensive unit tests for pattern matching including exact matches, globs, query strings, empty lists, and default behaviors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address review feedback: - Normalize request paths with path.Clean before matching to prevent bypass via non-canonical forms (//healthz, /./healthz, /../x) - Log invalid patterns in matchBypassPath instead of silently skipping - Validate patterns at startup when parsing BYPASS_INBOUND_PATHS and reject malformed entries with a log message - Add tests for malformed patterns and non-normalized paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hai Huang <huang195@gmail.com>
huang195
force-pushed
the
feat/bypass-inbound-paths
branch
from
February 20, 2026 21:41
0c4b162 to
8c7f6f5
Compare
This was referenced Feb 24, 2026
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
Closes #124
AuthBridge's ext-proc now skips inbound JWT validation for configurable path patterns, allowing agents and tools to expose public endpoints without requiring OAuth.
/.well-known/*,/healthz,/readyz,/livez. These work out of the box with no configuration needed.BYPASS_INBOUND_PATHSto a comma-separated list of path patterns to replace the defaults entirely (e.g.,BYPASS_INBOUND_PATHS=/.well-known/*,/metrics).path.Matchglob syntax:*matches any sequence of non-/characters, so/.well-known/*matches/.well-known/agent.jsonbut not/.well-known/a/b.Files changed
AuthBridge/AuthProxy/go-processor/main.go— bypass path matching logic, default patterns, env var override parsing, bypass check inhandleInbound()AuthBridge/AuthProxy/go-processor/main_test.go— unit tests for pattern matching and default behaviorHow it works
bypassInboundPathswith the built-in defaults.BYPASS_INBOUND_PATHSis set, the defaults are replaced with the env var values.:pathpseudo-header is checked against the bypass list before JWT validation. If matched, the request is forwarded without authentication.Example: override defaults
To disable all bypasses:
To add a custom set:
Test plan
go build ./...passesgo test ./...— 13 unit tests pass (exact match, glob match, query string, empty list, defaults)make testin kagenti-webhook passesGET /.well-known/agent.jsonfrom another pod returns 200 without authGET /healthzfrom another pod bypasses (404 from app, not 401)GET /,/api/data,/v1/tasksfrom another pod all return 401🤖 Generated with Claude Code