OfficialSPISecurity / Bot protectionActive

Keycloak-GeoAware

B2-Code/Keycloak-GeoAware ↗

Geolocation-aware login checks and alerts.位置情報に基づくログイン検査・通知

★
22
Forks
5
Contributors
6
Updated
2026-07-22
KC
26.7.0
License
Apache-2.0

What it can doできること5

  • React at login to an IP change, an unknown IP or an unknown location (country and city) by emailing the user, denying access, logging or disabling the account.ログイン時に、IPの変化・未知のIP・未知の場所(国と都市)を検知して、通知メール・アクセス拒否・ログ記録・アカウント無効化のいずれかを実行
  • Do the same for device changes or unknown devices (browser and operating system).端末(ブラウザとOS)の変化や未知の端末にも、同じように対応できる
  • Provide standalone conditions for Keycloak's conditional sub-flows, so any authenticator (e.g. OTP) can be the action.Keycloakの条件付きサブフロー用の条件だけを提供するモードもあり、アクションには任意のAuthenticator(OTPなど)を使える
  • Add GeoIP information (IP, city, postal code, country) to tokens via a mapper.マッパーで、GeoIP情報(IP・都市・郵便番号・国)をトークンに追加
  • Look up locations with IPinfo, MaxMind web service, or a local MaxMind database (optionally auto-downloaded and updated).位置の判定には、IPinfo、MaxMindのWebサービス、ローカルのMaxMind DB(自動ダウンロード・更新も可)を使える

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

  • Accuracy depends on the GeoIP provider; private or localhost IPs carry no location, so "unknown location" always matches for them.精度はGeoIPの提供元に依存する。プライベートIPやlocalhostには位置情報がなく、「未知の場所」の条件に常に該当してしまう
  • Device detection relies on the spoofable User-Agent header and does not identify a physical device — switching browsers looks like a new device.端末の判定は偽装可能なUser-Agentに基づき、物理的な端末は識別できない。ブラウザを変えるだけで別の端末と見なされる
  • The JAR must be present at Keycloak build time; mounting it at container start is not enough.JARはKeycloakのビルド時に存在している必要があり、コンテナ起動時のマウントだけでは不十分

Requirements前提条件