No description
  • Go 96.7%
  • Makefile 2.2%
  • Shell 0.8%
  • Dockerfile 0.2%
Find a file
Hunter Egnatis 1abae0a475
Some checks are pending
Lint / Run on Ubuntu (push) Waiting to run
E2E Tests / Run on Ubuntu (push) Waiting to run
Tests / Run on Ubuntu (push) Waiting to run
Merge pull request 'ci: repo-declared CI scaffold (lab/automation#9)' (#62) from ci/repo-declared-scaffold into master
Reviewed-on: #62
2026-09-23 19:39:48 +00:00
.ci ci: add repo-declared CI scaffold (.ci/ kustomization + tag-build sensor) 2026-09-23 15:22:28 -04:00
.devcontainer init 2026-09-01 08:37:03 -04:00
.github/workflows init 2026-09-01 08:37:03 -04:00
.opencode/plugins fix: migrate gotoolchain plugin to the OpenCode V2 plugin API 2026-09-18 16:30:17 -04:00
api fix: bound the OIDC Check-path refresh to the gateway's ext_authz budget 2026-09-20 15:37:54 -04:00
cmd fix: 4-gate readiness + IdP connection warm-up + availability on the App 2026-09-16 15:38:16 -04:00
config fix: bound the OIDC Check-path refresh to the gateway's ext_authz budget 2026-09-20 15:37:54 -04:00
deployments/kustomization deployments: pin image to v0.1.2 2026-09-20 23:29:56 -04:00
docs docs: add the protecting-an-existing-app guide and its AGENTS.md pointer 2026-09-20 15:50:06 -04:00
hack init 2026-09-01 08:37:03 -04:00
internal fix: re-validate the callback returnTo against the App's hostnames 2026-09-20 15:50:06 -04:00
test add static services + route-referencedgrant controller: cross-namespace backendref authorization 2026-09-15 00:08:29 -04:00
.custom-gcl.yml init 2026-09-01 08:37:03 -04:00
.dockerignore init 2026-09-01 08:37:03 -04:00
.gitignore init 2026-09-01 08:37:03 -04:00
.golangci.yml init 2026-09-01 08:37:03 -04:00
AGENTS.md docs: add the protecting-an-existing-app guide and its AGENTS.md pointer 2026-09-20 15:50:06 -04:00
CONTEXT.md docs: ADRs 0012/0013 + glossary for the public-client + trio effort 2026-09-15 20:49:06 -04:00
Dockerfile init 2026-09-01 08:37:03 -04:00
go.mod feat: request-ID based logging and structured JSON logging defaults 2026-09-16 02:19:50 -04:00
go.sum Merge t37-e2e: land #33/#34/#36/#37 on master 2026-09-15 20:51:50 -04:00
Makefile pin gotoolchain to go1.26.0: makefile, agents doc, opencode plugin 2026-09-13 20:42:48 -04:00
PROJECT Run kubebuild for types, clean up adrs 2026-09-07 22:07:35 -04:00
README.md align adrs, context, readme with current api names 2026-09-09 22:45:31 -04:00
skaffold.yaml deploy: add deployments/kustomization as the single deploy source 2026-09-20 22:44:13 -04:00
Taskfile.yaml chore: fix Taskfile parse error in release task desc 2026-09-20 23:01:00 -04:00

authz-bridge

Gateway-agnostic auth configuration for ext_authz callouts. Lets each application protect its backends (API servers, web servers, dashboards) behind any Gateway API implementation that supports the GEP-1494 ExternalAuth filter.

Description

authz-bridge answers ext_authz Check callouts from the gateway and enforces per-App authentication, so each protected service decides how its traffic is authenticated without gateway-specific config.

  • Bridge: a process that runs in the controller-manager pod as one binary alongside the controller, sharing in-memory state. It exposes three fixed endpoints: plain HTTP :8082 (callback/logout), gRPC ext_authz :8083 (OIDC Flow), gRPC ext_authz :8084 (Exchange Flow, RFC 8693).
  • CRDs: providers.v1alpha1.OauthClient (the per-App client configuration: clientID + basic secret, the IdP-registered callbackURLs, the App's hostnames), oauth.v1alpha1.OidcPolicy (session, injection, and logout behavior), oauth.v1alpha1.TokenExchangePolicy (clientRef + scopes).
  • App resolution: the backend resolves request→App from the request's Host against each Client's declared hostnames (one App per hostname).
  • Auth selection: lives in user-owned HTTPRoutes — match clauses direct traffic at the right bridge endpoint. authz-bridge never creates or mutates Routes.

See CONTEXT.md for the glossary and docs/adr/ for the decisions behind the design.

Getting Started

Prerequisites

  • go version v1.24.6+
  • docker version 17.03+.
  • kubectl version v1.11.3+.
  • Access to a Kubernetes v1.11.3+ cluster.

To Deploy on the cluster

Build and push your image to the location specified by IMG:

make docker-build docker-push IMG=<some-registry>/authz-bridge:tag

NOTE: This image ought to be published in the personal registry you specified. And it is required to have access to pull the image from the working environment. Make sure you have the proper permission to the registry if the above commands dont work.

Install the CRDs into the cluster:

make install

Deploy the Manager to the cluster with the image specified by IMG:

make deploy IMG=<some-registry>/authz-bridge:tag

NOTE: If you encounter RBAC errors, you may need to grant yourself cluster-admin privileges or be logged in as admin.

Create instances of your solution You can apply the samples (examples) from the config/sample:

kubectl apply -k config/samples/

NOTE: Ensure that the samples has default values to test it out.

To Uninstall

Delete the instances (CRs) from the cluster:

kubectl delete -k config/samples/

Delete the APIs(CRDs) from the cluster:

make uninstall

UnDeploy the controller from the cluster:

make undeploy

Project Distribution

Following the options to release and provide this solution to the users.

By providing a bundle with all YAML files

  1. Build the installer for the image built and published in the registry:
make build-installer IMG=<some-registry>/authz-bridge:tag

NOTE: The makefile target mentioned above generates an 'install.yaml' file in the dist directory. This file contains all the resources built with Kustomize, which are necessary to install this project without its dependencies.

  1. Using the installer

Users can just run 'kubectl apply -f ' to install the project, i.e.:

kubectl apply -f https://raw.githubusercontent.com/<org>/authz-bridge/<tag or branch>/dist/install.yaml

By providing a Helm Chart

  1. Build the chart using the optional helm plugin
kubebuilder edit --plugins=helm/v2-alpha
  1. See that a chart was generated under 'dist/chart', and users can obtain this solution from there.

NOTE: If you change the project, you need to update the Helm Chart using the same command above to sync the latest changes. Furthermore, if you create webhooks, you need to use the above command with the '--force' flag and manually ensure that any custom configuration previously added to 'dist/chart/values.yaml' or 'dist/chart/manager/manager.yaml' is manually re-applied afterwards.

Contributing

Bug reports and pull requests are welcome via the repository's issue tracker.

NOTE: Run make help for more information on all potential make targets

More information can be found via the Kubebuilder Documentation

License

Copyright 2026.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.