- 03 Jun 2022
- 2 Minutes to read
- Print
- DarkLight
Profiles Actions
- Updated on 03 Jun 2022
- 2 Minutes to read
- Print
- DarkLight
getPortalChallengeSetPolicy
Retrieve the Challenge Set information for a target DN
Property | Value | Description |
connection* | expression, variable | the Portal connection definition |
targetDN* | text, expression, variable | the DN of the target to query |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
The returned object is a record that will have the following fields:
Field | Description |
“challengePolicyId” | The ID of the ARMS Challenge Policy associated with the target |
“adminQuestions” | The Admin questions required by the Challenge Policy (if any) |
“numUserQuestions” | The number of User questions required by the Challenge Policy (may be 0) |
targetDN = "CN=user,OU=people,DC=example,DC=com"
challengeSetupDefn = getPortalChallengeSetPolicy(connection,
targetDN)
challengePolicyId = getRecordFieldValue(challengeSetupDefn,
"challengePolicyId")
adminQuestions = getRecordFieldValues(challengeSetupDefn,
"adminQuestions")
numUserQuestions = getRecordFieldValue(challengeSetupDefn,
"numUserQuestions")
isPasswordValidForPortalUser
Determines if the provided password is valid for the specified User's current Portal Password Policy.
Property | Value | Description |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
connection* | expression, variable | the Portal connection object obtained from invoking definePortalConnection |
password* | text | the password to check for validity |
userDNOrId | text, expression, variable | the ID or DN or the user to check password validity for |
portalConn = definePortalConnection("https://localhost:8443", "jdoe", <Password>, true)
isValid = isPasswordValidForPortalUser(portalConn, <Password>, "cn=jdoe,ou=employees,ou=people,o=idauto,dc=meta")
if (isValid)_ {
log("The password is valid", "INFO")
} else {
log("The password is invalid", "INFO")
}
setPortalChallengeSetAnswers
Set challenge questions and answers for a target DN
Property | Value | Description |
connection* | expression, variable | the Portal connection definition |
targetDN* | text, expression, variable | the DN of the target whose challenge questions will be updated |
challengePolicyId* | text, expression, variable | the ID of the Portal Challenge Policy for the target |
adminQAs | text, expression, variable | A record containing Admin questions and associated answers |
userQAs | text, expression, variable | A record containing User questions and associated answers |
helpdeskQAs | text, expression, variable | A record containing Helpdesk questions and associated answers |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
adminQAs = createRecord(false)
addRecordFieldValue(adminQAs, "Admin Question 1", "Admin Answer 1",
false)
addRecordFieldValue(adminQAs, "Admin Question 2", "Admin Answer 2",
false)
userQAs = createRecord(false)
addRecordFieldValue(userQAs, "User Question 1", "User Answer 1",
false)
addRecordFieldValue(userQAs, "User Question 2", "User Answer 2",
false)
# Example of creating a Record from an object literal
helpdeskQAs = createRecordFromObject({"Helpdesk Question 1":
"Helpdesk Answer 1"})
success = setPortalChallengeSetAnswers(connection, targetDN,
challengePolicyId, adminQAs, userQAs, helpdeskQAs)
getPortalDefaultPasswordPolicyID
Retrieves the ID of the default Portal Password Policy.
Property | Value | Description |
connection* | expression, variable | the Portal connection definition |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
defaultPolicyId = getPortalDefaultPasswordPolicyID(connection)
getPortalPasswordPolicyID
Retrieves the ID of the Portal Password Policy associated with a particular user.
Property | Value | Description |
connection* | expression, variable | the Portal connection definition |
userDNorID* | text, expression, variable | the DN or IdautoID of the target user |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
defaultPolicyId = getPortalPasswordPolicyID(connection)
generatePortalPasswordForUser
Generates a random password for a user based on their current Portal Password Policy.
Property | Value | Description |
connection* | expression, variable | the Portal connection definition |
userDNorID* | text, expression, variable | the DN or IdautoID of the target user |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
randomPassword = generatePortalPasswordForUser(connection,
"CN=John Simpson,OU=people,DC=example,DC=com")
generatePortalPasswordForPolicy
Generates a random password based on the specified Portal Password Policy ID.
Property | Value | Description |
connection* | expression, variable | the Portal connection definition |
policyId* | text, expression, variable | the Portal Password Policy ID |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
policyId = getPortalDefaultPasswordPolicyID(connection)
randomPassword = generatePortalPasswordForPolicy(connection, policyId)