AEM Forms支援「使用者管理」中尚未存在的使用者即時布建。 透過即時布建,使用者在成功驗證其認證後,就會自動新增到「使用者管理」。 此外,相關的角色和群組會動態指派給新使用者。
這就是傳統驗證的工作方式:
當使用者嘗試登入AEM表單時,「使用者管理」會依序將使用者的認證傳遞給所有可用的驗證服務提供者。 (登入憑證包括使用者名稱/密碼組合、Kerberos票證、PKCS7簽名等。)
驗證提供者會驗證認證。
驗證提供者接著會檢查使用者是否存在於使用者管理資料庫中。 可能會出現以下結果:
存在: 如果使用者為最新狀態且已解除鎖定,「使用者管理」會傳回驗證成功。 但是,如果使用者不是最新使用者或已鎖定,「使用者管理」會傳回驗證失敗。
不存在: User Management傳回驗證失敗。
無效: 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
可用來以動態方式建立使用者的資訊。 使用者是以與網域中目錄相關聯的資訊建立的。