Skip to content

Commit 60a88cb

Browse files
srebhanpull[bot]
authored andcommitted
docs(inputs.ldap): Document all TLS options (#15464)
1 parent 429982c commit 60a88cb

4 files changed

Lines changed: 49 additions & 0 deletions

File tree

plugins/inputs/ldap/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,26 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
3939
# reverse_field_names = false
4040

4141
## Optional TLS Config
42+
## Set to true/false to enforce TLS being enabled/disabled. If not set,
43+
## enable TLS only if any of the other options are specified.
44+
# tls_enable =
4245
## Trusted root certificates for server
4346
# tls_ca = "/path/to/cafile"
4447
## Used for TLS client certificate authentication
4548
# tls_cert = "/path/to/certfile"
4649
## Used for TLS client certificate authentication
4750
# tls_key = "/path/to/keyfile"
51+
## Password for the key file if it is encrypted
52+
# tls_key_pwd = ""
4853
## Send the specified TLS server name via SNI
4954
# tls_server_name = "kubernetes.example.com"
55+
## Minimal TLS version to accept by the client
56+
# tls_min_version = "TLS12"
57+
## List of ciphers to accept, by default all secure ciphers will be accepted
58+
## See https://pkg.go.dev/crypto/tls#pkg-constants for supported values
59+
# tls_cipher_suites = []
60+
## Renegotiation method, "never", "once" or "freely"
61+
# tls_renegotiation_method = "never"
5062
## Use TLS but skip chain & host verification
5163
# insecure_skip_verify = false
5264
```

plugins/inputs/ldap/ldap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:generate ../../../tools/config_includer/generator
12
//go:generate ../../../tools/readme_config_includer/generator
23
package ldap
34

plugins/inputs/ldap/sample.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,25 @@
2121
# reverse_field_names = false
2222

2323
## Optional TLS Config
24+
## Set to true/false to enforce TLS being enabled/disabled. If not set,
25+
## enable TLS only if any of the other options are specified.
26+
# tls_enable =
2427
## Trusted root certificates for server
2528
# tls_ca = "/path/to/cafile"
2629
## Used for TLS client certificate authentication
2730
# tls_cert = "/path/to/certfile"
2831
## Used for TLS client certificate authentication
2932
# tls_key = "/path/to/keyfile"
33+
## Password for the key file if it is encrypted
34+
# tls_key_pwd = ""
3035
## Send the specified TLS server name via SNI
3136
# tls_server_name = "kubernetes.example.com"
37+
## Minimal TLS version to accept by the client
38+
# tls_min_version = "TLS12"
39+
## List of ciphers to accept, by default all secure ciphers will be accepted
40+
## See https://pkg.go.dev/crypto/tls#pkg-constants for supported values
41+
# tls_cipher_suites = []
42+
## Renegotiation method, "never", "once" or "freely"
43+
# tls_renegotiation_method = "never"
3244
## Use TLS but skip chain & host verification
3345
# insecure_skip_verify = false

plugins/inputs/ldap/sample.conf.in

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# LDAP monitoring plugin
2+
[[inputs.ldap]]
3+
## Server to monitor
4+
## The scheme determines the mode to use for connection with
5+
## ldap://... -- unencrypted (non-TLS) connection
6+
## ldaps://... -- TLS connection
7+
## starttls://... -- StartTLS connection
8+
## If no port is given, the default ports, 389 for ldap and starttls and
9+
## 636 for ldaps, are used.
10+
server = "ldap://localhost"
11+
12+
## Server dialect, can be "openldap" or "389ds"
13+
# dialect = "openldap"
14+
15+
# DN and password to bind with
16+
## If bind_dn is empty an anonymous bind is performed.
17+
bind_dn = ""
18+
bind_password = ""
19+
20+
## Reverse the field names constructed from the monitoring DN
21+
# reverse_field_names = false
22+
23+
## Optional TLS Config
24+
{{template "/plugins/common/tls/client.conf"}}

0 commit comments

Comments
 (0)