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

Adding username and password params to connection #1030

Merged

Conversation

levijackson
Copy link
Contributor

Adding username and password params to connection (#949)

I wanted to write functional or at the very least unit tests for Transport\HttpTest.php but I'm unsure the best way to do that. I figured
... a functional test would require a second Elasticsearch instance to test against.
... a unit test isn't possible without pulling the curl_ commands into a wrapper class. I didn't want to blow the scope of this up though.

@@ -38,6 +38,8 @@ class Client
'log' => false,
'retryOnConflict' => 0,
'bigintConversion' => false,
'username' => null,
Copy link
Owner

Choose a reason for hiding this comment

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

I was first thinking if we should better add this inside the connections. But that would mean setting it up for each connection. I think it can be expected that all elasticsearch nodes have the same users so I'm happy to have it hear.

@ruflin
Copy link
Owner

ruflin commented Jan 12, 2016

Yeah, it would probably need either an nginx setup or an elasticsearch node with shield. I'm fine with the current tests as long as you tested it manually?

@levijackson
Copy link
Contributor Author

Ok. Yep, I tested it manually with a server that required credentials as well as one that does not require credentials.

ruflin added a commit that referenced this pull request Jan 12, 2016
…entials

Adding username and password params to connection
@ruflin ruflin merged commit f35835e into ruflin:master Jan 12, 2016
@ruflin
Copy link
Owner

ruflin commented Jan 12, 2016

Merged. Thanks.

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

2 participants