Syntax and template fixes for selfservice API
authorJan Dittberner <jandd@cacert.org>
Sat, 17 Aug 2019 10:41:33 +0000 (12:41 +0200)
committerJan Dittberner <jandd@cacert.org>
Sat, 17 Aug 2019 10:41:33 +0000 (12:41 +0200)
hieradata/nodes/email.yaml
sitemodules/profiles/manifests/cacert_selfservice_api.pp
sitemodules/profiles/templates/cacert_selfservice_api/config.yaml.epp

index 0ef2e9f..026ba2d 100644 (file)
@@ -16,8 +16,8 @@ profiles::icinga2_agent::pki_ticket: >
     aVBhmjBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBDmO1bK1F+o/ClrvyHP
     qDUegDB5FE/kCJHikejLTd9x65fkNuaUMs9uTYaTUydsk/yPsD/fZWpRU3hM
     nUgJAjygFfc=]
-profiles::cacert_selfservice_api::clients:
-- client_id: cac3ad11-fa50-43f6-8ded-15f598b6ca2a
+profiles::cacert_selfservice_api::client_identities:
+- id: cac3ad11-fa50-43f6-8ded-15f598b6ca2a
   key: |
     -----BEGIN PUBLIC KEY-----
     MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAKRX/fSOOunEETpHqPKj8k1/zv1R
@@ -44,7 +44,6 @@ profiles::cacert_selfservice_api::db_username: >
     Nt9bzOpBkyFkqAYFzXbYyQ3JeR4Mfb9i2wP+tIw5Hd2GaeoWBEJAdaqzsOb0
     5NJX+DA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBCl0t3nd/FDwqktfYoZ
     ReaagBBkwO8Mi7X2JTPI4jX5lDrS]
-profiles::cacert_selfservice_api::listen_address: :9443
 profiles::cacert_selfservice_api::server_certificate: |
     -----BEGIN CERTIFICATE-----
     MIIGRjCCBC6gAwIBAgIDAtlUMA0GCSqGSIb3DQEBCwUAMFQxFDASBgNVBAoTC0NB
index 8998131..f2e3e89 100644 (file)
@@ -62,7 +62,7 @@ class profiles::cacert_selfservice_api (
   String $notification_sender_address = 'returns@cacert.org',
   String $mail_host = 'localhost',
   Integer $mail_port = 25,
-  Array[Hash[String][String] $client_identities,
+  Array[Hash[String, String]] $client_identities,
 ) {
   include profiles::cacert_debrepo
 
index b0552cf..e168952 100644 (file)
@@ -9,7 +9,7 @@
       String $notification_recipient_name,
       String $mail_host,
       Integer $mail_port,
-      Array[Hash[String][String]] $clients,
+      Array[Hash[String, Data]] $clients,
       String $log_directory
 | -%>
 ---
@@ -25,8 +25,9 @@ mail_server:
   host: <%= $mail_host %>
   port: <%= $mail_port %>
 clients:
-<%= $clients.each |$client| { -%>
+<% $clients.each |$client| { -%>
 - id: <%= $client['client_id'] %>
   key: |-
-<%= $client['key_lines'].each |$line| { %>    <%= $line %><% } %>
+<% $client['key_lines'].each |$line| { %>    <%= $line %>
+<% } -%>
 <% } -%>