OIDC クライアントの設定¶
アプリケーションを FlexGalaxy のアイデンティティに統合するには、DotID で OIDC クライアントとして登録します。DotID は OAuth 2.0 / OpenID Connect トークンを発行します。アプリケーションはそれを認証済みセッションに交換でき、サービスは発行元 realm の JWKS エンドポイントに照らしてそれらのトークンを検証できます。
本ページでは登録手順・クライアント種別・DotID が強制する規約を解説します。
アプリを OIDC クライアントとして登録する¶
クライアントの登録方法は、利用者の立場に応じて 2 通りあります。
セルフサービス(開発者 API)¶
外部開発者は、開発者向けセルフサービス API を通じてアプリケーションを登録します:
POST /developer/v1/services
OIDC client(s) を宣言する service registration manifest を送信します(external developer API example を参照)。作成が成功すると 201 Created を返します。
Default: confidential. For native apps, mobile apps, SPAs, and CLIs, request a public client explicitly — the recommended shape for anything that runs on a user's device or in a browser. Set:
{ "public_client": true, "pkce": "S256" }
DotID は public client(token_endpoint_auth_method=none)を provision し、client_secret を返しません — public client は PKCE code_verifier の所有を証明することだけで認証します。public clients には 2 つの protocol mappers も自動的に付与されます:
audience mapper(
aud=flexgalaxy-api)。これにより、発行された access token が FlexGalaxy.AI API surface に受け入れられます。また、account_idmapper。これにより、サインイン済みユーザーの tenant を token から解決できます(tenant binding claims を参照)。
付与される scopes は openid profile email です。
サーバーサイド confidential client(シークレットを保持するもの)については、下の Confidential clients を参照してください。confidential client をリクエストしながら native(custom-scheme)または loopback redirect URI を宣言した場合、リクエストは 400 で拒否されます — DotID はそれをシークレットを持つクライアントへ静かにダウングレードしません。それらのリダイレクトには public client を使用してください。
認証情報は後から取得またはローテーションできます:
GET /developer/v1/services/{serviceId}/credentials
POST /developer/v1/services/{serviceId}/credentials/rotate
コンソール(first-party / admin)¶
プラットフォーム運用担当は、管理コンソールから自社製クライアントを登録します:
Sign in to https://admin-console.flexgalaxy.ai/stargate with platform admin credentials.
Applications セクションを開き、Register OIDC client を選択します。
次の項目を入力します:
Client ID —— 短く安定した識別子(lower-kebab-case)。OAuth リクエストの
client_idパラメータ値になります。Display name —— 同意画面でユーザーに表示される名称。
Realm —— クライアントを収容する realm(下の Realm とどこに登録するか を参照)。
Client type —— confidential か public か。
Redirect URIs —— クライアントが認可コードを受け取れる完全一致 URI。
Allowed scopes —— 通常は
openid profile emailに加え、サービスが必要とするカスタムスコープ。
保存すると DotID はクライアント ID と、confidential client の場合はクライアントシークレットを返します。シークレットは一度しか表示されないため、サービスのシークレットマネージャに保管してください。
アカウント管理者はアカウント管理コンソールからアカウントスコープのクライアントを登録します。コンソールは同じバックエンドに転送し、アカウントの realm をあらかじめ選択した状態で処理します。
クライアント種別¶
DotID は 2 つの標準 OAuth 2.0 client types をサポートします。ユーザーのデバイスまたはブラウザで動作するものには、public + PKCE client を推奨します。
Public clients¶
public client はシークレットを保持できません(browser SPAs、mobile apps、native apps、CLIs)。元の PKCE code verifier の所有を証明することだけで認証します — DotID は client_secret を返しません。次でリクエストしてください:
public_client: truepkce: S256
DotID は、PKCE verifier を含まない public clients からの authorization-code exchanges を拒否します。developer API を通じて登録された public clients には、aud(flexgalaxy-api)と account_id protocol mappers が自動的に付与され、openid profile email が許可されます。
Confidential clients¶
confidential client はサーバー側で動作し、シークレットを保持できます。client_secret(より厳格な構成では秘密鍵 JWT)を使ってトークンエンドポイントに対して認証します。次の用途に使用します:
サーバー側で認可コードを交換するバックエンドサービス。
client credentials grant を使うサービス間呼び出し。
クライアントプロセスがエンドユーザーに露出しない任意のフロー。
client_secret は create 時に一度だけ返されます — 直ちにサービスの secret manager に保存してください。
confidential client は native(カスタムスキーム)または loopback redirect URI を宣言できません。 そのようなリクエストは、シークレットを持つクライアントへダウングレードされるのではなく、400 で拒否されます — 代わりに、それらのリダイレクトは public client に登録してください。
サーバーサイドアプリの推奨ベースライン: confidential client + Authorization Code grant + S256 付き PKCE。client secret と PKCE の組み合わせにより、client-impersonation 攻撃と code-interception 攻撃の両方を防ぎます。
Server-side workforce broker¶
An Organization may opt a confidential backend/BFF into the password grant when it must authenticate its own Identity Center users without a hosted browser redirect:
{
"public_client": false,
"token_endpoint_auth_method": "client_secret_basic",
"direct_access_grants": true
}
The client is projected into the platform realm, scoped to the registering
account's Organization, with an independent secret per Organization. Credential
metadata and rotation resolve only through that Organization, so the broker
cannot obtain another Organization's client secret. Public clients requesting
direct_access_grants=true are rejected. Successful and failed direct-grant
logins are recorded by Keycloak realm events with the client and user context.
This flow makes the broker handle the user's password and cannot complete browser-only required actions. Prefer Authorization Code + PKCE whenever a redirect is acceptable; enable this exception only for a server process that can protect both the client secret and submitted credentials.
Realm と登録先¶
DotID issues tokens from named realms. Which realm hosts your client determines which users can sign in to it and which APIs trust the tokens it issues.
プラットフォーム全体のクライアント ——
flexgalaxyrealm に登録。任意の FlexGalaxy.AI ユーザー(アカウント横断)がサインインできるクライアントです。Account service clients — use the Account boundary for non-human service identities. They are not interactive console clients; human console login uses the platform realm.
Workforce / Identity Center clients — register against the
flexgalaxyrealm. The legacy per-org (idc-*) realms were retired: workforce sign-in and permission-set assumption ride the platform realm plus the account/org claims on the token.Platform-administration clients — register against the
fgai-adminsrealm.
自サービスが受け付けるべきトークンについては、API 認証と JWT 検証 を参照してください。
リダイレクト URI¶
DotID enforces exact-match redirect URIs. A registered URI of https://app.example.com/oauth2/callback does not match https://app.example.com/oauth2/callback/ (note the trailing slash) or https://app.example.com/oauth2/callback?foo=bar (extra query). Register every URI variant your application actually uses.
Redirect trust は URI の種類により階層化されます:
Redirect kind |
例 |
Trust |
|---|---|---|
Native custom-scheme |
|
Public client のみ。自動的に信頼されます。 |
Loopback |
|
Public client のみ。自動的に信頼されます(任意の port、exact path)。 |
Production |
|
public client の場合、host が |
production https:// redirect を持つ public client では、manifest の verified_domains に redirect host を含めてください(App Links / Universal Links domain proof):
{
"public_client": true,
"pkce": "S256",
"redirect_uris": ["https://app.example.com/oauth2/callback"],
"verified_domains": ["app.example.com"]
}
host が verified_domains に含まれていない https redirect は拒否されます — これにより、DotID が auth codes を送信する前に、そのアプリが domain を制御していることを証明します。
ルール:
すべての production redirect URIs には HTTPS が必要です。native/CLI flows では loopback
http://が許可されます。その他の non-loopbackhttp://は拒否されます。リダイレクト URI にワイルドカードは使えません。
Fragments(
#…)は redirect URIs では許可されません。標準的なコールバックパスは
/oauth2/callbackです。理由がない限りこの慣例に従ってください。
リクエスト可能なスコープ¶
スコープ |
効果 |
|---|---|
|
OIDC に必須。ID トークンを発行します。 |
|
ID トークンに |
|
|
|
ユーザーの所属グループを列挙する |
|
リフレッシュトークンを発行します。長時間動作するバックグラウンドプロセスに必要です。 |
カスタムスコープ(例:dotid:audit:read)はプラットフォーム運用担当が realm 単位で定義できます。本当に必要なスコープだけをリクエストしてください —— 過度に広いスコープ要求は同意画面で警告表示されるため、ユーザーの信頼を損ないます。
これらのスコープで発行されたトークンの検証方法は、API 認証と JWT 検証 を参照してください。