Update Harbor OIDC after IDP host change #20550
-
I have a small self-hosted harbor instance connected to our IPD. I rarely log into Harbor as it's running smoothly and all workflows that involve Harbor are automated. A while ago I've changed my domain names, and had to move a bunch of services to another domain, including Keycloak which was configured as OIDC for Harbor. Unfortunately I've forgot to update Harbor's OIDC settings. I've had to restart Harbor today to make an upgrade, and now I get an error and can't access Harbor anymore. In the
And trying to access the Harbor UI redirects to the Any idea how I can fix this within Harbor itself? Unfortunately I no longer have access to this domain. I suppose I could play with CoreDNS to fake it temporarily? Would be great if there was a way to inject/update the OIDC settings via the Helm chart values or temporarily disable it. Thanks 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Could you please try to login the Harbor using admin (db auth) and navigate to |
Beta Was this translation helpful? Give feedback.
-
I was able to fix it by updating the values in the database. I only have one OIDC enabled, so this worked for me without additional filters. If you have multiple OIDC providers configured, you may need to add additional UPDATE properties SET v = 'https://new-keycloak.com/realms/main' WHERE k = 'oidc_endpoint'; The UPDATE oidc_user set subiss = '263e62ef-399e-447c-98fb-17ac0b81fa74https://new-keycloak.com/realms/main' where subiss = '263e62ef-399e-447c-98fb-17ac0b81fa74https://old-keycloak.com/realms/main'; |
Beta Was this translation helpful? Give feedback.
I was able to fix it by updating the values in the database.
I only have one OIDC enabled, so this worked for me without additional filters. If you have multiple OIDC providers configured, you may need to add additional
WHERE
clauses.The
subiss
field in theoidc_user
table also needed updating: