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

Invalid V1 Local Team IDs #3108

Closed
tylercloke opened this issue Mar 16, 2020 · 2 comments
Closed

Invalid V1 Local Team IDs #3108

tylercloke opened this issue Mar 16, 2020 · 2 comments
Labels
auth-team anything that needs to be on the auth team board bug 🐛 Something isn't working needs-triage product-decision an issue describing options related to a product decision.

Comments

@tylercloke
Copy link
Contributor

tylercloke commented Mar 16, 2020

Problem

Note: The below only applies to LOCAL teams and not ldap or saml teams.

In IAM V1, team IDs did not conform to our alphaneumeric restrictions, so teams that are migrated will have some problems if they contain spaces or special characters.

Problems arise in both the API in the UI for teams that were migrated from V1 with characters that are now invalid.

curl -k -H "api-token: $TOK" https://a2-dev.test/apis/iam/v2/teams/unique team name! | jq 
<curl errors>
{
  "error": "no team found with id \"unique\"",
  "code": 5,
  "message": "no team found with id \"unique\"",
  "details": []
}

In the UI:

Screen Shot 2020-02-13 at 1.59.12 PM.png

Solutions

This is a bit tricky to fix because if we want to completely automate fixing this issue for customers, we need to update invalid IDs in the policies as well. This would involve multiple services and cereal which is always a non-trivial amount of engineering effort.

Solution 1: Do nothing

This issue only affects local teams which are in general not very utilized compared to ldap and saml teams by customers (outside of the admins team which is not affected).

We could just note this issue in the changelog and move on, helping any customers that might encounter it fix their teams up. This issue will not affect new teams, but only existing v1 teams that have invalid characters.

Solution 2: Note the brokenness

If a user does have invalid teams, we could do a few things to let the user know with varying degrees of effort.

a. Low effort: Log the broken teams (either on migration or periodically). This will be not the most ideal UX but easy to implement.

b. Fairly low effort: Add a warning in the list view of the UI for affected teams. They would have to re-create the teams and the policies but that would be a higher visibility place to note what is up to the end users.

Solution 3: Partial Fix

Medium effort: Fix the team's IDs but not update the policies. We'd still want to note to them somehow that they need to go fix their policies. Just fixing up the IDs would be non-trivial but not a huge amount of work.

Solution 4: Automated Fix

Large effort: Update IDs to be valid and resolve any resulting name conflicts. We'd also need to then update the policies via cereal with the new IDs with logic for conflicting IDs. This would present a few challenges and would need to be maintained long term. This would be a pretty significant amount of engineering effort and some decent testing to get correct.

@tylercloke tylercloke added the bug 🐛 Something isn't working label Mar 16, 2020
@susanev susanev added auth-team anything that needs to be on the auth team board needs-triage labels Mar 16, 2020
@susanev
Copy link
Contributor

susanev commented Mar 16, 2020

i support solution 1, or solution 2 a. considering time and priority of other work.
im pretty worried about the ux of solution 2 b. and 3.

@susanev susanev added the product-decision an issue describing options related to a product decision. label Mar 16, 2020
@susanev
Copy link
Contributor

susanev commented Mar 16, 2020

we have decided on solution 1: do nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-team anything that needs to be on the auth team board bug 🐛 Something isn't working needs-triage product-decision an issue describing options related to a product decision.
Projects
None yet
Development

No branches or pull requests

2 participants