-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauth.conf
160 lines (158 loc) · 4.69 KB
/
auth.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
authorization: {
version: 1
rules: [
{
################################ python_puppet_apis
# Allow Tests
#
match-request: {
path: "/puppet-ca/v1/certificate_status"
type: path
method: get
}
allow-unauthenticated: true
sort-order: 200
name: "puppetlabs certificate status for everyone"
},
{
#
# Allow Tests
#
match-request: {
path: "^/puppet-ca/v1/certificate_status/([^/]+)$"
type: regex
method: [delete, put]
}
allow: [
"admin1.mydomain.com"
]
sort-order: 201
name: "puppetlabs certificate status actions for admin nodes"
},
{
############################### Default PuppetServer Auth Config: puppet-ca/v1
#
# Allow nodes to retrieve the certificate they requested earlier
match-request: {
path: "/puppet-ca/v1/certificate/"
type: path
method: get
}
allow-unauthenticated: true
sort-order: 500
name: "puppetlabs certificate"
},
{
# Allow all nodes to access the certificate revocation list
match-request: {
path: "/puppet-ca/v1/certificate_revocation_list/ca"
type: path
method: get
}
allow-unauthenticated: true
sort-order: 500
name: "puppetlabs crl"
},
{
# Allow nodes to request a new certificate
match-request: {
path: "/puppet-ca/v1/certificate_request"
type: path
method: [get, put]
}
allow-unauthenticated: true
sort-order: 500
name: "puppetlabs csr"
},
{
############################### Default PuppetServer Auth Config: puppet/v3
#
# Allow nodes to retrieve their own catalog
match-request: {
path: "^/puppet/v3/catalog/([^/]+)$"
type: regex
method: [get, post]
}
allow: "$1"
sort-order: 500
name: "puppetlabs catalog"
},
{
match-request: {
path: "/puppet/v3/environments"
type: path
method: get
}
allow: "*"
sort-order: 500
name: "puppetlabs environments"
},
{
# Allow nodes to access all file services; this is necessary for
# pluginsync, file serving from modules, and file serving from
# custom mount points (see fileserver.conf). Note that the `/file`
# prefix matches requests to file_metadata, file_content, and
# file_bucket_file paths.
match-request: {
path: "/puppet/v3/file"
type: path
}
allow: "*"
sort-order: 500
name: "puppetlabs file"
},
{
# Allow nodes to retrieve only their own node definition
match-request: {
path: "^/puppet/v3/node/([^/]+)$"
type: regex
method: get
}
allow: "$1"
sort-order: 500
name: "puppetlabs node"
},
{
# Allow nodes to store only their own reports
match-request: {
path: "^/puppet/v3/report/([^/]+)$"
type: regex
method: put
}
allow: "$1"
sort-order: 500
name: "puppetlabs report"
},
{
match-request: {
path: "/puppet/v3/status"
type: path
method: get
}
allow-unauthenticated: true
sort-order: 500
name: "puppetlabs status"
},
{
match-request: {
path: "/puppet/v3/static_file_content"
type: path
method: get
}
allow: "*"
sort-order: 500
name: "puppetlabs static file content"
},
{
# Deny everything else. This ACL is not strictly
# necessary, but illustrates the default policy
match-request: {
path: "/"
type: path
}
deny: "*"
sort-order: 999
name: "puppetlabs deny all"
}
]
}