Closed gjsmo closed 3 years ago
I am having the same issue. Furthermore, LDAP users no longer have the "LDAP" label as in previous versions.
On a sidenote: If I change the password for the "admin" user, it is reset every time I restart minikube. The issues are probably related.
Same issue here, I have awx-operator 0.13.0 here. I tried creating an awx instance from scratch without restoring from any backups and still the same issue. I have another cluster running AWX 19.2.2 and this issue does not appear there. This issue only appears with new users though, users already configured for LDAP will keep working. The same user that cant be found on AD when adding it and relogging in is the same user that works when LDAP is already configured.
Just confirming I can replicate this issue on the following:
ENVIRONMENT
I face the same issue.
there is one required user attribute value missing in the API output (results in missing ldap label in the GUI)
should be something like:
also missing, but less critical for ldap to work
I was able to fix it, by directly setting ldap_dn in the database table main_profile (dirty hack).
minikube kubectl -- exec -ti awx-postgres-0 -- psql -U awx
update main_profile set ldap_dn = 'cn=username,ou=users,dc=internal,dc=org,dc=net' where id = (select id from auth_user where username = 'username');
This seems to be an issue on the AWX side; ansible/awx#10883
@kurokobo should be fixed by ansible/awx#10965
@tchellomello Thanks for the quick fix! I look forward to the release of the new version with the fixes included :rocket:
script example for adjust
root@awxansible:~# cat ajusta-usuarios.sh
tower-cli user list --all-pages | egrep -v '(==|admin|username)' | awk -F ' ' '{print$2}' > /tmp/usuarios.txt
for U in $(cat /tmp/usuarios.txt); do
echo "ajustando o usuario $U"
DN=ldapsearch -o ldif-wrap=no -w xxxxxx -H ldap://ldapxxxxxx -b 'ou=xx,dc=xxx,dc=xxx' -D uid=xxx,ou=xxx,dc=xxx,dc=zzz "(uid=$U)" dn | egrep ^dn | awk -F ' ' '{print $2}'
kubectl exec awx-postgres-13-0 -- psql -U awx -d awx -c \
"update main_profile set ldap_dn = '$DN' \
where id = (select id from auth_user where username = '$U');"
done
ISSUE TYPE
SUMMARY
After configuring LDAP, I'm able to login. Attributes and groups seem to sync correctly, After logging out however I can no longer login with that same username. The only error in the
awx-task
log isawx.api.generics Login failed for user
.ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
User should be able to login again successfully.
ACTUAL RESULTS
User can only login once.
ADDITIONAL INFORMATION
Redacted config as follows:
Deleting the LDAP user using the admin account seems to allow logging in again.
AWX-OPERATOR LOGS