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

[Feature Request] Basic Auth for elasticsearch connection #73

Closed
TheOneValen opened this issue Oct 27, 2021 · 7 comments
Closed

[Feature Request] Basic Auth for elasticsearch connection #73

TheOneValen opened this issue Oct 27, 2021 · 7 comments

Comments

@TheOneValen
Copy link

Hi!

When you setup elasticsearch centrally it is recommended to setup security via basic auth.

I propose a configuration (environment variables) for basic auth username and password for connecting to an es instance.

Have a nice day!

@bbilly1
Copy link
Member

bbilly1 commented Oct 28, 2021

Yes, I've been working on the access control functionalities for the next release. There are quite a few places that are making calls to elasticsearch. :-)

I don't know how many people want to run selfhosted elasticsearch with a custom username, but I guess, that could be added as an optional environment variable and default to elastic if it's not set. And then it's just pythons requests library to take the auth tuple, that's quite straight forward.

I'll look into it.

@TheOneValen
Copy link
Author

From a software architecture point of view: there should be an abstraction covering all calls to elasticsearch. That way you'll need to change only one point when doing something like this.

e.g. make a class that encapsulates all calls to elasticsearch (with semantic naming of methods). That way one can also replace the database backend (if need arises).

@bbilly1
Copy link
Member

bbilly1 commented Oct 28, 2021

Yes, ideally. Something to look at again further down the road.

@bbilly1
Copy link
Member

bbilly1 commented Nov 1, 2021

OK, this is now merged in v0.0.7.

@bbilly1 bbilly1 closed this as completed Nov 1, 2021
@TheOneValen
Copy link
Author

Works! Thank you. Finally got a chance to try it out and I like it. I have a lot of ideas, are feature requests the way to go here?

I have my ES instance running via https which is signed by my own PKI. I would like to provide documentation how I did that, where would I put that?

@bbilly1
Copy link
Member

bbilly1 commented Nov 2, 2021

Hmm, maybe it's a good idea to have a discussion thread for "feature requests"? I have started one here at #80, let's see how this goes there.

For your ES setup, that sounds very specific for your architecture. Maybe you have a link to the official documentation of elasticsearch? Then that could be a link here. Or this could also be a write up on your profile in a repo belonging to you that you maintain and then this could be linked here?

@TheOneValen
Copy link
Author

OK, I'll look at the discussion.

Maybe you can open a section in your wiki like "Recipes" or FAQ or something like this? This is about running the tubearchivist image.

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