[GH-ISSUE #8824] Native roles+permissions implementation. #31481

Open
opened 2026-04-22 11:56:08 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @golcan on GitHub (Feb 4, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8824

Using local language models is a resource-intensive process, so it is not as simple to scale across multiple instances as it is in other cases.
This can lead to situations where multiple clients (whether human or application) with different needs can connect through the shared ollama API, which requires being able to discriminate who each client is, and what resources they have access to and what type of operations they can perform, in order to achieve adequate levels of isolation.
For this reason, I propose implementing a native scheme of configurable roles and permissions in ollama.
Regarding roles, standard roles could be provided, while allowing the addition of others. Roles could be associated with tokens, or even client certificates.
Each role would be configured with certain actions that it is allowed to perform, from being able to display the list of models, add, delete, load, use models, plus all the actions that are considered useful to include.
Thank you very much. Best regards.

Originally created by @golcan on GitHub (Feb 4, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8824 Using local language models is a resource-intensive process, so it is not as simple to scale across multiple instances as it is in other cases. This can lead to situations where multiple clients (whether human or application) with different needs can connect through the shared ollama API, which requires being able to discriminate who each client is, and what resources they have access to and what type of operations they can perform, in order to achieve adequate levels of isolation. For this reason, I propose implementing a native scheme of configurable roles and permissions in ollama. Regarding roles, standard roles could be provided, while allowing the addition of others. Roles could be associated with tokens, or even client certificates. Each role would be configured with certain actions that it is allowed to perform, from being able to display the list of models, add, delete, load, use models, plus all the actions that are considered useful to include. Thank you very much. Best regards.
GiteaMirror added the feature request label 2026-04-22 11:56:08 -05:00
Author
Owner

@rick-github commented on GitHub (Feb 4, 2025):

The usual approach to this is to use a proxy, eg ollama_proxy_server, lilellm, nginx.

<!-- gh-comment-id:2634483859 --> @rick-github commented on GitHub (Feb 4, 2025): The usual approach to this is to use a proxy, eg [ollama_proxy_server](https://github.com/ParisNeo/ollama_proxy_server), [lilellm](https://github.com/BerriAI/litellm), [nginx](https://nginx.org/en/).
Author
Owner

@golcan commented on GitHub (Feb 4, 2025):

The usual approach to this is to use a proxy, eg ollama_proxy_server, lilellm, nginx.

Thank you very much for your answer, you are very kind.
I apologize in advance if I'm misunderstanding, but that way the protection is being transferred to the proxy. That doesn't prevent attackers who manages to get into ollama from having any kind of isolation. That's why I still think that having a native scheme would be the ultimate approach.

<!-- gh-comment-id:2634644853 --> @golcan commented on GitHub (Feb 4, 2025): > The usual approach to this is to use a proxy, eg [ollama_proxy_server](https://github.com/ParisNeo/ollama_proxy_server), [lilellm](https://github.com/BerriAI/litellm), [nginx](https://nginx.org/en/). Thank you very much for your answer, you are very kind. I apologize in advance if I'm misunderstanding, but that way the protection is being transferred to the proxy. That doesn't prevent attackers who manages to get into ollama from having any kind of isolation. That's why I still think that having a native scheme would be the ultimate approach.
Author
Owner

@rick-github commented on GitHub (Feb 4, 2025):

Then you implement access policies that only allow access via the proxy.

<!-- gh-comment-id:2634649754 --> @rick-github commented on GitHub (Feb 4, 2025): Then you implement access policies that only allow access via the proxy.
Author
Owner

@golcan commented on GitHub (Feb 4, 2025):

Then you implement access policies that only allow access via the proxy.

Yes, indeed. It still implies that the proxy can be vulnerable and its restrictions skipped.
That's why I think that ollama should include the ultimate protection, as every software that exposes information that could be critical.
Thank you again.

<!-- gh-comment-id:2634665816 --> @golcan commented on GitHub (Feb 4, 2025): > Then you implement access policies that only allow access via the proxy. Yes, indeed. It still implies that the proxy can be vulnerable and its restrictions skipped. That's why I think that ollama should include the ultimate protection, as every software that exposes information that could be critical. Thank you again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#31481