Help us shape the future of Go! Take the 2026 Go Developer Survey

authproxy

module
v0.0.0-...-40c6b5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT

README

AuthProxy

AuthProxy is an open-source, embeddable connection platform for applications that call third-party APIs. It centralizes OAuth tokens and API keys, injects credentials at request time, refreshes OAuth tokens, and records what happened. Your application keeps using each provider's native API while AuthProxy manages the connection lifecycle.

What AuthProxy is and why use it

AuthProxy sits between your application and the APIs it integrates with:

flowchart LR
    User["Application user"] --> Host["Your application"]
    Host -->|"Request with connection ID"| AP["AuthProxy"]
    AP -->|"Inject credentials and forward"| Provider["Third-party API"]
    AP --- Store[("Encrypted credentials")]
    AP --- Audit[("Request events and telemetry")]

A connector describes how a provider authenticates and how a connection is set up. A connection is a namespace-scoped configured instance of that connector for a tenant, team, user, or service, including its encrypted credentials. Your application sends the connection ID with a request; it never needs to retrieve the credential.

AuthProxy is useful when you want to:

  • Build instead of outsource your integration logic. Keep native provider APIs, SDKs, and data models rather than adopting a lossy unified API.
  • Avoid rebuilding connection infrastructure. OAuth callbacks, refresh, API-key injection, setup forms, health probes, connector generation management, and connection UIs are shared across integrations.
  • Keep control of the data plane. AuthProxy is open source and self-hosted, so credentials and request data can remain inside infrastructure you control.
  • Embed integrations into your product. The Marketplace UI fits into the host application's sign-in flow; actors, namespaces, and scoped permissions map AuthProxy resources to the host's users and tenants.
  • Give operators one control plane. The Admin UI, request-event store, rate limits, tasks, and OpenTelemetry signals make integration behavior inspectable without scattering secrets and logs through application code.
  • Limit credential exposure. Sensitive fields use application-level encryption, namespace-scoped keys can isolate tenants, and external KMS or secret providers can retain control of wrapping material.

AuthProxy focuses on authentication, connection lifecycle, proxying, and governance. It is not a workflow builder or a replacement for the business logic in your application. See the core concepts and comparison with related projects for more detail.

Demos

Start at the AuthProxy demo. The sign-in page is a small stand-in for an application that embeds AuthProxy. Choose an example identity, then open either the Marketplace or Admin UI.

The demo shell signs a short-lived, one-time JWT for the selected actor and redirects the browser to AuthProxy. AuthProxy verifies the token and establishes the UI session. In a real integration, your application performs this handoff after authenticating its own user.

sequenceDiagram
    participant User
    participant Host as Host application
    participant UI as AuthProxy UI
    participant AP as AuthProxy

    User->>Host: Sign in and open integrations
    Host->>Host: Sign short-lived nonce JWT
    Host-->>UI: Redirect with authToken
    UI->>AP: Exchange token for session
    AP-->>UI: Session established

The demo is public and shared, so its contents may change or be reset. Do not enter real credentials or private data.

Connector Marketplace

Create a connection in the AuthProxy Marketplace

The Marketplace shows how users discover and manage integrations inside a host application. The demo catalog includes:

  • a no-auth connector;
  • an API-key connector that accepts the intentionally fake key demo-api-key;
  • a basic OAuth authorization-code flow;
  • OAuth with tenant selection before authorization; and
  • OAuth followed by resource selection after authorization.

The OAuth examples use a dedicated go-oauth2-server test provider instead of a real third party. Use the credentials shown in the connector description, or select Register on the provider login page to create any fake account you want. This lets you test the complete connection flow without giving the demo access to a real Google, GitHub, or other provider account.

Administration and observability

Manage AuthProxy through the Admin UI

The Admin UI lets operators inspect namespaces, actors, connectors, connections, requests, tasks, encryption keys, and rate limits.

Grafana is available with anonymous viewer access. It includes an AuthProxy app-metrics dashboard and Explore, with AuthProxy, Prometheus, Tempo, and Loki data sources.

Developer quick start

You need Git and Docker Desktop.

git clone https://github.com/rmorlok/authproxy.git
cd authproxy
docker compose --profile server up --build -d

The first run builds AuthProxy and its embedded UIs, then starts Postgres, Redis, SeaweedFS, ClickHouse, and all four AuthProxy services. Verify the API:

curl http://localhost:8081/ping

The public and Admin services use a self-signed development certificate at https://localhost:8080 and https://localhost:8082; a browser will warn until you trust it. Stop the stack with:

docker compose --profile server down

For local UI sign-in, source-mode development, alternate data stores, tests, and observability, continue with the development quick start.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Built with ❤️ by Ryan Morlok

Directories

Path Synopsis
cmd
cli command
loadtest command
server command
demos
seed/backend command
Command demo-seed prepares the disposable OAuth test provider and invokes ap apply for AuthProxy resources.
Command demo-seed prepares the disposable OAuth test provider and invokes ap apply for AuthProxy resources.
shell/backend command
Command demo-shell is the SSO stand-in host application for the AuthProxy demo environment.
Command demo-shell is the SSO stand-in host application for the AuthProxy demo environment.
shell/backend/embed
Package embed exposes the built demo-shell SPA as an embedded filesystem.
Package embed exposes the built demo-shell SPA as an embedded filesystem.
internal
apasynq/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
app_metrics/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
apredis/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
aptelemetry
Package aptelemetry initialises and tears down the OpenTelemetry SDK for AuthProxy services.
Package aptelemetry initialises and tears down the OpenTelemetry SDK for AuthProxy services.
auth_methods/api_key/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
auth_methods/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
auth_methods/no_auth
Package no_auth provides the Authenticator implementation for connectors whose auth type is AuthNoAuth — i.e.
Package no_auth provides the Authenticator implementation for connectors whose auth type is AuthNoAuth — i.e.
auth_methods/oauth2/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
cli/apply
Package apply loads declarative resource input without contacting an AuthProxy cluster.
Package apply loads declarative resource input without contacting an AuthProxy cluster.
core/setup_token
Package setup_token implements signed, one-time-use redirect tokens used by the schema-defined redirect-step machinery.
Package setup_token implements signed, one-time-use redirect tokens used by the schema-defined redirect-step machinery.
database/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
docs
Package docs contains the Swagger documentation configuration
Package docs contains the Swagger documentation configuration
encrypt/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
httpf/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
proxy
Package proxy orchestrates a single proxied request through a connection: resolve credentials via the auth method's Authenticator, send the request through the httpf client (which carries rate-limit / telemetry / request-events middleware), and on a 401 from the upstream attempt the retry-once-after-recover dance.
Package proxy orchestrates a single proxied request through a connection: resolve credentials via the auth method's Authenticator, send the request through the httpf client (which carries rate-limit / telemetry / request-events middleware), and on a 401 from the upstream attempt the retry-once-after-recover dance.
schema/registry
Package registry assembles AuthProxy's canonical resource types for callers that dispatch manifests by apiVersion and kind.
Package registry assembles AuthProxy's canonical resource types for callers that dispatch manifests by apiVersion and kind.
schema/resources/actor
Package actor defines the schema for Actor resources.
Package actor defines the schema for Actor resources.
schema/resources/connection
Package connection defines the schema for Connection resources.
Package connection defines the schema for Connection resources.
schema/resources/rate_limit
Package rate_limit defines the canonical Kubernetes-style RateLimit resource and the policy types consumed by persistence and runtime enforcement.
Package rate_limit defines the canonical Kubernetes-style RateLimit resource and the policy types consumed by persistence and runtime enforcement.
schema/resources/tools
Package tools owns authored Tool definitions and resource contracts.
Package tools owns authored Tool definitions and resource contracts.
schema/resources/toolsets
Package toolsets owns generation-addressed ToolSet resource contracts and explicit tool templates.
Package toolsets owns generation-addressed ToolSet resource contracts and explicit tool templates.
service/admin_api/swagger
Package swagger contains the Swagger documentation configuration
Package swagger contains the Swagger documentation configuration
service/api/swagger
Package swagger contains the Swagger documentation configuration
Package swagger contains the Swagger documentation configuration
test_utils
Package test_utils provides utilities for testing SQL queries and other common testing tasks.
Package test_utils provides utilities for testing SQL queries and other common testing tasks.
test_utils/connectorfixture
Package connectorfixture seeds fixed connector identities for tests.
Package connectorfixture seeds fixed connector identities for tests.
tools/httpcodec
Package httpcodec encodes rendered Tool request data without performing I/O. Its codecs are shared by authored HTTP Tools and generated request plans.
Package httpcodec encodes rendered Tool request data without performing I/O. Its codecs are shared by authored HTTP Tools and generated request plans.
tools/httpexec
Package httpexec compiles and executes an HTTP Tool after invocation admission.
Package httpexec compiles and executes an HTTP Tool after invocation admission.
tools/httphost
Package httphost sends Tool requests through one captured connection with shared invocation limits.
Package httphost sends Tool requests through one captured connection with shared invocation limits.
tools/javascript
Package javascript evaluates trusted Tool expressions with native JavaScript copies of captured invocation data.
Package javascript evaluates trusted Tool expressions with native JavaScript copies of captured invocation data.
tools/render
Package render builds tool request values from a private invocation snapshot.
Package render builds tool request values from a private invocation snapshot.
tools/validation
Package validation checks Tool arguments and successful structured output against the native schemas captured with a definition revision.
Package validation checks Tool arguments and successful structured output against the native schemas captured with a definition revision.
util/retry
Package retry provides a small generic helper for retrying operations with a caller-supplied backoff strategy and retry classifier.
Package retry provides a small generic helper for retrying operations with a caller-supplied backoff strategy and retry classifier.
terraform
provider module
tools
check-contract-casing command
Command check-contract-casing prevents AuthProxy-owned wire contracts from drifting away from lowerCamelCase.
Command check-contract-casing prevents AuthProxy-owned wire contracts from drifting away from lowerCamelCase.
ui
admin/embed
Package adminembed exposes the built admin UI as an embedded filesystem.
Package adminembed exposes the built admin UI as an embedded filesystem.
marketplace/embed
Package marketplaceembed exposes the built marketplace UI as an embedded filesystem.
Package marketplaceembed exposes the built marketplace UI as an embedded filesystem.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL