Skip to content

Commit

Permalink
Fix api feature example configuration; update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Friedrich authored and gunnarbeutner committed Oct 19, 2017
1 parent b0d4b24 commit 7b9475a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
15 changes: 14 additions & 1 deletion doc/09-object-types.md
Expand Up @@ -41,6 +41,9 @@ Example:

```
object ApiListener "api" {
accept_commands = true
accept_config = true
ticket_salt = TicketSalt
}
```
Expand All @@ -65,7 +68,17 @@ Configuration Attributes:
access\_control\_allow\_headers | String | **Optional.** Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request. Defaults to `Authorization`. [(MDN docs)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Access-Control-Allow-Headers)
access\_control\_allow\_methods | String | **Optional.** 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`. [(MDN docs)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Access-Control-Allow-Methods)

The ApiListener type expects its certificate files to be in `LocalStateDir + "/lib/icinga2/certs/" + NodeName + ".key"` (private key), `LocalStateDir + "/lib/icinga2/certs/" + NodeName + ".crt"` (certificate file) and `LocalStateDir + "/lib/icinga2/certs/ca.crt"` (CA certificate file). If the deprecated attributes `cert_path`, `key_path` and/or `ca_path` are specified Icinga copies those files to the new location in `LocalStateDir + "/lib/icinga2/certs"` unless the file(s) there are newer.
The ApiListener type expects its certificate files to be in the following locations:

Type | Location
---------------------|-------------------------------------
Private key | `LocalStateDir + "/lib/icinga2/certs/" + NodeName + ".key"`
Certificate file | `LocalStateDir + "/lib/icinga2/certs/" + NodeName + ".crt"`
CA certificate file | `LocalStateDir + "/lib/icinga2/certs/ca.crt"`

If the deprecated attributes `cert_path`, `key_path` and/or `ca_path` are specified Icinga 2
copies those files to the new location in `LocalStateDir + "/lib/icinga2/certs"` unless the
file(s) there are newer.

## ApiUser <a id="objecttype-apiuser"></a>

Expand Down
5 changes: 2 additions & 3 deletions etc/icinga2/features-available/api.conf
Expand Up @@ -3,9 +3,8 @@
*/

object ApiListener "api" {
cert_path = LocalStateDir + "/lib/icinga2/certs/" + NodeName + ".crt"
key_path = LocalStateDir + "/lib/icinga2/certs/" + NodeName + ".key"
ca_path = LocalStateDir + "/lib/icinga2/certs/ca.crt"
//accept_config = false
//accept_commands = false

ticket_salt = TicketSalt
}

0 comments on commit 7b9475a

Please sign in to comment.