OAuth凭据的智能标记疑难解答 oauth-config

需要开放授权配置才能同意Adobe Experience Manager应用程序以安全方式与智能内容服务交互。

NOTE
从2024年6月起,您无法创建新的JWT凭据。 今后,仅创建OAuth服务器到服务器凭据。
JWT集成仅对现有AMS和内部部署用户持续工作至2025年1月。

新AMS用户的OAuth配置 oauth-config-existing-ams-users

有关新用户的OAuth服务的配置,请参阅智能内容服务的配置。 完成后,请按照以下步骤操作

NOTE
如果需要,您可以按照支持流程提交支持票证。

现有AMS用户的OAuth配置 oauth-config-new-ams-users

在执行此方法中的任何步骤之前,您需要实施以下内容:

先决条件 prereqs-config-oauth-onprem

OAuth配置需要以下先决条件:

  • Developer Console中创建新的OAuth集成。 在以下步骤中使用ClientIDClientSecretOrgID和其他属性:

  • 在此路径/apps/system/config in crx/de上可找到以下文件:

    • com.**adobe**.granite.auth.oauth.accesstoken.provider.<randomnumbers>.config
    • com.adobe.granite.auth.ims.impl.IMSAccessTokenRequestCustomizerImpl.<randomnumber>.config

现有AMS和On Prem用户的OAuth配置 steps-config-oauth-onprem

以下步骤可由系统管理员执行。 在支持流程之后,AMS客户可以联系Adobe代表或提交支持工单。

  1. com.adobe.granite.auth.oauth.accesstoken.provider.<randomnumbers>.config中添加或更新以下属性:

    • auth.token.provider.authorization.grants="client_credentials"

    • auth.token.provider.orgId="<OrgID>"

    • auth.token.provider.default.claims=("\"iss\"\ :\ \"<OrgID>\"")

    • auth.token.provider.scope="read_pc.dma_smart_content,\ openid,\ AdobeID,\ additional_info.projectedProductContext"

      auth.token.validator.type="adobe-ims-similaritysearch"

    • 使用新OAuth配置的客户端ID更新auth.token.provider.client.id

    • auth.access.token.request更新至"https://ims-na1.adobelogin.com/ims/token/v3"

  2. 将文件重命名为com.adobe.granite.auth.oauth.accesstoken.provider-<randomnumber>.config

  3. com.adobe.granite.auth.ims.impl.IMSAccessTokenRequestCustomizerImpl.<randomnumber>.config中执行以下步骤:

    • 通过新的OAuth集成,使用客户端密钥更新属性auth.ims.client.secret。
    • 将文件重命名为com.adobe.granite.auth.ims.impl.IMSAccessTokenRequestCustomizerImpl-<randomnumber>.config
  4. 在内容存储库开发控制台(例如,CRXDE)中保存所有更改。

  5. System/console/configMgr中,删除com.adobe.granite.auth.ims.impl.IMSAccessTokenRequestCustomizerImpl和访问令牌提供程序名称adobe-ims-similaritysearch的旧配置。

  6. 重新启动控制台。

验证配置 validate-the-configuration

完成配置后,可以使用JMX MBean来验证配置。 要进行验证,请执行以下步骤。

  1. 访问位于https://[aem_server]:[port]的Experience Manager服务器。

  2. 转到​ 工具 > 操作 > Web控制台 ​以打开OSGi控制台。 单击​ 主 > JMX

  3. 单击 com.day.cq.dam.similaritysearch.internal.impl. 它会打开​ SimilaritySearch其他任务

  4. 单击 validateConfigs(). 在​ 验证配置 ​对话框中,单击​ 调用

验证结果将显示在同一对话框中。

与Adobe Developer Console集成 integrate-adobe-io

作为新用户,当您与Adobe Developer Console集成时,Experience Manager服务器会先通过Adobe Developer Console网关验证您的服务凭据,然后再将您的请求转发到智能内容服务。 要集成,您需要一个拥有组织管理员权限的Adobe ID帐户,以及一个已购买并为您的组织启用的Smart Content Service许可证。

要配置智能内容服务,请按照以下顶级步骤操作:

通过创建智能内容服务配置下载公共证书 download-public-certificate

公共证书允许您在Adobe Developer Console上验证配置文件。

  1. 在Experience Manager用户界面中,访问​ 工具 > Cloud Service > 旧版Cloud Service

  2. 在“Cloud Service”页面中,单击​ Assets智能标记 ​下的​ 立即配置

  3. 在​ 创建配置 ​对话框中,指定智能标记配置的标题和名称。 单击​ 创建

  4. 在​ AEM Smart Content Service ​对话框中,使用以下值:

    服务URLhttps://smartcontent.adobe.io/<region where your Experience Manager author instance is hosted>

    例如,https://smartcontent.adobe.io/apac。您可以将naemeaapac指定为承载Experience Manager创作实例的区域。

    note note
    NOTE
    如果Experience Manager托管服务是在2022年9月1日之前配置的,请使用以下服务URL:
    https://mc.adobe.io/marketingcloud/smartcontent

    授权服务器https://ims-na1.adobelogin.com

    其他字段暂时留空(稍后提供)。 单击​ 确定

    Experience Manager智能内容服务对话框以提供内容服务URL

    图:用于提供内容服务URL的Smart Content Service对话框

    note note
    NOTE
    提供为服务URL的URL无法通过浏览器访问,并生成404错误。 使用服务URL参数的相同值时,配置工作正常。 有关整体服务状态和维护计划,请参阅https://status.adobe.com
  5. 单击​ 下载OAuth集成的公共证书,然后下载公共证书文件AEM-SmartTags.crt。 此外,您不再需要在Adobe开发人员控制台中上传此证书。

    为智能标记服务创建的设置的表示形式

    图:智能标记服务的设置。

创建Adobe Developer Console集成 create-adobe-i-o-integration

要使用Smart Content Service API,请在Adobe Developer Console中创建集成,以获取Experience Manager中云配置的Assets智能标记服务设置的API密钥 (在Adobe Developer Console集成的客户端ID字段中生成)、技术帐户ID、组织ID和客户端密钥。

  1. 在浏览器中访问https://developer.adobe.com/console/。 选择相应的帐户并验证关联的组织角色是否为系统管理员。

  2. 创建具有任何所需名称的项目。单击​ 添加 API

  3. 在​ 添加 API 页面中,依次选择 Experience Cloud 和​ 智能内容。单击​ 下一步

  4. 选择​ OAuth服务器到服务器 ​身份验证方法。

  5. 根据需要添加/修改​ 凭据名称。 单击​ 下一步

  6. 选择产品配置文件​ 智能内容服务。 单击​ 保存配置的API。 OAuth API会添加到连接的凭据下,以供进一步使用。 您可以从中复制API密钥(客户端ID)或生成访问令牌。

oauth配置
图:在Adobe Developer Console中配置了OAuth服务器到服务器

配置智能内容服务 configure-smart-content-service

要配置集成,请使用Adobe Developer Console集成中的技术帐户ID、组织ID、客户端密钥和客户端ID字段的值。 创建智能标记云配置允许来自Experience Manager部署的API请求的身份验证。

  1. 在Experience Manager中,导航到​ 工具 > Cloud Service > 旧版Cloud Services ​以打开Cloud Services控制台。

  2. 在​ Assets智能标记 ​下,打开上面创建的配置。 在服务设置页面上,单击​ 编辑

  3. AEM 智能内容服务 ​对话框中,为​ 服务 URL 和​ 授权服务器 ​字段使用预填充的值。

  4. 对于字段Api密钥、技术帐户ID、组织ID和客户端密钥,请复制并使用在Adobe Developer Console集成中生成的以下值。

    table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2
    Assets智能标记服务设置 Adobe Developer Console集成字段
    Api密钥 客户端ID
    技术帐户ID 技术帐户ID
    组织ID 组织ID
    客户端密码 客户端密钥
recommendation-more-help
19ffd973-7af2-44d0-84b5-d547b0dffee2