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

fix(serviceAccount): Filter non-valid roles when converting to UserPermission (#513) #514

Conversation

spinnakerbot
Copy link
Contributor

Roles can't be empty. This leads to unexpected behaviour. However, we
were allowing creating empty roles like "" or " " on the pipeline
triggersi (via API), which made service users to contain invalid roles
and thus failing on every sync request that tries to map roles to accounts.
This rendered FIAT unusable to get permissions and subsequently not
allowing any authorization operation.

This patch sanitizes the input on ServiceAccounts so we make sure
that the roles considered are valid.

Automated cherry pick of 2bf1472 into 1.17

…rmission (#513)

Roles can't be empty. This leads to unexpected behaviour. However, we
were allowing creating empty roles like "" or "   " on the pipeline
triggersi (via API), which made service users to contain invalid roles
and thus failing on every sync request that tries to map roles to accounts.
This rendered FIAT unusable to get permissions and subsequently not
allowing any authorization operation.

This patch sanitizes the input on ServiceAccounts so we make sure
that the roles considered are valid.
@ttomsu ttomsu merged commit c62d038 into release-1.17.x Dec 2, 2019
@ttomsu ttomsu deleted the auto-cherry-pick-1.17-2bf147213285434f64f7b973e316b5127dd5b6e0 branch December 2, 2019 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants