Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Fix RBAC by making more restrictive #113

Closed
wants to merge 1 commit into from
Closed

Conversation

owainlewis
Copy link
Member

This change locks down RBAC rules for the mysql-operator service account. In future we might want a separate service account for the operator and agent.

@owainlewis owainlewis requested review from prydie and garthy May 24, 2018 07:35
@owainlewis owainlewis changed the title WIP: Fix RBAC by making more restrictive Fix RBAC by making more restrictive May 24, 2018
resources:
- secrets
verbs:
- get
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a problem when cluster scoped. Can we remove this one?

verbs:
- get
- create
- delete
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be needed

- list
- watch
- create
- delete
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be needed

@@ -19,11 +19,67 @@ metadata:
namespace: {{ .Values.operator.namespace}}{{ end }}
rules:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need two ClusterRoles: mysql-agent and mysql-operator as the components require different permissions (principle of least privilege).

We need a ServiceAccount mysql-operator and corresponding ClusterRoleBinding in the namespace into which the operator is being installed.

Users must create a ServiceAccount mysql-agent and RoleBinding to the ClusterRole mysql-agnet in each namespace they want to deploy clusters. We should not create this in the default namespace automatically but rather document the requirement clearly.

Copy link

@prydie prydie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments 🙂

@prydie
Copy link

prydie commented Jun 1, 2018

Closing in favour of #121

@prydie prydie closed this Jun 1, 2018
@prydie prydie deleted the ol/helm-rbac branch July 5, 2018 10:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants