Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions templates/server/puppetserver/conf.d/auth.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ authorization: {
match-request: {
path: "/puppet-ca/v1/certificate_status"
type: path
method: [get, put, delete]
method: [get, put]
}
<%- if @server_ca_auth_required == false -%>
allow-unauthenticated: true
Expand Down Expand Up @@ -115,17 +115,21 @@ authorization: {
sort-order: 500
name: "puppetlabs cert statuses"
},
<%- if @server_ca_client_self_delete -%>
{
name: "Allow nodes to delete their own certificates",
name: "Allow deletion of certificates and requests",
match-request: {
path: "^/puppet-ca/v1/certificate(_status|_request)?/([^/]+)$"
type: regex
method: [delete]
},
<%- if @server_ca_auth_required == false -%>
allow-unauthenticated: true
<%- else -%>
allow: [
<%- if @server_ca_client_self_delete -%>
"$2",
<%- @server_admin_api_whitelist.each do |client| -%>
<%- end -%>
<%- @server_ca_client_whitelist.each do |client| -%>
"<%= client %>",
<%- end -%>
{
Expand All @@ -134,9 +138,9 @@ authorization: {
}
}
]
<%- end -%>
sort-order: 500
},
<%- end -%>
<%- end -%>
{
# Allow unauthenticated access to the status service endpoint
Expand Down