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

Support authentication on the level of ElasticClient #3124

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

igor-vovk
Copy link
Contributor

@igor-vovk igor-vovk commented Aug 8, 2024

Addresses #3122. I copied authentication settings that were introduced in http4s PR #3118, will be happy to remove them from http4s PR after this will be merged.

Also, they are now can be removed from AkkaHttpClient, that also implements adding credentials by itself.

By defining credentials on the ElasticClient level there is now a single place where credentials are used, so there is no need to rely on client-specific implementations of credential passing.

@igor-vovk igor-vovk force-pushed the add-authorization branch 2 times, most recently from 064153b to b1a4292 Compare August 12, 2024 18:21
Copy link
Owner

@Philippus Philippus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add some tests for the different cases?

@igor-vovk
Copy link
Contributor Author

igor-vovk commented Nov 4, 2024

Sorry @Philippus I haven't added tests yet. I was thinking whether I should make an IT-test, e.g. try to setup a credentials in ES, and then test against it, or just do a unit test? I was kind of blocked by not being able to choose, maybe you could share what would be the preferred way? Will be happy to add tests after ☺️

@Philippus
Copy link
Owner

Sorry @Philippus I haven't added tests yet. I was thinking whether I should make an IT-test, e.g. try to setup a credentials in ES, and then test against it, or just do a unit test? I was kind of blocked by not being able to choose, maybe you could share what would be the preferred way? Will be happy to add tests after ☺️

I think ideally, set up an Elasticsearch test container requiring credentials and test against that. But I don't know how easy it would be to set that up. I'm fine with someone adding that in a later PR.

@Philippus Philippus merged commit f96e357 into Philippus:main Nov 7, 2024
3 checks passed
@igor-vovk igor-vovk deleted the add-authorization branch November 8, 2024 17:00
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.

2 participants