forked from kubernetes/cloud-provider-openstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
keystone-policy-configmap.yaml
62 lines (57 loc) · 1.42 KB
/
keystone-policy-configmap.yaml
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
# This file lays out the policies of the cluster. It is only used
# if using Keystone for authorization. Note the difference between
# authentication and authorization.
# This configmap allows the users in the project 'demo' that have
# the 'k8s-viewer' role in Keystone to query the pod information
# from all the namespaces. The configmap is in the kube-system
# namespace due to the k8s-keystone-auth service existing in
# the kube-system namespace.
# This is version 1 policy definition
# apiVersion: v1
# kind: ConfigMap
# metadata:
# name: k8s-auth-policy
# namespace: kube-system
# labels:
# k8s-app: k8s-keystone-auth
# data:
# policies: |
# [
# {
# "resource": {
# "verbs": ["get", "list", "watch"],
# "resources": ["pods"],
# "version": "*",
# "namespace": "default"
# },
# "match": [
# {
# "type": "role",
# "values": ["k8s-viewer"]
# },
# {
# "type": "project",
# "values": ["demo"]
# }
# ]
# }
# ]
# This is version 2 policy definition
apiVersion: v1
kind: ConfigMap
metadata:
name: k8s-auth-policy
namespace: kube-system
data:
policies: |
[
{
"users": {
"projects": ["demo"],
"roles": ["member"]
},
"resource_permissions": {
"*/pods": ["get", "list", "watch"]
}
}
]