Blame docs/operations/ci/user_email_change.md

4166e6
# Reflecting FAS/ACO user email change
4166e6
4166e6
Openshift was initially configured to use IdP/Oauth but creating user with `preferred_email` as main login ID.
4166e6
That means that when a user updates/changes its email address at FAS/ACO side, he loses his rights in openshift and deployed applications.
4166e6
4166e6
We have a plan to discuss massively reflect a change to get back to `user` instead of `email` and process all groups/projects but for the time being, if someone in such situation is creating a ticket, here is a simple way to fix it directly in openshift.
4166e6
4166e6
Let's assume that user is `foo` and his previous email `foo@bar.com` but he has a new email address now in FAS (which you can query https://fasjson.fedoraproject.org to find).
4166e6
4166e6
Basically we have to :
4166e6
4166e6
  * remove user from openshift
4166e6
  * delete cached openshift identify for that user
4166e6
4166e6
Login on the node that is in the `ocp-ci-management` ansible group , become `ocpadm` user and run the following (cli and eventually ansible playbook to come later) :
4166e6
4166e6
4166e6
```
4166e6
user="foo"
4166e6
email="foo@bar.com"
4166e6
4166e6
[ocpadm@<node> ~]$ oc get identities | grep "${email}"
4166e6
CentOS_and_Fedora_account:f84377f827c00de9cbd03a3cf01af0fc09c2807c16e790d6d07cd0c8a9f58e2f   CentOS_and_Fedora_account   f84377f827c00de9cbd03a3cf01af0fc09c2807c16e790d6d07cd0c8a9f58e2f 
4166e6
4166e6
# Now that we have identity, just delete it
4166e6
[ocpadm@<node> ~]$ oc delete identity CentOS_and_Fedora_account:f84377f827c00de9cbd03a3cf01af0fc09c2807c16e790d6d07cd0c8a9f58e2f
4166e6
identity.user.openshift.io "CentOS_and_Fedora_account:f84377f827c00de9cbd03a3cf01af0fc09c2807c16e790d6d07cd0c8a9f58e2f" deleted
4166e6
4166e6
# Let's now delete user
4166e6
[ocpadm@<node> ~]$ oc delete user ${user} 
4166e6
4166e6
```
4166e6
4166e6
We can now ask the user to login again and his new user will be created and linked with FAS/ACO.
4166e6
Don't forget to reflect his new email address for his projects and update projecs (like you'd do to create it, so push to git and `oc apply`)