Skip to content

Commit f63fdaa

Browse files
foxxx0ekohl
authored andcommitted
also allow whitelisted admin clients to clean certs
During #728 a regression was introduced, denying the other whitelisted admin clients cleaning/deletion of certificates: ``` 2020-06-02T16:30:47.856+02:00 ERROR [qtp1105504743-114201] [p.t.a.rules] Forbidden request: puppetserver01.[...] access to /puppet-ca/v1/certificate_status/my.fancy.hostname (method :delete) (authenticated: true) denied by rule 'Allow nodes to delete their own certificates'. ``` The solution is to re-allow the entries within `@server_admin_api_whitelist`, which usually contain "localhost" and the fqdn of the puppetserver CA system.
1 parent 34d53f7 commit f63fdaa

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

templates/server/puppetserver/conf.d/auth.conf.erb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,17 @@ authorization: {
119119
type: regex
120120
method: [delete]
121121
},
122-
allow: "$2"
122+
allow: [
123+
"$2",
124+
<%- @server_admin_api_whitelist.each do |client| -%>
125+
"<%= client %>",
126+
<%- end -%>
127+
{
128+
extensions: {
129+
pp_cli_auth: "true"
130+
}
131+
}
132+
]
123133
sort-order: 500
124134
},
125135
<%- end -%>

0 commit comments

Comments
 (0)