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

changed: auth ollama connection #2336

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

changed: auth ollama connection #2336

wants to merge 10 commits into from

Conversation

Haunui
Copy link

@Haunui Haunui commented May 17, 2024

Pull Request Checklist

  • Target branch: Pull requests should target the dev branch.
  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for the changes?
  • Code Review: Have you self-reviewed your code and addressed any coding standard issues?

Description

Add support for ollama connection that require a token access. The token can be set with the environment variable OLLAMA_AUTH_KEY or in the connection settings.


Changelog Entry

Added

  • Optional environment variables OLLAMA_AUTH_KEY and OLLAMA_AUTH_KEYS to set access token
  • Option to set access token in connections settings

Fixed

  • In ollama router, improve ollama response checking for get_ollama_versions(...) (route /api/version) and get_all_models() methods to avoid errors

Changed

  • Use token access for ollama connection

Additional Information

video-haunui-ok

Issue : #2305

@timoa
Copy link

timoa commented May 21, 2024

If you use another solution like Cloudflare Zero Trust to protect Ollama from outside (in a private subnet in AWS for ex.), you need to add two HTTP headers (CF-Access-Client-Id & CF-Access-Client-Secret). Is there a way to add multiple headers instead of static? Sorry if it's too late for this PR. I'm pretty sure that it will be useful for multiple authentication. Cheers!

@justinh-rahb
Copy link
Collaborator

Hello @Haunui! I appreciate and support the work you've contributed here. We've had 2 major releases in the last two weeks, I just wanted to check in to see if you're still willing to get this PR brought up to current dev branch base and finish it. If it's easier to close and open a new one, that's ok too.

@Kavan72
Copy link

Kavan72 commented Jun 5, 2024

I can help on this PR if you want.
cc. @Haunui @justinh-rahb

@Haunui
Copy link
Author

Haunui commented Jun 7, 2024

@timoa I think thats a good idea. But I don't have the time and ressources to work on this features.

@Haunui
Copy link
Author

Haunui commented Jun 7, 2024

Hello @justinh-rahb, sorry for the late answer.
The PR is ready and can now be pushed to the current dev branch.

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

Successfully merging this pull request may close these issues.

None yet

4 participants