Add vendor-neutral trusted proxy auth middleware examples for Node, Python, Rust, and Go#378
Closed
Copilot wants to merge 10 commits into
Closed
Add vendor-neutral trusted proxy auth middleware examples for Node, Python, Rust, and Go#378Copilot wants to merge 10 commits into
Copilot wants to merge 10 commits into
Conversation
Copilot
AI
changed the title
[WIP] Build vendor-neutral trusted proxy identity middleware
Add vendor-neutral trusted proxy auth middleware examples for Node, Python, Rust, and Go
Jun 23, 2026
Member
|
Deleted |
…tname-derived config defaults - Add Express/Fastify/Hono Node adapters and shared core module - Add Flask/Django Python middleware - Add mieweb:accounts-proxy-auth Meteor package (accounts-base login) - Derive auth domain from host FQDN instead of hardcoding; all settings optional - Update tests and docs
- Accept TRUSTED_PROXY_PUBLIC_KEY (inline PEM) or _FILE (path) across Node, Python, Go, and Rust; when set, verification skips JWKS and runs offline - JWKS remains the preferred default for key rotation and OIDC providers - Pin verification algorithm to RS256 in all implementations - Require either a JWKS URL or a public key in config validation - Add shared testdata/public-key.pem fixture and static-key tests - Enable jsonwebtoken use_pem feature for PEM keys (Rust) - Document the JWKS vs static-key choice
Addresses code-quality review: drop 'from unittest import mock' and qualify usage as unittest.mock (with explicit submodule import).
Publish on a proxy-auth-lib-v<semver> tag to npm, JSR, PyPI (Trusted Publishing), crates.io, Atmosphere (Meteor), and the Go module proxy as independent jobs, plus a Bun/Deno install smoke test. Each job derives the version from the tag and runs a matching script in proxy-auth-lib/scripts/ that is reproducible locally. - Add scripts/ (stamp-version + per-registry publish + runtime smoke) and README - Add nodejs/jsr.json for JSR publishing - Fix Go module path to the monorepo subpath so it actually resolves; release tags proxy-auth-lib/go/v<version> and warms the Go proxy - Add required crates.io metadata (license, description, repository) - Ignore Python build artifacts
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.
This introduces a new
proxy-auth-lib/workspace for applications that sit behind an identity-aware proxy and need to trust signed identity assertions instead of raw forwarded headers. It provides a consistent MVP across Node.js, Python, Rust, and Go for header extraction, JWKS-backed JWT verification, issuer/audience/expiration checks, and verified identity propagation.Multi-language middleware scaffold
proxy-auth-lib/with language-specific implementations for:net/httpmiddlewareTRUSTED_PROXY_ASSERTION_HEADERTRUSTED_PROXY_JWKS_URLTRUSTED_PROXY_ISSUERTRUSTED_PROXY_AUDIENCEVerification model
subject,email,name, raw claims)Shared fixtures and coverage
proxy-auth-lib/testdata/Docs and repository structure
Example
Updates since initial draft
Hostname-derived config defaults
auth.<parent-domain>of the host FQDN (e.g.web1.os.example.org→auth.os.example.org), with issuer/JWKS/audience derived from it. All vars remain optional overrides.Static public-key verification (JWKS still preferred)
TRUSTED_PROXY_PUBLIC_KEY(inline PEM) andTRUSTED_PROXY_PUBLIC_KEY_FILE(path) across all four languages.Algorithm pinning
Fixtures & tests
proxy-auth-lib/testdata/public-key.pem(matches existing token fixtures) plus offline static-key tests in each language.