-
Notifications
You must be signed in to change notification settings - Fork 28
/
rest_perm.go
236 lines (166 loc) · 5.41 KB
/
rest_perm.go
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
// Copyright 2015-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
// in that file, in accordance with the Business Source License, use of this
// software will be governed by the Apache License, Version 2.0, included in
// the file licenses/APL2.txt.
package cbft
// See: https://docs.google.com/document/d/1JXm4PXyli45KE5dyGvD5oQLb6MQPJSkubDR21JZQycQ/edit?ts=56b15d8f#
var restPermDefault = "cluster.fts!read"
var restPerms = `
GET /api/index
cluster.bucket{}.fts!read
GET /api/bucket/{bucketName}/scope/{scopeName}/index
cluster.bucket{}.fts!read
GET /api/index/{indexName}
cluster.collection[<sourceName>].fts!read
GET /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}
cluster.collection[<sourceName>].fts!read
PUT /api/index/{indexName}
cluster.collection[<sourceName>].fts!write
24577
PUT /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}
cluster.collection[<sourceName>].fts!write
24577
DELETE /api/index/{indexName}
cluster.collection[<sourceName>].fts!write
24576
DELETE /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}
cluster.collection[<sourceName>].fts!write
24576
POST /api/index/{indexName}/ingestControl/{op}
cluster.collection[<sourceName>].fts!manage
24579
POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/ingestControl/{op}
cluster.collection[<sourceName>].fts!manage
24579
POST /api/index/{indexName}/planFreezeControl/{op}
cluster.collection[<sourceName>].fts!manage
24579
POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/planFreezeControl/{op}
cluster.collection[<sourceName>].fts!manage
24579
POST /api/index/{indexName}/queryControl/{op}
cluster.collection[<sourceName>].fts!manage
24579
POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/queryControl/{op}
cluster.collection[<sourceName>].fts!manage
24579
GET /api/statsStream
cluster.bucket[].fts!read
GET /api/stats
cluster.bucket[].fts!read
GET /api/nsstats/buckets
cluster.bucket[].fts!read
GET /api/nsstats
cluster.bucket[].fts!read
GET /api/nodeUtilStats
cluster.bucket[].fts!read
GET /api/dcpAgentStats
cluster.bucket[].fts!read
GET /api/nsstats/index/{indexName}
cluster.collection[<sourceName>].fts!read
GET /api/stats/index/{indexName}/progress
cluster.collection[<sourceName>].fts!read
GET /api/stats/index/{indexName}
cluster.collection[<sourceName>].fts!read
GET /api/stats/sourceStats/{indexName}
cluster.collection[<sourceName>].stats.fts!read
GET /api/index/{indexName}/count
cluster.collection[<sourceName>].fts!read
GET /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/count
cluster.collection[<sourceName>].fts!read
POST /api/index/{indexName}/query
cluster.collection[<sourceName>].fts!read
POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/query
cluster.collection[<sourceName>].fts!read
POST /api/index/{indexName}/analyzeDoc
cluster.collection[<sourceName>].fts!read
POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/analyzeDoc
cluster.collection[<sourceName>].fts!read
POST /api/index/{indexName}/tasks
cluster.bucket[<sourceName>].fts!write
POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/tasks
cluster.bucket[<sourceName>].fts!write
GET /api/index/{indexName}/status
cluster.collection[<sourceName>].fts!read
GET /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/status
cluster.collection[<sourceName>].fts!read
POST /api/index/{indexName}/pindexLookup
cluster.collection[<sourceName>].fts!read
POST /api/bucket/{bucketName}/scope/{scopeName}/index/{indexName}/pindexLookup
cluster.collection[<sourceName>].fts!read
GET /api/cfg
cluster.settings.fts!read
POST /api/cfgRefresh
cluster.settings.fts!write
24580
POST /api/cfgNodeDefs
cluster.settings.fts!write
24586
POST /api/cfgPlanPIndexes
cluster.settings.fts!write
24587
POST /api/managerKick
cluster.settings.fts!write
24581
GET /api/managerMeta
cluster.settings.fts!read
GET /api/diag
cluster.logs.fts!read
GET /api/log
cluster.logs.fts!read
GET /api/runtime
cluster.settings.fts!read
GET /api/runtime/args
cluster.settings.fts!read
POST /api/runtime/profile/cpu
cluster.settings.fts!write
24583
POST /api/runtime/profile/memory
cluster.settings.fts!write
24584
POST /api/runtime/gc
cluster.settings.fts!write
24582
POST /api/runtime/trace
cluster.settings.fts!write
24585
GET /api/runtime/stats
cluster.stats.fts!read
GET /api/runtime/statsMem
cluster.stats.fts!read
GET /api/pindex
cluster.bucket[].fts!read
GET /api/pindex/{pindexName}
cluster.collection[<sourceName>].fts!read
GET /api/pindex/{pindexName}/count
cluster.collection[<sourceName>].fts!read
POST /api/pindex/{pindexName}/query
cluster.collection[<sourceName>].fts!read
GET /api/pindex/{pindexName}/contents
cluster.bucket[<sourceName>].fts!write
GET /api/ping
none
GET /debug/vars
cluster.settings.fts!read
GET /_prometheusMetrics
cluster.admin.internal.stats!read
GET /_prometheusMetricsHigh
cluster.admin.internal.stats!read
RPC /Search
cluster.collection[<sourceName>].fts!read
GET /api/conciseOptions
cluster.settings.fts!read
GET /api/v1/backup
cluster.bucket[].fts!read
POST /api/v1/backup
cluster.bucket[].fts!read
GET /api/v1/bucket/{bucketName}/backup
cluster.bucket[<bucketName>].fts!read
POST /api/v1/bucket/{bucketName}/backup
cluster.bucket[<bucketName>].fts!read
GET /api/indexes/source/{bucketName}
cluster.bucket[<bucketName>].fts!read
`