-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Enhancement] HTTP output with mutual TLS auth #43
Comments
@mkazlouski Could you take a look? #44 |
@cosmo0920 Looking great to me. I've tried it using the following docker image: FROM golang:1.11-alpine3.9 as builder
RUN \
apk add --no-cache --update \
git \
openssl \
&& git clone https://github.com/joekir/mTLS-Tests \
&& cd mTLS-Tests \
&& GOPATH=$PWD go build -o /bin/server server.go \
&& mkdir /certs \
&& cd /certs \
&& openssl genrsa -out server.key 4096 \
&& openssl req -new -x509 -sha256 -key server.key -out server.crt -days 365 -subj "/C=NL/ST=Zuid Holland/L=Rotterdam/O=Sparkling Network/OU=IT Department/CN=127.0.0.1" \
&& openssl genrsa -out client.key 4096 \
&& openssl req -new -key client.key -out client.csr -subj "/C=NL/ST=Zuid Holland/L=Rotterdam/O=Sparkling Network/OU=Remote Location/CN=127.0.0.1" \
&& echo "00" > file.srl \
&& openssl x509 -req -in client.csr -CA server.crt -CAkey server.key -CAserial file.srl -out client.crt
FROM fluent/fluentd:v1.4.2-1.0
USER root
RUN \
apk add --no-cache --update --virtual .build-deps \
build-base \
ruby-dev \
git \
&& git clone https://github.com/fluent-plugins-nursery/fluent-plugin-out-http \
&& cd fluent-plugin-out-http \
&& git fetch origin pull/44/head:44 \
&& git checkout 44 \
&& fluent-gem build fluent-plugin-out-http.gemspec \
&& fluent-gem install --no-ri --no-rdoc \
fluent-plugin-out-http-*.gem \
&& rm -rf fluent-plugin-out-http \
&& gem sources --clear-all \
&& apk del .build-deps \
&& rm -rf /home/fluent/.gem/ruby/2.5.0/cache/*.gem
COPY --from=builder /bin/server /bin/
COPY --from=builder /certs/* /certs/
COPY fluentd-mtls.conf /fluentd/etc/fluentd.conf
CMD [ \
"/bin/sh", "-c", \
"fluentd -c /fluentd/etc/fluentd.conf -vvv & server" \
] with the following config called fluentd-mtls.conf:
and it works like a charm. What I'm doing there is I'm building the fluentd image with the set of certs: a self-signed server one and a client one signed with the server one as a CA, and a test HTTP server which only accepts connections from clients with valid client certificate. I'm then emitting dummy events with tags Thanks a lot for your time! |
Problem
Referring to: fluent/fluentd#1879
I'd like to ask for similar functionality in
out_http
.Steps to replicate
None (feature request).
Expected Behavior or What you need to ask
Using Fluentd and out_http plugin versions
fluentd 1.4.0
1.1.7
The text was updated successfully, but these errors were encountered: