splunk / splunk-sdk-ruby

Splunk Software Development Kit for Ruby
http://dev.splunk.com
Apache License 2.0
36 stars 21 forks source link

added support for HTTP Basic Authentication, bumped version #43

Closed thanasisk closed 9 years ago

thanasisk commented 9 years ago

added support for HTTP(S) Basic authentication. Basically, when creating a context configuration, if you specify basic, it will automatically generate the correct Authorization header, that will take the place of Spunk token authentication.

I have signed the contributor agreement.

If you see something that you do not like in this PR, let me know and I will do my best to address your comments. As this is required for production use in the day job, I would really appreciate a fast response.

itay commented 9 years ago

@thanasisk overall looks great. A few minor comments:

  1. Consider changing the doc comment for the new parameter.
  2. Could you add a test for this functionality? It could look something like: a. Create a new user with a specific username/password b. Create a new Service with that username/password and basic=True c. Make sure basic auth works.
  3. You should consider making login a no-op when this is set.
thanasisk commented 9 years ago

Hello, thanks for the quick feedback. I have addressed your comments.

thanasisk commented 9 years ago

addressed - how far away we are from merging this PR?

shakeelmohamed commented 9 years ago

Thanks @thanasisk! I've merged it in. It may take a bit for us to release the changes. If this is urgent for you, we can prioritize the release.