Skip to content

"Something went wrong" warning on login with no roles is too generic #2573

Closed

Description

@twinfees

Users logging into a silo for the first time can be met with a generic "something went wrong" warning, which seems to be the defacto warning for misconfigured role assignment.

Opening this issue to request a more clear warning to the user to prevent confusion if they're not yet authorized (i.e. user not added to the group that was assigned to the silo admin group, etc).

Activity

  1. added
    customer
    on Nov 22, 2024
  2. changed the title [-]"Something went wrong" when logging into a silo warning too generic[/-] [+]"Something went wrong" warning when logging into a silo too generic[/+] on Nov 22, 2024
  3. changed the title [-]"Something went wrong" warning when logging into a silo too generic[/-] [+]"Something went wrong" warning on login with no roles is too generic[/+] on Nov 22, 2024
  4. added this to the 13 milestone on Dec 11, 2024
  5. morlandi7 commented on Jan 27, 2025

    @morlandi7

    notes from 1/27 prod eng mtg - Use case is user is logged in. We debugged this by checking the roles page in settings. This is hit often. Is there more active direction we can give. Ex we received. customer hit this when creating silo and hadn't done so in a while.

  6. askfongjojo commented on Jan 27, 2025

    @askfongjojo

    I've put in a reproducible case on dogfood for a Keycloak user:
    Login URL: https://silo11.sys.rack2.eng.oxide.computer
    Login: sorry
    Password: somethingwrong

    Image
  7. david-crespo commented on Jan 27, 2025

    @david-crespo
    Collaborator

    Thank you, that's perfect. I think we can detect this condition by looking at whether the following are both true:

    1. Current user has no groups
    2. Current user is not given a role directly in the silo policy

    1 alone is not sufficient because a user could be assigned a role directly despite not being in any groups. Nobody does that, though, so 2 will almost always be true.

    Rather than linking to some settings page, I think in this situation we should just show a message on the error page to the effect of:

    You are not in any groups and you have no assigned role on the silo. This is usually due to a misconfiguration of the admin group name on the silo. Contact your administrator.

    Investigation

    I can confirm the group list is empty and it is the project list call that's 403ing (the /v1/system/policy 403 is expected — we use it to test whether the user is a fleet viewer and eat the error).

    Image Image

    As the bad user I can also hit the silo access page, which uses the endpoints for silo policy, users, groups. Silo policy makes sense, but I'm a little surprised that we can list users and groups given that we can't list projects.

    Image
  8. david-crespo commented on Jan 28, 2025

    @david-crespo
    Collaborator

    I wanted to confirm what permissions each of those API calls is looking for. Project list is the only one in this list that the user with no groups or silo role fails. The others work because the permissions required are granted as part of silo read to all users in a silo.

    • project_list wants ListChildren on silo (as expected) (source)
    • listing users for silo requires ListChildren on silo user list resource (source)
      • anyone who can read the silo has that perm (source)
      • silo group list just checkes silo read directly instead of going through the user list authz resource, which is wrong in theory but right in practice (source). I'll make a note to fix this check.
    • current silo policy uses ReadPolicy action (source), which just maps to the Read perm (source)
  9. modified the milestones: 13, 14 on Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions