fix(handle_jwt.py): remove issuer check

This commit is contained in:
Krrish Dholakia 2024-03-20 08:33:38 -07:00
parent 909883ee04
commit ca970a90c4
2 changed files with 4 additions and 4 deletions

View file

@ -10,9 +10,10 @@ This is a new feature, and subject to changes based on feedback.
## Step 1. Set env's ## Step 1. Set env's
- `JWT_PUBLIC_KEY_URL`: This is the public keys endpoint of your OpenID provider. Typically it's `{openid-provider-base-url}/.well-known/openid-configuration/jwks`. For Keycloak it's `{keycloak_base_url}/realms/{your-realm}/protocol/openid-connect/certs`.
```bash ```bash
export JWT_PUBLIC_KEY_URL="" # "http://localhost:8080/realms/test-litellm-proxy/protocol/openid-connect/certs" export JWT_PUBLIC_KEY_URL="" # "https://demo.duendesoftware.com/.well-known/openid-configuration/jwks"
export JWT_ISSUER="" # http://localhost:8080/realms/test-litellm-proxy
``` ```
## Step 2. Create JWT with scopes ## Step 2. Create JWT with scopes
@ -22,7 +23,7 @@ Create a client scope called `litellm_proxy_admin` in your OpenID provider (e.g.
Grant your user, `litellm_proxy_admin` scope when generating a JWT. Grant your user, `litellm_proxy_admin` scope when generating a JWT.
```bash ```bash
curl --location 'http://{base_url}/realms/{your-realm}/protocol/openid-connect/token' \ curl --location ' 'https://demo.duendesoftware.com/connect/token'' \
--header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id={CLIENT_ID}' \ --data-urlencode 'client_id={CLIENT_ID}' \
--data-urlencode 'client_secret={CLIENT_SECRET}' \ --data-urlencode 'client_secret={CLIENT_SECRET}' \

View file

@ -103,7 +103,6 @@ class JWTHandler:
public_key, # type: ignore public_key, # type: ignore
algorithms=["RS256"], algorithms=["RS256"],
audience="account", audience="account",
issuer=os.getenv("JWT_ISSUER"),
) )
return payload return payload