-
Notifications
You must be signed in to change notification settings - Fork 268
Add simple basic auth system #589
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
Conversation
jnioche
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR, see comments
jnioche
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, much appreciated.
| import org.apache.http.util.Args; | ||
| import org.apache.http.util.ByteArrayBuffer; | ||
| import org.apache.storm.Config; | ||
| import org.apache.storm.shade.org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather we relied on non-shaded dependencies - snakeyaml is in our pom already - or even better on the standard Java classes e.g. https://docs.oracle.com/javase/8/docs/api/java/util/Base64.Encoder.html
| defaultHeaders.add(new BasicHeader("Accept", accept)); | ||
| } | ||
|
|
||
| boolean useBasicAuth = ConfUtils.getBoolean(conf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having a separate configuration for activating or deactivating the authentication, what about checking if http.basicauth.user is not null? If it is set, we use it. That would keep things simpler.
|
Thanks for the review, I adjusted the code accordingly, |
|
Thanks @pierrehts. I have modified https://github.com/DigitalPebble/storm-crawler/wiki/Protocols to indicate that httpclient has a mechanism for basic authentication. I can give you write access to the WIKI if you want to update https://github.com/DigitalPebble/storm-crawler/wiki/Configuration. |
|
Thanks for accepting the PR. Please, give me write access to the WIKI, I'll produce documentation for the new properties. |
|
Hi @pierrehts, have sent you an invite to become a collaborator. You should be able to write to the WIKI after that. |
Hello,
This is a simple basic auth system that allow user to add these parameters into the yaml configuration :
This way it allows stormcrawler to be used in most of the intranets.
If this PR is accepted I'll produce the associated documentation .
Thanks