Dex : Deleted the refresh token

9/24/2019

I am currently setting up a dex instance on our Kubernetes custer to manage the LDAP authentication. Gangway is in front of it to give us the Kube config file. It worked fine the first time.

Then I was trying to test to disable my account to login and deleted the refresh token. Since then Dex shows the below error:

time="2019-09-24T08:05:19Z" level=info msg="performing ldap search ou=people,dc=comp,dc=us,dc=it,dc=com sub (&(objectClass=person)(uid=swedas))"
time="2019-09-24T08:05:19Z" level=info msg="username \"swedas\" mapped to entry uid=swedas,ou=people,dc=comp,dc=us,dc=it,dc=com sub"
time="2019-09-24T08:05:19Z" level=info msg="login successful: connector \"ldap\", username=\"swedas\", email=\"Sweta.Das@gmail.com\", groups=[]"
time="2019-09-24T08:05:19Z" level=error msg="failed to delete refresh token: not found"

This is expected but how do I get over this ? How to restore my account?

-- swetad90
kubernetes
ldap
oauth-2.0
openid-connect

1 Answer

10/8/2019

It seems like you have to delete the saved offline session as well. What is your storage options for Dex? To find out, you need to use your admin config for kubectl and check dex configmap issuing kubectl -n <DEX NAMESPACE> get configmap <DEX CONFIGMAP> -o yaml

In case you are using kubernetes as storage there is an offline session (custom resource definition) associated to your account that to have to delete as well. After that you may generate and use a new kubectl configuration using gangway.

List offline sessions: kubectl -n <DEX NAMESPACE> get offlinesessionses -o yaml

-- Marios
Source: StackOverflow