d13fa3053817bb9369f2aea1e6c84ed64e26b7eb
[dcaegen2.git] / docs / sections / services / ves-http / tls-authentication.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 .. raw:: html
5
6     <style> .red {color:red} </style>
7     <style> .green {color:green} </style>
8 .. role:: red
9 .. role:: green
10
11 Authentication Types
12 ====================
13
14 VES supports mutual TLS authentication via X.509 certificates. If VES is deployed via docker image then VES configuration can be modified by editing */opt/app/VESCollector/etc/collector.properties* which is present on the docker container. VES detects changes made to the mentioned file automatically and restarts the application.
15
16 The authentication can be enabled by *collector.service.secure.clientauth* property. When *collector.service.secure.clientauth=1* VES uses additional properties:
17
18     * *collector.truststore.file.location* - a path to jks trust store containing certificates of clients or certificate authorities
19     * *collector.truststore.passwordfile* - a path to file containing password for the trust store
20
21 Of course, mutual TLS authentication requires also server certificates, so following properties have to be set to valid values:
22
23     * *collector.keystore.file.location* - a path to jks key store containing certificates which can be used for TLS handshake
24     * *collector.keystore.passwordfile* - a path to file containing a password for the key store
25
26 Property *auth.method* is used to manage security mode, possible configuration: noAuth, certBasicAuth
27
28     * *auth.method=noAuth* default option - no security (http)
29
30     * *auth.method=certBasicAuth* is used to enable mutual TLS authentication or/and basic HTTPs authentication
31
32      * client without cert and without basic auth = :red:`Authentication failure`
33      * client without cert and wrong basic auth = :red:`Authentication failure`
34      * client without cert and correct basic auth = :green:`Authentication successful`
35      * client with cert and without/wrong basic auth = :green:`Authentication successful`
36      * client with cert and correct basic auth = :green:`Authentication successful`
37
38 When application is in certBasicAuth mode then certificates are also validated by regexp in /etc/certSubjectMatcher.properties,
39 only SubjectDn field in certificate description are checked. Default regexp value is .* means that we approve all SubjectDN values.