外部データソース external-data-sources

このページ:​サードパーティ REST API に接続して認証を設定し、条件とパーソナライゼーションに外部データをジャーニーに取り込む方法について説明します。

外部データソースの操作 gs-ext-data-sources

外部データソースを使用すると、サードパーティシステムへの接続を定義できます。例えば、ホテルの予約システムを使用して、部屋が登録されたかどうかを確認する場合などです。 組み込みの Adobe Experience Platform データソースとは異なり、外部データソースは必要な分だけ作成できます。

NOTE
  • 外部システムを操作する際のガードレールについて詳しくは、このページを参照してください。

  • 応答がサポートされるようになったので、外部データソースのユースケースでは、データソースの代わりにカスタムアクションを使用する必要があります。 応答について詳しくは、カスタムアクション応答を参照してください。 データレイクの永続性を持たないカスタムアクションは、データがジャーニー内でのみ有効で、API エンドポイント経由で外部システムにアクセスできる場合に適した選択肢です。 すべてのデータアクセスオプションの比較について詳しくは、データアクセス戦略の選択を参照してください。

POST または GET を使用して JSON を返す REST API がサポートされています。 サポートされている認証モードは、認証、API キー、基本、カスタムではありません。

リアルタイムの気象データに応じてジャーニーの行動をカスタマイズするために使用したい気象API サービスの例を見てみましょう。

以下に API 呼び出しの例を 2 つ示します。

  • https://api.adobeweather.org/weather?city=London,uk&appid=1234
  • https://api.adobeweather.org/weather?lat=35&lon=139&appid=1234

呼び出しにはメイン URL(https://api.adobeweather.org/weather)、2 つのパラメーターセット(都市の場合は「city」、緯度と経度の場合は「lat/long」)、および API キー(appid)が含まれます。

TIP
有効期限の不一致と 401 エラーを回避するために、特にワークロードが大きい場合は、外部 API のトークンの有効期限と Journey Optimizer の cacheDuration 設定の間に 1 分以上のバッファーを残すことをお勧めします。

外部データソースの作成と設定 create-ext-data-sources

新しい外部データソースを作成して設定する主な手順は次のとおりです。

  1. データソースのリストで「データソースを作成」をクリックして、新しい外部データソースを作成します。

    「データソースを作成」ボタンがハイライト表示されたデータソースリスト画面

    画面の右側にデータソース設定ペインが開きます。

    画面の右側に開いたデータソース設定パネル

  2. データソースの名前を入力します。

英数字とアンダースコアのみが使用できます。 最大長は 30 文字です。

  1. データソースに説明を追加します。 この手順はオプションです。

  2. 外部サービスの URL を追加します。 この例では、次のようになります。https://api.adobeweather.org/weather。

    note caution
    CAUTION
    セキュリティ上の理由から、HTTPS の使用を強くお勧めします。 また、アドビの非公開アドレスや IP アドレスの使用は許可されていません。

    天気 API エンドポイントの例が入力された外部データソース URL フィールド

  3. 外部サービスの設定に応じて認証を​認証なし、基本、カスタム​または API キー​に設定します。

    基本認証モードの場合は、ユーザー名とパスワードを入力する必要があります。

    note
    NOTE
    • 認証呼び出しを実行すると、base64 でエンコードされた <username>:<password> 文字列が認証ヘッダーに追加されます。

    • Adobe Journey Optimizer では、カスタムアクションで定義された秘密鍵を自動的に暗号化します。 各組織の暗号化キーは、その組織に関連付けられた専用の保管庫で安全に管理されます。 資格情報をインターフェイスに表示する際、誤って公開されないように、デフォルトではマスクされます。

    カスタム認証モードについて詳しくは、カスタム認証モードの節を参照してください。 この例では、以下のように API キー認証モードを選択します。

    • タイプ:API キー

    • 名前:“appid”(API キーのパラメーター名)

    • 値:“1234”(API キーの値)

    • 位置:「クエリパラメーター」(API キーは URL 内にあります)

      タイプ、名前、値、位置の入力を示す API キー認証フィールド

  4. 「新しいフィールドグループを追加」をクリックして、API パラメーターセットごとに新しいフィールドグループを追加します。 フィールドグループ名には、英数字とアンダースコアのみを使用できます。 最大長は 30 文字です。 この例では、各パラメーターセット(都市と経度/緯度)ごとに 1 つずつ、2 つのフィールドグループを作成する必要があります。

「long/lat」パラメーターセットの場合、次の情報を含むフィールドグループを作成します。

  • 使用場所:フィールドグループを使用するジャーニーの数を表示します。 ジャーニーを表示​アイコンをクリックし、このフィールドグループを使用するジャーニーのリストを表示できます。
  • メソッド:POST または GET メソッドを選択します。 この場合は、GET メソッドを選択します。
  • 動的な値:この例では、「long,lat」というコンマで区切られた異なるパラメーターを入力します。 パラメーター値は実行コンテキストに依存するので、ジャーニーで定義されます。 式の詳細情報
  • 応答ペイロード:ペイロード​フィールド内でクリックし、呼び出しによって返されたペイロードの例をペーストします。 この例では、天気 API の web サイトにあるペイロードを使用しました。 フィールドタイプが正しいことを確認します。 API が呼び出されるたびに、ペイロードの例に含まれるすべてのフィールドが取得されます。 現在渡されているペイロードを変更する場合、「新しいペイロードをペースト」をクリックします。
  • 送信済みペイロード:このフィールドは、この例では表示されません。 POST メソッドを選択した場合にのみ使用できます。 サードパーティシステムに送信されるペイロードをペーストします。

GET 呼び出しにパラメーターが必要な場合は、「 動的な値」フィールドにパラメーターを入力すると、呼び出しの最後に自動的に追加されます。 POST 呼び出しの場合は、次の操作が必要です。

  • 呼び出し時に渡すパラメーターを「動的な値」フィールドにリストします(以下の例では「identifier」)。
  • また、送信済みペイロードの本文で同じ構文を使用して指定します。 そのためには、「“param”: “パラメーター名”」(以下の例では「identifier」)を追加する必要があります。 次の構文に従います。
{"id":{"param":"identifier"}}

動的な値と応答ペイロードフィールドを含むフィールドグループ設定パネル

変更を保存すると、データソースが設定され、ジャーニーで使用できる状態になります。例えば、条件で使用したり、メールをパーソナライズしたりできます。 温度が 30°C を超える場合、特定のコミュニケーションを送信するようにできます。

カスタム認証モード custom-authentication-mode

カスタム認証モードは、複雑な認証に使用され、OAuth2 などの API ラッピングプロトコルの呼び出しに頻繁に使用されます。これにより、アクションの実際の HTTP リクエストに挿入するアクセストークンが取得されます。

カスタム認証を設定する場合は、「クリックして認証を確認」ボタンを使用して、カスタム認証ペイロードが正しく設定されているかどうかを制御します。

データソース設定のカスタム認証テストボタン

テストに成功すると、ボタンが緑色に変わります。

緑色に変わり、検証が成功したことを示す認証テストボタン

この認証モードでは、アクションの実行は次の 2 つの手順で構成されます。

  1. エンドポイントを呼び出して、アクセストークンを生成します。
  2. アクセストークンを適切な方法で挿入して、REST API を呼び出します。
NOTE
この認証には 2 つの部分があります。

アクセストークンの生成時に呼び出されるエンドポイントの定義 custom-authentication-endpoint

  • endpoint:エンドポイントの生成に使用する URL

  • エンドポイントでの HTTP リクエストのメソッド(GET または POST)

  • headers:必要に応じて、この呼び出しにヘッダーとして挿入されるキーと値のペア

  • body:メソッドが POST の場合の呼び出しの本文を説明します。 bodyParams(キーと値のペア)で定義された限定的な本文構造をサポートしています。 bodyType は、呼び出しでの本文の形式とエンコーディングを記述します。

    • form:コンテンツタイプが application/x-www-form-urlencoded(文字セット UTF-8)で、キーと値のペアが key1=value1&key2=value2&… のようにシリアル化されることを意味します。
    • json:コンテンツタイプが application/json(文字セット UTF-8)で、キーと値のペアが JSON オブジェクトとして { “key1”: “value1”, “key2”: “value2”, …} のようにシリアル化されることを意味します。

アクションの HTTP リクエストにアクセストークンを挿入する方法の定義 custom-authentication-access-token

  • authorizationType:生成されたアクセストークンをアクションの HTTP 呼び出しに挿入する方法を定義します。 使用可能な値は次のとおりです。

    • bearer:Authorization: Bearer <access token> のように、アクセストークンを Authorization ヘッダーに挿入する必要があることを示します。
    • header:プロパティ tokenTarget で定義されたヘッダー名のヘッダーとして、アクセストークンを挿入する必要があることを示します。 例えば、tokenTarget が myHeader の場合、アクセストークンは myHeader: <access token> のようにヘッダーとして挿入されます。
    • queryParam:プロパティ tokenTarget で定義されたクエリパラメーター名である queryParam として、アクセストークンを挿入する必要があることを示します。 例えば、tokenTarget が myQueryParam の場合、アクション呼び出しの URL は <url>?myQueryParam=<access token> のようになります。
  • tokenInResponse:認証呼び出しからアクセストークンを抽出する方法を示します。 このプロパティには次のようなものがあります。

    • response:HTTP 応答がアクセストークンであることを示します。
    • JSON 内のセレクター(応答が JSON であると仮定し、XML などの他の形式はサポートされません)。 このセレクターの形式は json://<path to the access token property> です。 例えば、呼び出しの応答が​{ "access token": “theToken”, “timestamp”: 12323445656 }の場合、tokenInResponseは json://access_token_になります

この認証の形式は次のとおりです。

{
    "type": "customAuthorization",
    "endpoint": "<URL of the authentication endpoint>",
    "method": "<HTTP method to call the authentication endpoint, in 'GET' or 'POST'>",
    (optional) "headers": {
        "<header name>": "<header value>",
        ...
    },
    (optional, mandatory if method is 'POST') "body": {
        "bodyType": "<'form'or 'json'>,
        "bodyParams": {
            "param1": value1,
            ...
        }
    },
    "tokenInResponse": "<'response' or json selector in format 'json://<field path to access token>'",
    "cacheDuration": {
        (optional, mutually exclusive with 'duration') "expiryInResponse": "<json selector in format 'json://<field path to expiry>'",
        (optional, mutually exclusive with 'expiryInResponse') "duration": <integer value>,
        "timeUnit": "<unit in 'milliseconds', 'seconds', 'minutes', 'hours', 'days', 'months', 'years'>"
    },
    "authorizationType": "<value in 'bearer', 'header' or 'queryParam'>",
    (optional, mandatory if authorizationType is 'header' or 'queryParam') "tokenTarget": "<name of the header or queryParam if the authorizationType is 'header' or 'queryParam'>",
}
NOTE
Encode64 は、認証ペイロードで使用できる唯一の関数です。

カスタム認証データソース用のトークンのキャッシュ時間を変更できます。 次に、カスタム認証ペイロードの例を示します。 キャッシュ時間は、cacheDuration パラメーターで定義されます。 キャッシュ内の生成されたトークンの保持期間を指定します。 単位はミリ秒、秒、分、時間、日、月、年です。

Bearer 認証タイプの例を次に示します。

{
    "type": "customAuthorization",
    "endpoint": "https://<your_auth_endpoint>/epsilon/oauth2/access_token",
    "method": "POST",
    "headers": {
      "Authorization": "Basic EncodeBase64(<epsilon Client Id>:<epsilon Client Secret>)"
    },
    "body": {
      "bodyType": "form",
      "bodyParams": {
        "scope": "cn mail givenname uid employeeNumber",
        "grant_type": "password",
        "username": "<epsilon User Name>",
        "password": "<epsilon User Password>"
      }
    },
    "tokenInResponse": "json://access_token",
    "cacheDuration": {
      "duration": 5,
      "timeUnit": "minutes"
    },
  },
NOTE
  • 認証トークンは、ジャーニーごとにキャッシュされます。2 つのジャーニーが同じカスタムアクションを使用している場合、それぞれのジャーニーに独自のトークンがキャッシュされます。 そのトークンは、これらのジャーニー間で共有されません。

  • キャッシュ時間を使用すると、認証エンドポイントへの呼び出しが多くなりすぎないようにすることができます。 認証トークンの保持はサービスにキャッシュされ、永続性はありません。 サービスを再起動した場合は、キャッシュがクリーンアップされた状態でサービスが開始されます。 デフォルトのキャッシュ時間は 1 時間です。 カスタム認証ペイロードでは、別の保持時間を指定することで調整することができます。

証明書ベースのカスタム認証 certificate-credential

Microsoft Entra IDなどの証明書ベースのID検証を強制するエンタープライズ APIの場合、カスタム認証ペイロードに"subType": "certificateCredential"を追加することで、証明書ベースのカスタム認証を設定できます。 デフォルトでは、Journey OptimizerはAdobeのマネージド証明書を使用して、RS256とJWT クライアントアサーションに署名し、アクセストークンと交換します。 このデフォルトのRS256 オプションでは、クライアント秘密鍵は必要ありません。 同じペイロードは、Adobe証明書ではなくOAuth クライアントシークレットを使用したHMAC署名もサポートしています。

このオプションは、標準の customAuthorization スキーマに、subType と aud という 2 つの必須フィールドを追加します。 その他のすべてのフィールド(endpoint、method、body params、tokenInResponse)は変更されません。 subType が存在しない場合、動作は標準のカスタム認証と同じになり、既存の設定には影響しません。

  • subType:証明書ベースの認証をアクティブ化するには、"certificateCredential" に設定します。
  • aud:JWT クライアントアサーションに含まれるオーディエンス値。 Microsoft Entra ID の場合、これは endpoint URLと同じですが、常に明示的に設定する必要があります。
  • alg (オプション): JWT署名アルゴリズム。 サポートされている値はRS256 (デフォルト)、HS256、HS384、およびHS512です。 algが存在しないかRS256に設定されている場合、既存のRSA フローは変更されません。 認証がテストまたは実行されると、小文字を含むその他の値は拒否されます。 このフィールドは、カスタム認証ペイロードで設定します。署名アルゴリズムに個別のUI コントロールはありません。

client_assertion および client_assertion_type フィールドがユーザーによって作成されることはありません。 これらは、トークンエンドポイント呼び出しの直前に、実行時にプラットフォームによって自動的に挿入されます。

RS256認証の仕組み certificate-credential-how-it-works

証明書ベースのカスタム認証は、RFC 7523 で定義されているように、JWT クライアントアサーションを使用して OAuth 2.0 クライアント資格情報を実装します。これは、Microsoft Entra ID と Okta でサポートされているのと同じ標準です。 Journey Optimizer は、クライアント秘密鍵の代わりに、アドビが管理する秘密鍵で署名された JWT を使用して ID を証明します。 ID プロバイダーは、ID プロバイダーに一度登録したアドビの公開証明書を使用して署名を検証します。

トークン交換には、次の手順に従います。

  1. Journey Optimizer は、アドビの秘密鍵で署名された JWT クライアントアサーションを作成します。
  2. アサーションは、client_id、grant_type、scope と共にトークンエンドポイントに送信されます。
  3. ID プロバイダーは、アドビの登録済み公開証明書に対して JWT 署名を検証します。
  4. ID プロバイダーは、ベアラーアクセストークンを返します。
  5. Journey Optimizer は、そのトークンを使用して、カスタムアクションエンドポイントを呼び出します。

アドビ証明書の詳細 certificate-credential-details

デフォルトのRS256 オプションの場合、Adobeは証明書と関連する秘密鍵を管理します。 次の表に、主なプロパティの概要を示します。 これらの証明書の要件は、HMAC署名には適用されません。

プロパティ
値
発行元
DigiCert(パブリック CA)
管理元
Adobe
アルゴリズム
RS256 (RSA)、デフォルトのJWT署名オプション
ID プロバイダーに登録する内容
アドビのリーフ証明書のみ(中間 CA やルート CAではない)
取得方法
mTLS Public Certificate API から取得します(以下の​ 証明書 ​ガードレールを参照)
ローテーション
アドビは、有効期限の 60 日前に証明書を自動的にローテーションします(証明書の有効期間:13 か月)。 以前の証明書は、有効期限の 30 日前まで有効です。 現時点では、お客様へのローテーションの通知は行われません。定期的に mTLS Public Certificate API を呼び出して expiryDate を確認し、古い証明書が失効する前に IDP を再設定してください。

アドビは、有効期限の 60 日前に証明書を自動的にローテーションします。 以前の証明書は、有効期限の 30 日前まで有効です。 現在、お客様には通知されていません。プログラムでローテーションを監視する方法については、以下の​証明書(RS256のみ) ガードレール ​を参照してください。

JWT アサーション構造 certificate-credential-jwt

証明書ベースのカスタム認証を設定する際は、次のガードレールに留意してください。

  • トークンエンドポイント URL:HTTPS である必要があります。 ?を含むURLは避けてください。これは、認証エンドポイントがトークンエンドポイントの代わりに貼り付けられたサインです。
  • method:POST である必要があります。 OAuth トークンエンドポイントは、POST リクエストのみを受け入れます。
  • client_id:空白にしないでください。先頭または末尾に空白を含めないでください。 空白の値を指定すると、一見有効な JWT が生成されますが、ID プロバイダーはこれを却下し、内容が不透明なエラーを返します。
  • scope:bodyParams で、スペース区切りの単一の文字列として表されます。 合計で最大 1000 文字です。
  • 証明書(RS256のみ):Adobeが証明書と秘密鍵を管理します。証明書をアップロードしたり入力したりすることはありません。 RS256のライブジャーニーでカスタムアクションを使用する前に、ID プロバイダーに​ Adobe リーフ証明書 ​を登録する必要があります。 取得するには、mTLS Public Certificate API を呼び出し、certCommonName が ajo-journeys.aep-mtls.adobe.com であるエントリを探します。 中間またはルート CA証明書ではなく、そのエントリからpublicCertificate値を登録します。 現在、証明書のローテーションの通知は行われないので、定期的に mTLS Public Certificate API を呼び出して expiryDate を確認し、有効期限の 30 日前に古い証明書が失効する前に、IDP の登録済み証明書を更新する必要があります。 HMAC署名には、Adobe証明書の登録は必要ありません。

JWT クライアントアサーションは作成しません。Journey Optimizerが生成し、署名します。 ここに、ID プロバイダーチームが要求を検証できるように、想定される構造をここに示します。

次のヘッダーとペイロードは、デフォルトのRS256 オプションに適用されます。 HMACの違いについては、HMAC署名JWT クライアントアサーション ​を参照してください。

ヘッダー:

{
  "alg": "RS256",
  "x5t": "<base64url SHA-1 thumbprint of Adobe's leaf certificate>"
}

ペイロード:

{
  "iss": "<client_id>",
  "sub": "<client_id>",
  "aud": ["<aud value>"],
  "iat": "<current unix timestamp>",
  "exp": "<iat + 600 seconds>",
  "jti": "<unique UUID per request>"
}

次の事項に注意してください。

  • RS256の場合、expはiat + 600秒(10分)で、OktaおよびEntra IDの要件と一致します。 HMACの場合、expはiat + 300秒(5分)です。
  • 各アサーションは一意の jti を使用するので、リプレイ攻撃に対して安全です。
  • client_assertion および client_assertion_type は、プラットフォームによって自動的に挿入され、作成することはできません。

Microsoft Entra ID の証明書資格情報認証タイプの例を以下に示します。

{
  "type": "customAuthorization",
  "subType": "certificateCredential",
  "aud": "https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token",
  "authorizationType": "bearer",
  "endpoint": "https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token",
  "method": "POST",
  "body": {
    "bodyType": "form",
    "bodyParams": {
      "client_id": "<your-client-id>",
      "grant_type": "client_credentials",
      "scope": "https://api.example.com/.default"
    }
  },
  "tokenInResponse": "json://access_token"
}

Okta の同じ証明書資格情報認証タイプの例を以下に示します。

{
  "type": "customAuthorization",
  "subType": "certificateCredential",
  "authorizationType": "bearer",
  "endpoint": "https://<your-okta-domain>/oauth2/v1/token",
  "aud": "https://<your-okta-domain>/oauth2/v1/token",
  "method": "POST",
  "body": {
    "bodyType": "form",
    "bodyParams": {
      "client_id": "<your-okta-app-client-id>",
      "grant_type": "client_credentials",
      "scope": "<your-api-scope>"
    }
  },
  "tokenInResponse": "json://access_token"
}

ヘッダー認証タイプの例を次に示します。

{
  "type": "customAuthorization",
  "endpoint": "https://myapidomain.com/v2/user/login",
  "method": "POST",
  "headers": {
    "x-retailer": "any value"
  },
  "body": {
    "bodyType": "form",
    "bodyParams": {
      "secret": "any value",
      "username": "any value"
    }
  },
  "tokenInResponse": "json://token",
  "cacheDuration": {
    "expiryInResponse": "json://expiryDuration",
    "timeUnit": "minutes"
  },
  "authorizationType": "header",
  "tokenTarget": "x-auth-token"
}

ログイン API 呼び出しの応答の例を次に示します。

{
  "token": "xDIUssuYE9beucIE_TFOmpdheTqwzzISNKeysjeODSHUibdzN87S",
  "expiryDuration" : 5
}
CAUTION
カスタムアクションのカスタム認証を設定する際、ネストされた JSON オブジェクト(例:bodyParams 内のサブオブジェクト)が​ サポート ​されます。

HMAC署名JWT クライアントアサーション hmac-credential

AVAILABILITY
HMAC署名JWT認証は、制限付き可用性で利用できます。

HMAC署名を使用するには、カスタム認証ペイロードでalgをHS256、HS384またはHS512に設定します。 Journey Optimizerは、署名キーとしてOAuth client_secretを使用します。 ID プロバイダーは、同じシークレットとアルゴリズムでclient_secret_jwtを受け入れる必要があります。 Adobe証明書の登録は必要ありません。

HMACには、body.bodyParamsのRS256: "subType": "certificateCredential"、明示的なaud、"method": "POST"、"bodyType": "form"、およびclient_idと同じフィールドが必要です。 さらに、client_secretをbody.bodyParamsに追加します。 秘密鍵の最小長は、文字ではなくUTF-8 バイトで測定されます。

アルゴリズム
最小client_secret長
HS256
32 バイト
HS384
48 バイト
HS512
64 バイト

Journey Optimizerは​ not ​からclient_secretをトークンエンドポイントに送信しません。 他の作成済みbodyParamsを送信し、client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearerとclient_assertionを自動的に追加します。

HMAC JWTはtyp: JWTを使用し、選択したalgはx5tなしでexpはiat + 300秒で、RS256は600秒です。

AI Knowledge Reference

This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.

For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.

  • TL;DR: External data sources define a connection to third-party REST APIs, with an authentication mode and field groups, so that the data they return can be used in journeys, for example in conditions or to personalize an email.

Intents:

  • Create an external data source from the list of data sources with Create Data Source, and enter its name, an optional description and the URL of the external service.
  • Configure the authentication of an external data source: No authentication, Basic, Custom or API key.
  • Add a field group for each API parameter set, with its Method, Dynamic Values, Response Payload and, for the POST method, Sent Payload.
  • Configure the custom authentication mode: the endpoint that generates the access token, the way the access token is injected in the HTTP request, and the cache duration of the token.
  • Configure certificate-based custom authentication with the default RS256 option or with HMAC signing.

Glossary:

  • External data source (product-specific): A connection to third-party systems, for example a hotel booking system used to check if the person has registered a room.
  • Field group (product-specific): Added for each API parameter set of the external service with Add a New Field Group. Its settings are Used in, Method, Dynamic Values, Response Payload and, for the POST method, Sent Payload. In the weather example, one field group is created for each parameter set (city and long/lat).
  • Used in: Displays the number of journeys that use a field group. The View journeys icon displays the list of journeys using this field group.
  • Dynamic Values: The parameters of a field group, separated by a comma. Since the parameter values depend on the execution context, they are defined in the journeys.
  • Response Payload: An example of the payload returned by the call, pasted in the Payload field. Each time the API is called, the system retrieves all the fields included in the payload example. Paste a new payload changes the payload currently passed.
  • Sent Payload: The payload sent to the third-party system. It is only available if you select the POST method.
  • Basic authentication mode: An authentication mode that requires a username and a password. When the authentication call is performed, the <username>:<password> string, encoded in base64, is added in the Authentication header.
  • Custom authentication mode (product-specific): An authentication mode used for complex authentication, frequently used to call API wrapping protocols such as OAuth2, to retrieve an access token to be injected in the real HTTP request for the action. The action execution is a two-step process: call the endpoint to generate the access token, then call the REST API by injecting the access token.
  • authorizationType: Defines how the generated access token is injected in the HTTP call for the action. Values: bearer (in the Authorization header, as Authorization: Bearer <access token>), header (as a header whose name is defined by tokenTarget) and queryParam (as a query parameter whose name is defined by tokenTarget).
  • tokenInResponse: Indicates how to extract the access token from the authentication call: response (the HTTP response is the access token) or a JSON selector in the format json://<path to the access token property>.
  • cacheDuration: The parameter of the custom authentication payload that specifies the retention duration of the generated token in the cache, with an optional expiryInResponse (a JSON selector in the format json://<field path to expiry>) or an optional duration (an integer value), and a timeUnit.
  • Certificate-based custom authentication (product-specific): A custom authentication configured by adding "subType": "certificateCredential" to the custom authorization payload, for enterprise APIs that enforce certificate-based identity verification, such as Microsoft Entra ID. By default, Journey Optimizer uses Adobe’s managed certificate to sign a JWT client assertion with RS256 and exchange it for an access token; no client secret is required for this default RS256 option. When subType is absent, behavior is identical to standard custom authentication and existing configurations are not affected.
  • aud: The audience value included in the JWT client assertion. For Microsoft Entra ID, it is the same as the endpoint URL, but it must always be explicitly set.
  • alg: The optional JWT signing algorithm of certificate-based custom authentication. RS256 is the default. It is configured in the custom authorization payload; there is no separate UI control for the signing algorithm.
  • JWT client assertion: The assertion that Journey Optimizer generates and signs, as defined in RFC 7523. You do not author it. The client_assertion and client_assertion_type fields are automatically injected by the platform at runtime, immediately before the token endpoint call. For RS256, exp is iat + 600 seconds (10 minutes); for HMAC, exp is iat + 300 seconds (5 minutes). Each assertion uses a unique jti, which makes it replay-attack safe.
  • Adobe certificate: For the default RS256 option, the certificate issued by DigiCert (public CA) and managed by Adobe, with its associated private key. You never upload or enter a certificate.
  • HMAC-signed JWT client assertions: Certificate-based custom authentication with alg set to HS256, HS384 or HS512. Journey Optimizer uses your OAuth client_secret as the signing key. The HMAC JWT uses typ: JWT and the selected alg, without x5t. HMAC-signed JWT authentication is available in Limited Availability.

Guardrails:

  • REST APIs using POST or GET and returning JSON are supported. The supported authentication modes are no authentication, API key, basic and custom.
  • Data source name: only alphanumeric characters and underscores are allowed; maximum length of 30 characters (hard limit).
  • Field group name: only alphanumeric characters and underscores are allowed; maximum length of 30 characters (hard limit).
  • The URL of the external service cannot use Adobe addresses that are not publicly available, nor IP addresses.
  • For a POST call, the parameters listed in Dynamic Values must also be specified with the exact same syntax in the body of the sent payload.
  • Encode64 is the only function available in the authentication payload.
  • The tokenInResponse JSON selector assumes that the response is a JSON; other formats such as XML are not supported.
  • In the custom authentication payload, body is mandatory if the method is POST, and tokenTarget is mandatory if authorizationType is header or queryParam. In cacheDuration, expiryInResponse and duration are mutually exclusive.
  • The cache duration of the authentication token is 1 hour (default). It can be adapted in the custom authentication payload.
  • The authentication token is cached per journey: if two journeys are using the same custom action, each journey has its own token cached, and that token is not shared between those journeys. Authentication token retention is cached in services, with no persistence: if a service is restarted, it starts with a clean cache.
  • Certificate-based custom authentication adds two mandatory fields to the standard customAuthorization schema: subType and aud.
  • alg supported values: RS256, HS256, HS384 and HS512. Any other value, including lowercase, is rejected when the authentication is tested or executed.
  • Certificate-based custom authentication token endpoint URL: must be HTTPS. Avoid URLs containing ?, which is a sign the authorization endpoint was pasted instead of the token endpoint.
  • Certificate-based custom authentication method: must be POST.
  • Certificate-based custom authentication client_id: must not be blank and must have no leading or trailing whitespace. A blank value produces a valid-looking JWT that the Identity Provider will reject with an opaque error.
  • Certificate-based custom authentication scope: expressed as a single space-separated string in bodyParams; maximum 1000 characters total (hard limit).
  • Adobe certificate rotation (RS256): Adobe automatically rotates the certificate 60 days before expiry (certificate lifetime: 13 months). The previous certificate remains valid until 30 days before expiry. Customers are not currently notified of rotation, so you must periodically call the mTLS Public Certificate API to check the expiryDate and update the registered certificate in your IDP before the old certificate is revoked 30 days before expiry.
  • HMAC: in addition to the fields required for RS256 ("subType": "certificateCredential", an explicit aud, "method": "POST", "bodyType": "form" and client_id in body.bodyParams), add client_secret to body.bodyParams.
  • HMAC minimum client_secret length, measured in UTF-8 bytes, not characters: 32 bytes for HS256, 48 bytes for HS384, 64 bytes for HS512.

Prerequisites and permissions:

  • RS256 certificate-based custom authentication: before using the custom action in a live journey with RS256, you must register Adobe’s leaf certificate in your Identity Provider. To retrieve it, call the mTLS Public Certificate API, find the entry where certCommonName is ajo-journeys.aep-mtls.adobe.com and register its publicCertificate value, not the intermediate or root CA certificates.
  • HMAC signing: your identity provider must accept client_secret_jwt with the same secret and algorithm.

Applicability:

  • The Adobe certificate requirements apply to the default RS256 option. They do not apply to HMAC signing, which does not require Adobe certificate registration.

Terminology:

  • Canonical name: Adobe Journey Optimizer — Acronym: AJO — variants: Journey Optimizer
  • Canonical name: Adobe Experience Platform — Acronym: AEP — variants: Platform
  • Canonical name: Identity Provider — Acronym: IDP — variants: identity provider
  • Canonical name: OAuth 2.0 — variants: OAuth2
  • Do not confuse: “external data source” ≠ “built-in Adobe Experience Platform data source”. As opposed to the built-in Adobe Experience Platform data source, you can create as many external data sources as you need.
  • Do not confuse: “RS256” (signed with Adobe’s managed private key, verified with Adobe’s registered public certificate) ≠ “HMAC signing” (signed with your OAuth client_secret).

FAQ:

  • Should I use a data source or a custom action for external data? As the responses are now supported, you should use custom actions instead of data sources for external data sources use-cases. Custom Actions without Data Lake persistence are the right choice when the data is only useful inside the journey and the external system is accessible via an API endpoint.
  • How are parameters passed in a GET call and in a POST call? In a GET call, you enter the parameters in the Dynamic Values field and they are automatically added at the end of the call. In a POST call, you list the parameters in the Dynamic Values field and also specify them in the body of the sent payload, for example {"id":{"param":"identifier"}}.
  • How do I check that the custom authentication payload is correctly configured? Use the Click to check the authentication button. When the test is successful, the button turns green.
  • How long is the custom authentication token cached? The cache duration by default is 1 hour. You can change it with the cacheDuration parameter of the custom authentication payload, in milliseconds, seconds, minutes, hours, days, months or years. Cache duration helps to avoid too many calls to the authentication endpoints.
  • Does certificate-based custom authentication require a client secret? No client secret is required for the default RS256 option. With HMAC signing, Journey Optimizer uses your OAuth client_secret as the signing key and does not send client_secret to the token endpoint; it sends the other authored bodyParams and automatically adds client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer and client_assertion.
  • Are nested JSON objects supported in custom authentication? Yes. When configuring custom authentication for a custom action, nested JSON objects (for example, sub-objects within bodyParams) are supported.
  • How are secrets protected? Adobe Journey Optimizer automatically encrypts secrets defined in custom actions. Each organization’s encryption keys are managed in a dedicated vault tied to their organization. When credentials are displayed in the interface, they are masked by default.

Examples:

  • Weather API data source: the calls https://api.adobeweather.org/weather?city=London,uk&appid=1234 and https://api.adobeweather.org/weather?lat=35&lon=139&appid=1234 are composed of a main URL (https://api.adobeweather.org/weather), two parameter sets (“city” for the city and “lat/long” for the latitude and longitude) and the API key (appid).
  • API key authentication for the weather example: Type “API key”, Name “appid” (the API key parameter name), Value “1234” (the value of the API key), Location “Query parameter” (the API key is located in the URL).
  • Field group for the “long/lat” parameter set: Method GET, Dynamic Values “long,lat”, and a Response Payload example found on a weather API website.
  • Use in a journey: if the temperature is above 30°C, you can decide to send a specific communication.
  • Header authentication type: authorizationType set to header with tokenTarget set to x-auth-token, tokenInResponse set to json://token and cacheDuration with expiryInResponse set to json://expiryDuration and timeUnit set to minutes.
  • Certificate credential authentication type for Microsoft Entra ID and for Okta: "subType": "certificateCredential", authorizationType set to bearer, aud set to the same URL as the token endpoint, method POST, bodyType set to form with client_id, grant_type set to client_credentials and scope, and tokenInResponse set to json://access_token.

Best practices:

  • Recommendation: leave at least a one-minute buffer between the external API’s token expiration period and your Journey Optimizer cacheDuration setting, especially under heavy workloads, to avoid expiration mismatches and 401 errors.
  • Recommendation: use HTTPS for the URL of the external service, for security reasons (strongly recommended).

Related pages:

Personas:

  • developer: Can write the custom authentication payload with endpoint, method, headers, body, tokenInResponse, cacheDuration, authorizationType and tokenTarget. Can set authorizationType to bearer, header or queryParam. The page states that Encode64 is the only function available in the authentication payload. Where: “Custom authentication mode”.
  • admin: Can create an external data source with a name, an optional description and the URL of the external service. Can configure the authentication as No authentication, Basic, Custom or API key. The page states that the name allows only alphanumeric characters and underscores, with a maximum length of 30 characters. Where: “Create and configure an external data source”.

Onboarding:

  • Level: Intermediate, Experienced
  • First minimal step: From the list of data sources, select Create Data Source to create a new external data source.
  • Success check: Once your changes are saved, the data source is configured and ready to be used in your journeys.
recommendation-more-help
journey-optimizer-help