OfficialSPISecurity / Bot protectionActive

keycloak-alias-guard

it-perspectives/keycloak-alias-guard ↗

Block duplicate accounts created via email aliases (+tags, Gmail dots).メールエイリアスによる重複アカウントを防止

★
6
Forks
0
Contributors
1
Updated
2026-06-19
KC
26.5.7
License
MIT

What it can doできること3

  • Enforce "one mailbox, one account" — reject registration or email changes when the canonical mailbox is already used.「1つのメールボックスに1アカウント」を強制。正規化したメールアドレスがすでに使われていれば、登録やメール変更を拒否する
  • Canonicalise addresses (lowercase, strip +tags; for Gmail also remove dots and map googlemail.com to gmail.com).アドレスを正規化(小文字化、+タグ の除去。Gmailはドットも除去し、googlemail.comをgmail.comに統一)
  • Store the canonical form on users via an event listener; error messages are translated into all 40 Keycloak locales.イベントリスナーでユーザーに正規化済みの形を保存。エラーメッセージはKeycloakの全40ロケールに翻訳済み

What it cannot do / limitsできないこと・制約3

  • Dot-stripping only applies to Gmail; other providers get only +tag removal.ドットの除去はGmailだけ。他のメールサービスは +タグ の除去のみ
  • Existing users need a manual backfill of email_canonical, and existing duplicates must be resolved by hand (no automatic merge).既存ユーザーには email_canonical を手作業で設定する必要があり、既存の重複も手で解消する(自動マージはしない)
  • Targets Keycloak 26.5.x with the declarative User Profile.対象は宣言的ユーザープロファイルを使うKeycloak 26.5.x

Requirements前提条件