kwizart: cannot login on https://release-monitoring.org using FAS #9011

Closed
opened 2020-06-10 12:44:07 +00:00 by kwizart · 13 comments

Seems like there is an issue specific to my account as I cannot login to release-monitoring using the Fedora FAS openidc. Once I'm authenticated using the Fedora FAS id, I receive the following message once redirected to the release-monitoring application:
"Error: There's already an account associated with your email, authenticate with openid."
(I'm authenticating using openid actually).

It might be related to my attempt to identify using another openidc provider:
(https://id.rpmfusion.org/openid/id/kwizart)

I would suggest to look at the release monitoring database to clean-up any duplicate entry...

IIRC, this issue might not be related to the recent migration, as It might be an older issue.


When do you need this to be done by? (summer 2020)


Seems like there is an issue specific to my account as I cannot login to release-monitoring using the Fedora FAS openidc. Once I'm authenticated using the Fedora FAS id, I receive the following message once redirected to the release-monitoring application: "Error: There's already an account associated with your email, authenticate with openid." (I'm authenticating using openid actually). It might be related to my attempt to identify using another openidc provider: (https://id.rpmfusion.org/openid/id/kwizart) I would suggest to look at the release monitoring database to clean-up any duplicate entry... IIRC, this issue might not be related to the recent migration, as It might be an older issue. ---- # When do you need this to be done by? (summer 2020) ----

@zlopez can you take a look?

@zlopez can you take a look?

Metadata Update from @kevin:

  • Issue priority set to: Waiting on Assignee (was: Needs Review)
  • Issue tagged with: authentication, release-monitoring
**Metadata Update from @kevin**: - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: authentication, release-monitoring
Contributor

We tried to troubleshoot this issue with kwizart in #fedora-admin channel and here is what we found.

The user with the same e-mail is already in users table, but this one is associated with openid instance (https://id.rpmfusion.org/openid/id/kwizart). He was able to connect using this openid provider, but to be able to connect with FAS we need to delete his existing account.

To do this I need someone with db access to delete user with id 0a87043e-4c9b-492c-b74d-c28c981a0842 from users table in Anitya. When this will be done the kwizart should be able to login with FAS account.

To help prevent this in the future I created two tickets in Anitya:

We tried to troubleshoot this issue with kwizart in #fedora-admin channel and here is what we found. The user with the same e-mail is already in users table, but this one is associated with openid instance (https://id.rpmfusion.org/openid/id/kwizart). He was able to connect using this openid provider, but to be able to connect with FAS we need to delete his existing account. To do this I need someone with db access to delete user with id `0a87043e-4c9b-492c-b74d-c28c981a0842` from users table in Anitya. When this will be done the kwizart should be able to login with FAS account. To help prevent this in the future I created two tickets in Anitya: * To enhance the error message - https://github.com/fedora-infra/anitya/issues/930 * To add admins ability to delete the users from the user management screen - https://github.com/fedora-infra/anitya/issues/931

anitya=# select * from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842';
id | email | username | active | admin
--------------------------------------+-------------------+----------------+--------+-------
0a87043e-4c9b-492c-b74d-c28c981a0842 | kwizart@gmail.com | NicolasChauvet | t |
(1 row)

anitya=# select from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842';

(1 row)

anitya=# select * from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; id | email | username | active | admin --------------------------------------+-------------------+----------------+--------+------- 0a87043e-4c9b-492c-b74d-c28c981a0842 | kwizart@gmail.com | NicolasChauvet | t | (1 row) anitya=# select from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; -- (1 row)

Metadata Update from @kevin:

  • Issue close_status updated to: Fixed
  • Issue status updated to: Closed (was: Open)
**Metadata Update from @kevin**: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Author

It doesn't seem to work...

"Error: There's already an account associated with your email, authenticate with openid."

Is there any other user_id using the same email ? kwizart@gmail.com ?

It doesn't seem to work... "Error: There's already an account associated with your email, authenticate with openid." Is there any other user_id using the same email ? kwizart@gmail.com ?
Author

Metadata Update from @kwizart:

  • Issue status updated to: Open (was: Closed)
**Metadata Update from @kwizart**: - Issue status updated to: Open (was: Closed)

Oops. That second select was supposed to be a delete. :(

However:

anitya=# delete from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842';
ERROR: update or delete on table "users" violates foreign key constraint "social_auth_usersocialauth_user_id_fkey" on table "social_auth_usersocialauth"
DETAIL: Key (id)=(0a87043e-4c9b-492c-b74d-c28c981a0842) is still referenced from table "social_auth_usersocialauth".

Oops. That second select was supposed to be a delete. :( However: anitya=# delete from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; ERROR: update or delete on table "users" violates foreign key constraint "social_auth_usersocialauth_user_id_fkey" on table "social_auth_usersocialauth" DETAIL: Key (id)=(0a87043e-4c9b-492c-b74d-c28c981a0842) is still referenced from table "social_auth_usersocialauth".
Contributor

Hm, I thought the social auth table will be set to cascade delete. In this case we need to also delete entry in social_auth_usersocialauth tables.

Hm, I thought the social auth table will be set to cascade delete. In this case we need to also delete entry in `social_auth_usersocialauth` tables.

Metadata Update from @pingou:

  • Issue assigned to pingou
**Metadata Update from @pingou**: - Issue assigned to pingou

Done:

anitya=# delete from social_auth_usersocialauth where user_id = '0a87043e-4c9b-492c-b74d-c28c981a0842';
DELETE 1
anitya=# delete from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842';
DELETE 1
Done: ```` anitya=# delete from social_auth_usersocialauth where user_id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; DELETE 1 anitya=# delete from users where id = '0a87043e-4c9b-492c-b74d-c28c981a0842'; DELETE 1 ````
Author

Confirmed fixed! Thanks !

Confirmed fixed! Thanks !
Author

Metadata Update from @kwizart:

  • Issue close_status updated to: Fixed
  • Issue status updated to: Closed (was: Open)
**Metadata Update from @kwizart**: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Infrastructure/fedora-infrastructure#9011
No description provided.