Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider scc-SA mappings which map to all namespace SAs #48

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

sseago
Copy link
Collaborator

@sseago sseago commented Feb 20, 2020

The scc "users" element includes mappings for service accounts
in two different forms:
system:serviceaccount:
system:serviceaccount::

Without this commit, the plugin only works correctly for the second
type. It fails for the first because it assumes that the fourth
element will always be present if the third is there. In the
first case, the scc would map to all service accounts in the
namespace, so this commit checks for the fourth element and handles
it properly when it is not found.

The scc "users" element includes mappings for service accounts
in two different forms:
  system:serviceaccount:<namespace>
  system:serviceaccount:<namespace>:<serviceaccount>

Without this commit, the plugin only works correctly for the second
type. It fails for the first because it assumes that the fourth
element will always be present if the third is there. In the
first case, the scc would map to *all* service accounts in the
namespace, so this commit checks for the fourth element and handles
it properly when it is not found.
@sseago sseago merged commit 5402e41 into migtools:master Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants