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

CKAN user deletion causes auth errors on subsequent logins #12

Open
MrkGrgsn opened this issue Oct 27, 2016 · 3 comments
Open

CKAN user deletion causes auth errors on subsequent logins #12

MrkGrgsn opened this issue Oct 27, 2016 · 3 comments
Labels

Comments

@MrkGrgsn
Copy link

Currently with this extension a sysadmin can delete a user account (including their own). Subsequent attempts to login via LDAP result in a NotAuthorized exception on the login page.

To reproduce:

  1. delete a LDAP-linked CKAN user account
  2. login as the deleted account

Observed on CKAN 2.5.2.

I would expect this to be handled in some way, e.g., by preventing deletions, failing login, or re-activating the user after successful auth. Perhaps the method of dealing with this should be configurable to suit the needs of the CKAN instance.

@MrkGrgsn
Copy link
Author

It appears that the user is successfully logged in but then fails the access check for loading the new dashboard activity count to display in the header. It looks like _ckan_user_exists() returns 'exists':True for deleted users but I haven't tested this.

@weshinsley
Copy link
Contributor

weshinsley commented Nov 28, 2017

To add to this (testing on 2.6.2):-

  1. after deleting the account, and trying to login to the account, I could no longer access the ckan web interface at all, until I cleared the ckan cookie from my browser - I got Invalid Server Configuration pages.

  2. possibly the issue is that ldap_user.ldap_id is a foreign key from the user table, hence I had to manually delete the entries from postgres with...

sudo -u postgres psql ckan_default
delete from only "ldap_user" where ldap_id='username';
delete from only "user" where name='username';

to delete the user properly. After this, I could login again with that username and recreate the user from ldap.

@alycejenni alycejenni added the bug label Jan 17, 2020
@t-book
Copy link

t-book commented Sep 13, 2021

I can confirm that issue, but in my case, I had to delete the user in the user table as well. (as It just had been marked as state = deleted)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants