Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-41994

API-based conversation flow thinks user is an org admin when they're not

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Unset
    • None
    • Moderate

      Testing with a non-admin user triggers the conversation flow for an org admin. This could be an issue with SSO. I had to do the following to get the user working with test automation:

      1. Create the user as a non-admin
      2. Convert the user to admin to generate a refresh token
      3. Convert the user back to a non-admin (uncheck the settings box in user management)
      4. Generate a new refresh token
      5. Test VA with the non-admin user token (see command below)

      Steps to Reproduce

      From this plugin branch: btweed/test-user-update

      Run this command:

      ENV_FOR_DYNACONF=stage_proxy iqe tests plugin astro_va -k test_va_dialogue_2fa_enable

      Actual Results

      FAILED iqe_astro_va/tests/test_dialogue.py::test_va_dialogue_2fa_enable[trigger_2fa_flow_non_admin-False-Enable 2FA] - Failed: Text didn't match: .*set up two factor authentication.*personal account.*, actual: It looks like you're an Org Admin. Do you want to enable two-factor authentication for yourself or your entire org?
      FAILED iqe_astro_va/tests/test_dialogue.py::test_va_dialogue_2fa_enable[trigger_2fa_flow_non_admin-False-confirm my logins through my cell phone] - Failed: Text didn't match: .*set up two factor authentication.*personal account.*, actual: It looks like you're an Org Admin. Do you want to enable two-factor authentication for yourself or your entire org?
      FAILED iqe_astro_va/tests/test_dialogue.py::test_va_dialogue_2fa_enable[trigger_2fa_flow_non_admin-False-text my phone when i log in] - Failed: Text didn't match: .*set up two factor authentication.*personal account.*, actual: It looks like you're an Org Admin. Do you want to enable two-factor authentication for yourself or your entire org?
      FAILED iqe_astro_va/tests/test_dialogue.py::test_va_dialogue_2fa_enable[trigger_2fa_flow_non_admin-False-team has to use 2 factor authentication now] - Failed: Text didn't match: .*set up two factor authentication.*personal account.*, actual: It looks like you're an Org Admin. Do you want to enable two-factor authentication for yourself or your entire org?
       

      Expected Results

      The API calls should trigger the conversation flow for a non-admin user. Inside SSO there may be some lingering data that indicates the user is an admin when they're not. I suspect this is an artifact of switching the user back-and-forth between admin and non-admin status.

              Unassigned Unassigned
              btweed@redhat.com Brandon Tweed
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: