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

Verify client certificates against CA #8

Closed
andrenarchy opened this issue Oct 27, 2015 · 17 comments
Closed

Verify client certificates against CA #8

andrenarchy opened this issue Oct 27, 2015 · 17 comments
Assignees

Comments

@andrenarchy
Copy link

Currently, the beats input does not verify the client certificate against the CA. This means that any client can connect to any logstash server and submit arbitrary data. Besides cluttering the logstash server with meaningless data, attackers could try to take servers down by submitting huge amounts of data.

Analogous to filebeat/logstash-forwarder, the client certificate should be checked against the CA on the server side.

See also logstash-plugins/logstash-input-lumberjack#31.

@klj613
Copy link

klj613 commented Oct 29, 2015

+1

ph pushed a commit to ph/logstash-input-beats that referenced this issue Nov 19, 2015
@AndreasWurm
Copy link

indeed, stumbled over this too. In Filebeat you can set the accepted CAs and cipher suites.
The same should be true for the receiving end.

@bobelev
Copy link

bobelev commented Dec 31, 2015

+1

@runningman84
Copy link

This seems to be an important issue, if you want to drop lumberjack in the future you should at least have the same kind of security with beats.

Funny enough filebeat already supports using a client certificate. Logstash filebeat input just fails to validate it.

Please add this option:

ssl_client_cert_check

@jordansissel
Copy link
Contributor

@runningman84 I don't think the lumberjack input does validation (on the logstash input side) of client certificates - the original threat model was to protect data leaks (so lsf doesn't ship to untrusted servers). There's been enough requests for client authentication via certificate that it's worth adding this feature, so I agree. Hope the background helps.

@acchen97
Copy link

+1 on implementing this, /cc @suyograo

@ghost
Copy link

ghost commented Feb 5, 2016

+1 For me this is a major security fault and should be implemented as soon as possible

@ravi412
Copy link

ravi412 commented Feb 11, 2016

+1 . We are planning a large-scale install of filebeat on 1000+ machines hence this is a critical feature.

@ph
Copy link
Contributor

ph commented Feb 13, 2016

I am starting to look at this following the use cases defined in logstash-plugins/logstash-input-lumberjack#31

@rjes
Copy link

rjes commented Feb 19, 2016

+1
Since we would like to send log from instances in iaas/paas locations where we can't setup ip-filters this feature is very crucial for us.

@acchen97
Copy link

Thanks for the feedback, we're targeting this within a short-term release.

@erikswanson
Copy link

When this gets implemented, can we please have access to information about the client certificate? I want to be able to trace an event to what client certificate was used to send it to Logstash.

@ph
Copy link
Contributor

ph commented Mar 1, 2016

When this gets implemented, can we please have access to information about the client certificate? I want to be able to trace an event to what client certificate was used to send it to Logstash.

The event already contains the information about the shippe (which should be similar from the certificate)? Is that enough? What is your use case here?

@erikswanson
Copy link

The event already contains the information about the shippe (which should be similar from the certificate)? Is that enough? What is your use case here?

I need attribution of events to shippers to be absolute under the assumption of a malicious or compromised shipper that wants to impersonate other shippers (whether valid or invalid). Hence, ideally, a logstash rule that puts information about the verified client ceritificate into the event instead of trusting origin information put into the event itself by the shipper.

ph added a commit to ph/logstash-input-beats that referenced this issue Mar 9, 2016
This PR introduce client verification when using `ssl`, when using this
option you need to specify the **Certificate Authority** using the
`ssl_certificate_authorities` option, this configuration take a
certificate to validate the client with it. You also need to specify a
`ssl_verify_mode`, If you want strict ssl verification use `force_peer`,
with this value if the client doesn't provide a valid certificate the
plugins will refuse the client.

On Filebeat you need to configure the client to declare a certificate using
theses options.

```
tls:
  certificate_authorities: ["/etc/server.crt"]
  certificate: /etc/server.crt
  certificate_key: /etc/server.key
```

This change also introduce testing with travis-ci and an integration
suite with filebeat and LSF for the SSL options.

Fix: logstash-plugins#8
@ph
Copy link
Contributor

ph commented Mar 9, 2016

When implementing this I have encountered a Jruby/OpenSSL bug thats blocking me and that prevent the server to use intermediate ca. I have created an issue on Jruby-OpenSSL to track this jruby/jruby-openssl#84

#56 is incomplete because of that, it will only work if the CA sign the client certificate directly which is problematic when you want to isolate CA.

@ph
Copy link
Contributor

ph commented Mar 9, 2016

I would like to have your feedback here concerning the usage of this feature, The PR #56 implement and currently work when you have a Root CA that directly sign Client/Server is this what you have in your current setup or you have a Root Ca and an intermediate CA that sign the Client and server certificate?

Is this an acceptable solution for you? I don't have a workaround until the jruby-openssl bug is fixed

ph added a commit to ph/logstash-input-beats that referenced this issue Mar 10, 2016
This PR introduce client verification when using `ssl`, when using this
option you need to specify the **Certificate Authority** using the
`ssl_certificate_authorities` option, this configuration take a
certificate to validate the client with it. You also need to specify a
`ssl_verify_mode`, If you want strict ssl verification use `force_peer`,
with this value if the client doesn't provide a valid certificate the
plugins will refuse the client.

On Filebeat you need to configure the client to declare a certificate using
theses options.

```
tls:
  certificate_authorities: ["/etc/server.crt"]
  certificate: /etc/server.crt
  certificate_key: /etc/server.key
```

This change also introduce testing with travis-ci and an integration
suite with filebeat and LSF for the SSL options.

Fix: logstash-plugins#8
ph added a commit to ph/logstash-input-beats that referenced this issue Mar 15, 2016
This PR introduce client verification when using `ssl`, when using this
option you need to specify the **Certificate Authority** using the
`ssl_certificate_authorities` option, this configuration take a
CA to validate the client with it.

You also need to specify a `ssl_verify_mode`, If you want strict
ssl verification use `force_peer`, with this value if the client doesn't
provide a valid certificate the plugins will refuse the client.

On Filebeat you need to configure the client to declare a certificate using
theses options.

```
tls:
  certificate_authorities: ["/etc/ca.crt"]
  certificate: "/etc/client.crt"
  certificate_key: "/etc/client.key"
```

```
input {
  beats {
    ssl => true
    ssl_certificate_authorities => ["/etc/ca.crt"]
    ssl_certificate => "/etc/server.crt"
    ssl_key => "/etc/server.key"
    ssl_verify_mode => "force_peer
  }
}
```

This change also introduce testing with travis-ci and an integration
suite with filebeat for the SSL newer options.

Fix: logstash-plugins#8
@darvid
Copy link

darvid commented Sep 22, 2017

any workaround for the fact that you can't use client certs signed by a root + intermediary? looks like jruby/jruby-openssl#84 has been open for over a year now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests