メインコンテンツへスキップ
Auth0をIDプロバイダーとして使用するように、アプリケーション(サービスプロバイダー)を構成することができます。Auth0には、いくつかの汎用されるWS-Fedアプリケーションがあらかじめ構成されており、シングルサインオン統合に利用することができます。シングルサインオン統合のリストにWS-Fedアプリケーションが含まれていない場合には、以下の方法でWS-Fedアプリケーションの構成にアクセスできます。
  1. [Dashboard]>[Applications(アプリケーション)]>[Applications(アプリケーション)] に移動します。
  2. [Create App(アプリの作成)] をクリックします。
  3. 名前を入力して、[Save(保存)] をクリックします。
  4. [Addons(アドオン)] タブに移動します。
    1つのクライアントに対してSAMLアドオンとWD-Fedアドオンの両方を有効化することは、サポートされていません。動作が一貫しない可能性があります。アドオンごとに個別のクライアントを使用してください。
  5. [WS-Fed Web App(WS-Fed Webアプリ)] までスクロールして、[Application Callback URL(アプリケーションのCallback URL)] を入力します。これは、WS-FedアプリケーションのコールバックURLで、ここにWS-Fed応答がPOSTされます。アプリケーションによっては、このURLをACS またはAssertion Consumer Service URL と呼ぶこともあります。
  6. [Realm(領域)] を入力します。これは、WS-Fedアプリケーションが送信する識別子で、応答内でアプリケーションを識別するのに使用されます。

WS-Fedトークン応答に含まれるクレームを構成する

Webアプリのアドオンとは異なり、WS-Fed Webアプリのアドオンには、Auth0が生成するトークンを構成するための構成設定がありません。デフォルトの設定を変更しなければならない場合には、以下のようなルールを作成することができます。
function (user, context, callback) {

  // only apply changes for the WS-Fed application
  if (context.clientName !== 'Your ws-fed application name') {
    return callback(null, user, context);
  }

  // exclude the upn claim creation (defaults to true)
  context.samlConfiguration.createUpnClaim = false;

  // exclude the identities array (defaults to true)
  context.samlConfiguration.mapIdentities = false;

  // exclude claims that were not explicitly mapped (defaults to true)
  context.samlConfiguration.passthroughClaimsWithNoMapping = false;

  // this is the default mapping. Remove or change as you like.
  // Note that the key (left side) is the attribute name (namespace-qualified)
  // and the value (right side) is the property name from the user object.
  // you can also use transient values from the user object. For example, for:
  //    user.calculated_field = <some expression>;
  // then add this mapping:
  //    'some_claim': 'calculated_field', 
  context.samlConfiguration.mappings = {
    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier': 'user_id',
    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress': 'email',
    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name': 'name',
    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname': 'given_name',
    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname': 'family_name',
    'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn': 'upn',
    'http://schemas.xmlsoap.org/claims/Group': 'groups'
  };

  callback(null, user, context);
}

カスタムドメイン

WS-Fedアプリにカスタムドメインを使用し、Auth0をとして使う場合には、Auth0からのIDプロバイダーメタデータでサービスプロバイダーを更新します。メタデータは次から取得できます: https://<YOUR CUSTOM DOMAIN>/wsfed/FederationMetadata/2007-06/FederationMetadata.xml

暗号化された応答

暗号化された応答が必要な場合には、SAML使ってADFSに接続する必要があります。詳細については、「ADFSをSAML IDプロバイダーとして構成する」と「SAML要求を署名して暗号化する」をお読みください。

もっと詳しく

I