3.2 RBAC Flashcards

1
Q

Como se administran los cluster-roles

A

oc adm policy

add-cluster-role-to-user
remove-cluster-role-from-user
who can

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Cuales son los Roles de default

A

admin
basic-user
cluster-admin
cluster-status
edit
self-provisioner
view

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Como se crea una alternativa para los roles de default (modo correcto de uso)

A

Export role

Import role con otro usuario

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explica todos los roles

A

admin puede manejar todos los proyectos y dar acceso
basic-user read project
cluster-admin súper user access to cluster resources full control to projects
cluster-status get cluster status
edit manejar aplicaciones pero no manejar recursos
self-provisioner crear proyectos - cluster role/not a project role
view can view project resources but can’t modify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Como se quita un cluster role de un usuario

A

oc adm policy remove-cluster-role-from-user ROLE USER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Como se válida que usuarios tiene permisos de eliminar

A

oc adm policy who-can delete user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Como se que usuarios puede obtener que usuarios pueden obtener pods

A

oc adm policy whocan get pods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Como se agrega el role basic-user al usuario test en el proyecto basic-project

A

oc policy add-role-to-user basic-user test -n basic-project

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Como se elimina un role de un usuario

A

oc policy remove-role-from-user role user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Como se obtienen los cluster role bindings

A

oc get clusterrolebinding -o wide

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Como se elimina el permiso de crear projects de todos los usuarios quienes no sean cluster administrators

A

oc describe clusterrolebinding self-provisioners
oc adm policy remove-cluster-from-group self-provisioner system:authentication:oauth
Ejecutar de nuevo para validar que ya no esté

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Como se da el role de admin a leader

A

oc policy add-role-to-user admin leader

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Como se agrega un grupo llamado mygroup y como se asigna el usuario test a el

A

oc adm groups new mygroup
oc adm groups add-user mygroup test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Como se asigna la política a grupo

A

oc policy groups add-role-to-group edit groupNAME

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Como se obtienen los role bindings

A

oc get role bindings -o wide

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Como se hace deploy de app httpd:2.4

A

oc new-app —name httpd httpd:2.4

17
Q

Como se agrega el Role Edit al grupo qa-engineer

A

oc policy add-role-to-group edit qa-engenieer

18
Q

Como se escala un aplicativo

A

oc scale deployment httpd —replicas=3

19
Q

Agregar system authentication de self-provider

A

oc adm policy add-cluster-role-to-group self-provider “system:authenticated:oauth”

20
Q

Como se quita del role self-provisioner de todos los usuario autenticados y asignar sólo a grupo managers

A

oc policy remove-cluster-role-from-group self-provisioner “system:authenticated:oauth”
oc policy add-cluster-role-to-group self-provisioner managers

21
Q

Como se agrega un usuario a un grupo

A

oc adm groups add-users GROUP USER

22
Q

Como agregar role edit a grupo developers

A

oc policy add-role-to-group edit developers

23
Q

Como se agrega el cluster role al usuario test

A

oc adm policy add-cluster-role-to-user cluster-role test

24
Q

Como eliminar el cluster role al usuario test

A

oc adm policy remove-cluster-role-from-user cluster-role test

25
Q

Como se puede obtener que usuarios tienen permiso para eliminar usuario

A

oc adm policy who-can delete user

26
Q

Como se recupera el cluster role self-provisioner con el nombre role binding self-provisioners al grupo system:authenticated:oauth

A

oc adm policy add-cluster-role-to-group \
> –rolebinding-name self-provisioners \
> self-provisioner system:authenticated:oauth
Warning: Group ‘system:authenticated:oauth’ not found
clusterrole.rbac.authorization.k8s.io/self-provisioner added: “system:authenticated:oauth”