[Proposal] Approach for attaching backend security for AI Gateway #2846
Thenujan-Nagaratnam
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Why we need this
Currently, the AI Gateway only supports api-key for backend authentication. This works by attaching the set-headers policy with a configured header and value.
The problem with this approach is that it doesn't scale: introducing a new auth scheme requires a gateway-level change to support it, and patching an existing auth scheme means changing both the policy and the gateway.
The proposed solution is a generalized way to attach any auth scheme, so that policy-level changes never require a gateway-level change. upstream.auth will be updated to support this via one of the following patterns:
Option 01 - Use a first-class auth scheme built into the gateway
Option 02 - Use a first-class auth scheme, but pin a specific policy name/version (e.g. a newer major version, or a fork of the built-in policy)
Option 03 - Attach a fully custom auth policy (not one of the first-class supported types)
All reactions