The Portal user is not able to re-login into PMM using Percona Account

Description

User impact:
On PMM which is Connected to Portal, it's impossible to log in a second time using Percona  Account.

 

note: the local credentials are working ok.

Preconditions:

  • Start PMM Server 2.38

  • Sign up at Portal as user X, create Org, and copy the token from user profile

  • login as admin, Open PMM Settings -> Percona Platform and connect PMM to Portal

Steps to reproduce:

  1. Logout and Login as user X using Sign in with Percona Account option

  2. After successful login do Logout again

  3. Try to Login as user X using Sign in with Percona Account option again

Actual results:

  • The user X is not logged in and the error message 
    Login Failed
    user already exists is shown on PMM Sign in page 

Expected result:

  • The user X should be successfully logged in

 

Workaround:

  1. Use Local credentials. Admin user can create more 

  2. Apply the patch provided in the comments to have oauth_allow_insecure_email_lookup=true in grafana config 

How to test

in description 

How to document

docs of `grafana.ini` should have full steps: path to file, what exactly should be changed and additional actions like restart some serveice

Attachments

1
100% Done
Loading...

Activity

Vadym Yarosh September 10, 2023 at 10:10 AM

The automated tests has been adjusted to use the fix. Confirmed fixed in "dev-latest" and 2.39.0
2.39.0: https://github.com/percona/pmm-ui-tests/actions/runs/6131901771
dev-latest: https://github.com/percona/pmm-ui-tests/actions/runs/6131900225

Vadym Yarosh September 6, 2023 at 10:54 AM
Edited

please clarify the solution and provide instructions for QA how to test the fix.

I added `GF_AUTH_OAUTH_ALLOW_INSECURE_EMAIL_LOOKUP=1` to pmm-server setup as It's stated in related doc task. I still see the issue on dev-latest.

Env. setup changes:

Tests Fixes and re-enabling: https://github.com/percona/pmm-ui-tests/pull/682

You can run tests in GH action "PMM e2e Tests(Playwright)" using the following arguments:

pmm-ui-tests repository branch: PMM-12293-enable-portal-sso-tests
pmm-qa repository branch(for setup): PMM-12293-portal-re-login
test run results: https://github.com/percona/pmm-ui-tests/actions/runs/6096111551

vasyl.yurkovych September 1, 2023 at 6:34 AM

could you also enable the workaround in pmm.check-dev ?

Alex Demidoff July 7, 2023 at 2:05 PM
Edited

We can add the fix straight to our grafana.ini - https://github.com/percona/pmm/blob/main/update/ansible/playbook/tasks/roles/grafana/files/grafana.ini.

This is much more straightforward and doesn't require ansible.

Since environment variables always take precedence, it can always be overriden by an envvar.

Alex Demidoff July 6, 2023 at 10:36 AM
Edited

This ansible task has proven to fix the issue and has been tested on pmmdemo.dev.percona.net (reference issue):

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Needs Doc

Yes

Planned Version/s

Fix versions

Story Points

Regression Issue

Yes

Found by Automation

Yes

Affects versions

Smart Checklist

Created July 5, 2023 at 3:11 PM
Updated July 18, 2024 at 2:22 PM
Resolved September 13, 2023 at 11:28 PM