onyx icon indicating copy to clipboard operation
onyx copied to clipboard

Feature request: Allow basic auth in community edition

Open photonn opened this issue 1 year ago • 2 comments

Would be nice to use just basic auth (with users stored in postgres) for authentication against Danswer. I know that basic auth is supporte in the backend, but a UI page to create and delete users would be nice.

photonn avatar Nov 30 '23 12:11 photonn

I'd love this as well. To add some context, I have some pages behind a 1) firewall, and 2) oauth / token credential that I'd love to index. Allowing folks to add something like a header, basicauth or a cooke to be passed in to those requests, would be fantastical!

Tangentially - another option is to be able to restrict the scanning to a single file within the given adapters. For example - the two files that I'm interested in indexing are a single file in github - so being able to pick a repo and JUST that file would be fantastic (same with like, the confluence connector)

evin-bz avatar Dec 07 '23 20:12 evin-bz

Hey @photonn, just wanted to let you know that initial support for this is now in with https://github.com/danswer-ai/danswer/pull/879! This PR allows for signup, login, and email verification (see screenshot below for an idea of what it looks like). User deletion / a UI to control allowed emails / password reset to come!

As an FYI, for now the best way to restrict access would be to enable email verification and (1) use the VALID_EMAIL_DOMAINS env variable to restrict signups to your company domain OR (2) use the USER_WHITELIST_FILE (https://github.com/danswer-ai/danswer/blob/main/backend/danswer/auth/users.py#L58) to explicitly allow certain email addresses.

image

Weves avatar Dec 26 '23 08:12 Weves

Closing as this is completed! Huzzah! One thing that is probably a necessary addition at some point for this is password reset. We have it on our radar.

@evin-bz we haven't gotten the chance to know you. We would love to hear from you about your use case and how Danswer has been performing for you! If you're open to it, we’d love to hear from you in our Slack or Discord! Alternatively if you want to have a quick chat with the maintainer (Chris and myself), you can just select a time on my Cal

yuhongsun96 avatar Jan 09 '24 06:01 yuhongsun96

Thank you all. Much apreciated.

photonn avatar Jan 09 '24 08:01 photonn