Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API_KEY argument #2026

Open
nbroad1881 opened this issue Jun 5, 2024 · 2 comments
Open

API_KEY argument #2026

nbroad1881 opened this issue Jun 5, 2024 · 2 comments

Comments

@nbroad1881
Copy link
Contributor

Feature request

TEI has the API_KEY argument:

   --api-key <API_KEY>
      Set an api key for request authorization.

      By default the server responds to every request. With an api key set, the requests must have the Authorization header set with the api key as Bearer token.

      [env: API_KEY=]

It would be nice if TGI had this as well.

Motivation

It enables custom authorization of the endpoint.

Your contribution

sry

@KevinDuffy94
Copy link
Contributor

KevinDuffy94 commented Jun 28, 2024

Adding this block in here and appending the layer should achieve this.

One negative effect of this is that the healthcheck and info endpoints get auth included.

I would propose having a slightly different approach to TEI and only adding the Auth Layer at the route level for non information endpoints. I could start a PR for this next week.

@KevinDuffy94
Copy link
Contributor

#2142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants