Harbor: Auth_mode menu disabled

Created on 7 Jun 2019  路  7Comments  路  Source: goharbor/harbor

Hello! I need to change auth_mode to LDAP, but somewhy menu is inactive. I use admin account, ofcause. What can i do to solve my issue?

faq

Most helpful comment

How did you remove all users? You can clean users created in database and try again.

docker exec -it harbor-db bash
psql -U postgres
\c registry
select * from harbor_user
delete from harbor_user where user_id > 2

Then change the configuration in web console.

All 7 comments

I am having a similar issue. Looking to change auth mode from built in database to OIDC. I understand that you can only change auth mode when the only user present is Admin. I removed all previously created users, but the Auth_Mode value is still greyed out.

What do I need to do in order to change my auth mode ? Do I need to re-install with a new user-database ?

How did you remove all users? You can clean users created in database and try again.

docker exec -it harbor-db bash
psql -U postgres
\c registry
select * from harbor_user
delete from harbor_user where user_id > 2

Then change the configuration in web console.

Removed all users from web console. Let me check the DB, thanks.

How did you remove all users? You can clean users created in database and try again.

docker exec -it harbor-db bash
psql -U postgres
\c registry
select * from harbor_user
delete from harbor_user where user_id = xxx 

Then change the configuration in web console.

It works! Can you advice, how can i troubleshoot connection string to ldap?

Answer to my own question:

  1. Set log level to debug in harbor.yml and reinstall harbor with new param.
  2. Look into core.log. There i have found incorrect ldap request, then change "LDAP Filter" and "LDAP UID" values and it's work now.

You might removed the anonymous user, try to add it

insert into harbor_user (username, email, password, realname, comment, deleted, sysadmin_flag, creation_time, update_time) values 
('anonymous', '[email protected]', '', 'anonymous user', 'anonymous user', true, false, NOW(), NOW());

The anonymous user did the trick, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

272909106 picture 272909106  路  4Comments

reasonerjt picture reasonerjt  路  3Comments

abououdine picture abououdine  路  3Comments

adomenech73 picture adomenech73  路  3Comments

cten picture cten  路  3Comments