Skip to content

Rename Grafana's local admin so SSO sign-in works - #108

Merged
bulbashenko merged 1 commit into
mainfrom
grafana-admin-login
Oct 12, 2026
Merged

bulbashenko merged 1 commit into
mainfrom
grafana-admin-login

Conversation

@bulbashenko

Copy link
Copy Markdown
Contributor

Fixes the "Login failed / User sync failed" error on grafana.int.

Grafana log: user.sync: Failed to create user error="user not found". The local admin had login admin, which matches the Ory username. Grafana's LoginConflict turns that into ErrUserAlreadyExists. The retry lookup comes back empty, because Generic OAuth does not look users up by login or email unless oauth_allow_insecure_email_lookup is set. The result is "user not found".

  • Secret grafana: admin-user changes to local-admin. The password is unchanged.
  • podAnnotations.bulbashenko.com/secret-revision restarts the pod. There is no PVC, so the SQLite DB is recreated with the new admin.

I did not enable insecure email lookup: linking accounts by login or email is the pattern Grafana warns against.

🤖 Generated with Claude Code

The local admin was called "admin", the same as the owner's Ory
username. Grafana refuses to create an SSO user whose login or email is
already taken, and Generic OAuth does not look users up by login, so
sign-in ended in "User sync failed" (user.sync: unable to create user:
user not found). The local admin is now "local-admin".

The pod annotation bulbashenko.com/secret-revision restarts Grafana; it
has no PVC, so the database is recreated with the new admin.

Refs #74

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bulbashenko
bulbashenko merged commit 7f3bc20 into main Oct 12, 2026
4 checks passed
@bulbashenko
bulbashenko deleted the grafana-admin-login branch October 12, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant