[GH-ISSUE #16655] feat: ENABLE_API_KEY admin only #33525

Closed
opened 2026-04-25 07:26:11 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @ncecere on GitHub (Aug 16, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16655

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I have started work on a terraform provider for open web ui. I'm not sure if this is possible but having the ability for lock down the api to Admin only API keys would be great. Or the abilty to target endpoints to roles. like..

API_KEY_ALLOWED_ENDPOINTS_ADMIN

API_KEY_ALLOWED_ENDPOINTS_USER

If this exists or is already possible I haven't seen it documented

Desired Solution you'd like

Ability to lock the API down to Admin Keys only

API_KEY_ALLOWED_ENDPOINTS_ADMIN

API_KEY_ALLOWED_ENDPOINTS_USER

Alternatives Considered

Ability to define API endpoints by user Role

API_KEY_ALLOWED_ENDPOINTS_ADMIN

API_KEY_ALLOWED_ENDPOINTS_USER

Additional Context

No response

Originally created by @ncecere on GitHub (Aug 16, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16655 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I have started work on a terraform provider for open web ui. I'm not sure if this is possible but having the ability for lock down the api to Admin only API keys would be great. Or the abilty to target endpoints to roles. like.. API_KEY_ALLOWED_ENDPOINTS_ADMIN API_KEY_ALLOWED_ENDPOINTS_USER If this exists or is already possible I haven't seen it documented ### Desired Solution you'd like Ability to lock the API down to Admin Keys only API_KEY_ALLOWED_ENDPOINTS_ADMIN API_KEY_ALLOWED_ENDPOINTS_USER ### Alternatives Considered Ability to define API endpoints by user Role API_KEY_ALLOWED_ENDPOINTS_ADMIN API_KEY_ALLOWED_ENDPOINTS_USER ### Additional Context _No response_
Author
Owner

@Ark-Levy commented on GitHub (Sep 11, 2025):

@tjbck can you tell me more about why you chose to close this issue ?

I would like to create technical api keys in admin the pannel. My purpose is to purge data automaticly via api.
I don't want my users to use api keys.

Do you think it is a good idea ?

<!-- gh-comment-id:3281285840 --> @Ark-Levy commented on GitHub (Sep 11, 2025): @tjbck can you tell me more about why you chose to close this issue ? I would like to create technical api keys in admin the pannel. My purpose is to purge data automaticly via api. I don't want my users to use api keys. Do you think it is a good idea ?
Author
Owner

@Classic298 commented on GitHub (Sep 11, 2025):

users can always use the API anyways (and only the user endpoints / endpoints they have access to)

for purging data / pruning data (you mean #16520 ? or what do you mean?)

<!-- gh-comment-id:3281780212 --> @Classic298 commented on GitHub (Sep 11, 2025): users can always use the API anyways (and only the user endpoints / endpoints they have access to) for purging data / pruning data (you mean #16520 ? or what do you mean?)
Author
Owner

@Ark-Levy commented on GitHub (Sep 12, 2025):

@Classic298 If ApiKey is disabled in admin pannel, no one can use the key.
I want to allow admin only keys. I'll check yout issue #16520

<!-- gh-comment-id:3284040993 --> @Ark-Levy commented on GitHub (Sep 12, 2025): @Classic298 If ApiKey is disabled in admin pannel, no one can use the key. I want to allow admin only keys. I'll check yout issue #16520
Author
Owner

@Classic298 commented on GitHub (Sep 14, 2025):

I understand. I think a setting via env var and perhaps also a toggle in the admin panel can easily be implemented, do you want to create a PR for this?

<!-- gh-comment-id:3289401002 --> @Classic298 commented on GitHub (Sep 14, 2025): I understand. I think a setting via env var and perhaps also a toggle in the admin panel can easily be implemented, do you want to create a PR for this?
Author
Owner

@brtptrs commented on GitHub (Oct 27, 2025):

It would be great if ENABLE_API_KEY could be set via group permissions

<!-- gh-comment-id:3449996471 --> @brtptrs commented on GitHub (Oct 27, 2025): It would be great if ENABLE_API_KEY could be set via group permissions
Author
Owner

@brtptrs commented on GitHub (Oct 29, 2025):

I found this pr
https://github.com/open-webui/open-webui/pull/18336#issue-3514781852

It would be great if ENABLE_API_KEY could be set via group permissions

<!-- gh-comment-id:3461116718 --> @brtptrs commented on GitHub (Oct 29, 2025): I found this pr https://github.com/open-webui/open-webui/pull/18336#issue-3514781852 > It would be great if ENABLE_API_KEY could be set via group permissions
Author
Owner

@R-Rausch commented on GitHub (Oct 29, 2025):

It would be great if ENABLE_API_KEY could be set via group permissions, which would make things easier for everyone.

<!-- gh-comment-id:3461315119 --> @R-Rausch commented on GitHub (Oct 29, 2025): It would be great if ENABLE_API_KEY could be set via group permissions, which would make things easier for everyone.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#33525