mp911de / logstash-gelf

Graylog Extended Log Format (GELF) implementation in Java for all major logging frameworks: log4j, log4j2, java.util.logging, logback, JBossAS7 and WildFly 8-12
http://logging.paluch.biz
MIT License
425 stars 102 forks source link

Basic authentication to graylog server #194

Closed chka73 closed 3 years ago

chka73 commented 5 years ago

Version 1.13.0

Documentation request/ feature request.

Looking for information about if I can configure the Gelf appender to use basic authentication to our Graylog server?

mp911de commented 5 years ago

Have you tried adding credentials to the HTTP url (http://user:pass@server)?

chka73 commented 5 years ago

Yes. Tried that as first choice. Getting a 401 response from server though so my guess was that the user part of the URL was stripped in some step?

mp911de commented 5 years ago

We had once a ticket #150 to add basic auth, but we never followed up on that one. So currently, there is no basic authentication support.

cchet commented 5 years ago

@mp911de I would like to implement that

mp911de commented 5 years ago

Feel free to give it a spin. Make sure to stay Java 6-compatible.

arvidvillen commented 4 years ago

Any updates on this?

mp911de commented 4 years ago

Pull requests are welcome!

arvidvillen commented 4 years ago

Hi, Is java 6 still a requirement? Do you think DatatypeConverter could be used for base64 encoding?

mp911de commented 4 years ago

That one comes from the JAXB package. Currently, the baseline is Java 1.7. It’s fine if we ship our own Base64 implementation as package-private utility. Ideally, we an find a source that is as well under MIT license to not violate any license terms.

arvidvillen commented 4 years ago

Do you think we could use this one? https://github.com/chdh/base64coder-java/blob/master/src/main/java/biz/source_code/base64Coder/Base64Coder.java

mp911de commented 4 years ago

The referenced code should be fine. Feel free to come up with a PR. We should keep the Base64 support package-private and make sure to include the full license header to preserve its origin.