AEM forms支援對「使用者管理」中尚未存在的使用者進行即時布建。 利用即時布建,當使用者的憑證成功驗證後,系統會自動將使用者新增至「使用者管理」。 此外,相關角色和群組會動態指派給新使用者。
傳統驗證的運作方式如下:
當使用者嘗試登入AEM表單時,「使用者管理」會依序將使用者的憑證傳遞至所有可用的驗證提供者。 (登錄憑據包括用戶名/密碼組合、Kerberos票證、PKCS7簽名等。)
驗證提供程式驗證憑據。
然後,驗證提供程式將檢查用戶是否存在於用戶管理資料庫中。 可能的結果如下:
存在: 如果用戶是最新的和未鎖定的,則用戶管理返回身份驗證成功。 但是,如果用戶不是當前用戶或已鎖定用戶,則User Management將返回身份驗證失敗。
不存在: 用戶管理返回驗證失敗。
無效: 用戶管理返回驗證失敗。
評估驗證提供程式返回的結果。 如果驗證提供程式返回驗證成功,則允許用戶登錄。 否則,「使用者管理」會與下一個驗證提供者檢查(步驟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
供您動態建立使用者。 建立用戶時會使用與域中目錄關聯的資訊。