Add posibility to configure SyslogFacility
Change-Id: Ibf611ccb1aca641d3d302ad07fcfa01171381b96
diff --git a/openssh/files/sshd_config b/openssh/files/sshd_config
index d50596f..5404e84 100755
--- a/openssh/files/sshd_config
+++ b/openssh/files/sshd_config
@@ -32,7 +32,7 @@
ServerKeyBits {{ server.get('server_key_bits', '2048') }}
# Logging
-SyslogFacility AUTH
+SyslogFacility {{ server.get('syslog_facility', 'AUTH')|upper }}
LogLevel {{ server.get('log_level', 'INFO')|upper }}
diff --git a/openssh/schemas/server.yaml b/openssh/schemas/server.yaml
index 4d64ffc..86e1abe 100644
--- a/openssh/schemas/server.yaml
+++ b/openssh/schemas/server.yaml
@@ -64,6 +64,27 @@
which allows the verification of the KDC's identity. The default
is False (“no”).
type: boolean
+ syslog_facility:
+ description: |
+ SyslogFacility
+ --------
+ Gives the facility code that is used when logging messages from
+ sshd(8). The possible values are: DAEMON, USER, AUTH, AUTHPRIV,
+ LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
+ The default is AUTH.
+ enum:
+ - daemon
+ - user
+ - auth
+ - authpriv
+ - local0
+ - local1
+ - local2
+ - local3
+ - local4
+ - local5
+ - local6
+ - local7
log_level:
description: |
LogLevel
@@ -243,13 +264,13 @@
description: List of pub keys for user (> authorized_keys)
type: array
items:
- - type: object
- additionalProperties: false
- properties:
- key:
- type: string
- description: ssh public key
- example: "ssh-rsa AAAAXXX username@example.com"
+ type: object
+ additionalProperties: false
+ properties:
+ key:
+ type: string
+ description: ssh public key
+ example: "ssh-rsa AAAAXXX username@example.com"
example:
- key: "ssh-rsa AAAAXXX1111 username@example.com"
- key: "ssh-rsa AAAAXXX2222 username@example.com"
diff --git a/tests/pillar/server.sls b/tests/pillar/server.sls
index ccfcbcb..4bdf62b 100644
--- a/tests/pillar/server.sls
+++ b/tests/pillar/server.sls
@@ -13,6 +13,7 @@
server:
enabled: true
use_dns: yes
+ syslog_facility: auth
user:
testusername:
enabled: true