Skip to content

Commit

Permalink
fix #581 Add new attributes to feature api
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Jul 26, 2019
1 parent bd53470 commit ca29a9d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,9 @@ Accept zone configuration. Defaults to `false`
##### `accept_commands`
Accept remote commands. Defaults to `false`

##### `max_anonymous_clients`
Limit the number of anonymous client connections (not configured endpoints and signing requests).

##### `ca_host`
This host will be connected to request the certificate. Set this if you use the `icinga2` pki.

Expand All @@ -1500,6 +1503,9 @@ are Icinga 2 constants.
##### `ssl_protocolmin`
Minimal TLS version to require. Default undef (e.g. `TLSv1.2`)

##### `ssl_handshake_timeout`
TLS Handshake timeout. Icinga defaults to 10s.

##### `ssl_cipher_list`
List of allowed TLS ciphers, to fine tune encryption. Default undef (e.g. `HIGH:MEDIUM:!aNULL:!MD5:!RC4`)

Expand All @@ -1523,6 +1529,9 @@ Defaults to `Authorization`.
Used in response to a preflight request to indicate which HTTP methods can be used when making the actual request.
Defaults to `GET, POST, PUT, DELETE`.

##### `environment`
Used as suffix in TLS SNI extension name; default from constant ApiEnvironment, which is empty.

#### Class: `icinga2::feature::idopgsql`
Enables or disables the `ido-pgsql` feature.

Expand Down
1 change: 1 addition & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ icinga2::globals::reserved:
- Acknowledgement
- ApiBindHost
- ApiBindPort
- ApiEnvironment
- ApplicationType
- AttachDebugger
- BuildCompilerName
Expand Down
15 changes: 15 additions & 0 deletions manifests/feature/api.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
# [*accept_commands*]
# Accept remote commands. Defaults to false.
#
# [*max_anonymous_clients*]
# Limit the number of anonymous client connections (not configured endpoints and signing requests).
#
# [*ca_host*]
# This host will be connected to request the certificate. Set this if you use the icinga2 pki.
#
Expand Down Expand Up @@ -72,6 +75,9 @@
# [*ssl_protocolmin*]
# Minimal TLS version to require. Default undef (e.g. "TLSv1.2")
#
# [*ssl_handshake_timeout*]
# TLS Handshake timeout. Icinga defaults to 10s.
#
# [*ssl_cipher_list*]
# List of allowed TLS ciphers, to finetune encryption. Default undef (e.g. "HIGH:MEDIUM:!aNULL:!MD5:!RC4")
#
Expand All @@ -95,6 +101,9 @@
# Used in response to a preflight request to indicate which HTTP methods can be used when making the actual request.
# Defaults to `GET, POST, PUT, DELETE`.
#
# [*environment*]
# Used as suffix in TLS SNI extension name; default from constant ApiEnvironment, which is empty.
#
# === Examples
#
# Use the puppet certificates and key copy these files to the cert directory
Expand Down Expand Up @@ -138,6 +147,7 @@
Optional[Stdlib::Absolutepath] $ssl_crl = undef,
Optional[Boolean] $accept_config = undef,
Optional[Boolean] $accept_commands = undef,
Optional[Integer[0]] $max_anonymous_clients = undef,
Optional[Stdlib::Host] $ca_host = undef,
Stdlib::Port::Unprivileged $ca_port = 5665,
String $ticket_salt = 'TicketSalt',
Expand All @@ -148,6 +158,7 @@
Optional[String] $ssl_cert = undef,
Optional[String] $ssl_cacert = undef,
Optional[Enum['TLSv1', 'TLSv1.1', 'TLSv1.2']] $ssl_protocolmin = undef,
Optional[Icinga2::Interval] $ssl_handshake_timeout = undef,
Optional[String] $ssl_cipher_list = undef,
Optional[Stdlib::Host] $bind_host = undef,
Optional[Stdlib::Port::Unprivileged] $bind_port = undef,
Expand All @@ -156,6 +167,7 @@
Optional[Boolean] $access_control_allow_credentials = undef,
Optional[String] $access_control_allow_headers = undef,
Optional[Icinga2::Fingerprint] $fingerprint = undef,
Optional[String] $environment = undef,
) {

if ! defined(Class['::icinga2']) {
Expand Down Expand Up @@ -314,15 +326,18 @@
crl_path => $ssl_crl,
accept_commands => $accept_commands,
accept_config => $accept_config,
max_anonymous_clients => $max_anonymous_clients,
ticket_salt => $_ticket_salt,
tls_protocolmin => $ssl_protocolmin,
tls_handshake_timeout => $ssl_handshake_timeout,
cipher_list => $ssl_cipher_list,
bind_host => $bind_host,
bind_port => $bind_port,
access_control_allow_origin => $access_control_allow_origin,
access_control_allow_credentials => $access_control_allow_credentials,
access_control_allow_headers => $access_control_allow_headers,
access_control_allow_methods => $access_control_allow_methods,
environment => $environment,
}

# create endpoints and zones
Expand Down

0 comments on commit ca29a9d

Please sign in to comment.