AEM Forms支持及时配置用户管理中尚不存在的用户。 通过即时配置,用户的凭据成功验证后,会自动将其添加到用户管理中。 此外,相关角色和组被动态地分配给新用户。
传统身份验证的工作方式如下:
当用户尝试登录AEM表单时,用户管理会按顺序将用户的凭据传递到所有可用的身份验证提供程序。 (登录凭据包括用户名/密码组合、Kerberos票证、PKCS7签名等。)
身份验证提供程序将验证凭据。
然后,身份验证提供程序检查用户是否存在于用户管理数据库中。 可能会得到以下结果:
存在: 如果用户当前已解锁,则用户管理会返回身份验证成功。但是,如果用户不是当前用户或该用户被锁定,则用户管理会返回身份验证失败。
不存在: 用户管理返回身份验证失败。
无效: 用户管理返回身份验证失败。
将评估验证提供程序返回的结果。 如果身份验证提供程序返回身份验证成功,则允许用户登录。 否则,用户管理会与下一个身份验证提供程序进行检查(步骤2-3)。
如果没有可用的身份验证提供程序验证用户凭据,则返回身份验证失败。
当实施即时预配时,如果其中一个身份验证提供程序验证用户的凭据,则会在用户管理中动态创建新用户。 (在上述传统身份验证过程中的步骤3之后。)
AEM forms提供了以下API以供即时配置:
package com.adobe.idp.um.spi.authentication ;
publ ic interface IdentityCreator {
/**
* Tries to create a user with the in formation provided in the <code>UserProvisioningBO</code> object.
* If the user is successfully created, a valid AuthResponse is returned along with the information using which the user was created.
* It is the responsibility of the IdentityCreator to set the User obje ct in the cre dential map with th e ke y <code>UMA u thenticationUtil.authenticatedUserKey</code>
* The credentials are available in the <code>UserProvisioningBO</code> object in the 'credentials' property.
* If the IdentityCreator is unable to create a user due to any reason, it returns <code>null</code>
* @param userBO An object of <code>com.adobe. i dp.um . spi.authenti c ationUserProvisioningBO</code>
* @return */public AuthResponse create(UserProvisioningBO userBO);
/**
* Returns the name of the IdentityCreator which will be registered in preferences.
* This name is used to associate the IdentityProvider with the Auth Provider Configuration in the domain.
* @return The name of the Identity Creator which is recognized in Configuration.
*/
public String getName();
}
package com.adobe.idp.um.spi.authentication;
import com.adobe.idp.um.api.infomodel.User;
public interface AssignmentProvider {
/**
* Tries to assign roles or permissions or group memberships to users created via Just-in-time provisioning.
* @param user The User created via the Just-in-time provisioning process.
* @return a Boolean flag indicating whether the assignment was successful or not.
*/
public Boolean assign(User user);
/**
* Returns the name of the AssignmentProvider through which it is registered under preferences.
* This name is used to associate the AssignmentProvider with the Auth Provider Configuration in the domain.
* @return The name of the AssignmentProvider which is recognized in Configuration.
*/public String getName();
}
IdentityCreator
时,请确保为本地用户指定了虚拟密码。 请勿将此密码字段留空。DomainSpecificAuthentication
验证特定域的用户凭据。在“用于即时配置的API”部分中编写一个实施API的DSC。
将DSC部署到表单服务器。
创建刚启用时间的域:
保存新域。
假设用户尝试登录AEM表单,并且身份验证提供程序接受其用户凭据。 如果用户管理数据库中尚不存在该用户,则用户的身份检查将失败。 AEM Forms现在会执行以下操作:
UserProvisioningBO
对象,并将其置于凭据映射中。UserProvisioningBO
返回的域信息,获取并调用该域的注册IdentityCreator
和AssignmentProvider
。IdentityCreator
。 如果返回成功的AuthResponse
,则从凭据映射中提取UserInfo
。 将其传递到AssignmentProvider
,以便在创建用户后进行组/角色分配和任何其他后处理。即时配置功能随IdentityCreator
的默认实施一起提供,您可以使用该实施动态创建用户。 用户是使用与域中目录关联的信息创建的。