Search in sources :

Example 21 with SecurityPolicyType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType in project midpoint by Evolveum.

the class SecurityQuestionAuthneticationEvaluatorImpl method getEffectiveCredentialPolicy.

@Override
protected CredentialPolicyType getEffectiveCredentialPolicy(SecurityPolicyType securityPolicy, SecurityQuestionsAuthenticationContext authnCtx) throws SchemaException {
    SecurityQuestionsCredentialsPolicyType policy = authnCtx.getPolicy();
    if (policy == null) {
        policy = SecurityUtil.getEffectiveSecurityQuestionsCredentialsPolicy(securityPolicy);
    }
    authnCtx.setPolicy(policy);
    return policy;
}
Also used : SecurityQuestionsCredentialsPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityQuestionsCredentialsPolicyType)

Example 22 with SecurityPolicyType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType in project midpoint by Evolveum.

the class SecurityHelper method postProcessPasswordCredentialPolicy.

private void postProcessPasswordCredentialPolicy(SecurityPolicyType securityPolicyType, PasswordCredentialsPolicyType passwd, Task task, OperationResult result) {
    // Deprecated settings
    Integer passwordHistoryLength = passwd.getPasswordHistoryLength();
    if (passwordHistoryLength != null && passwd.getHistoryLength() == null) {
        passwd.setHistoryLength(passwordHistoryLength);
    }
    ObjectReferenceType passwordPolicyRef = passwd.getPasswordPolicyRef();
    if (passwordPolicyRef != null && passwd.getValuePolicyRef() == null) {
        passwd.setValuePolicyRef(passwordPolicyRef.clone());
    }
    ValuePolicyType valuePolicyType = postProcessCredentialPolicy(securityPolicyType, passwd, "password credential policy", task, result);
    if (valuePolicyType != null) {
        setDeprecatedPasswordPolicyProperties(valuePolicyType, passwd);
    }
}
Also used : ObjectReferenceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType) ValuePolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType)

Aggregations

SecurityPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)13 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)6 ObjectReferenceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType)6 ValuePolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType)5 CredentialsPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsPolicyType)4 RestartResponseException (org.apache.wicket.RestartResponseException)4 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)3 MailAuthenticationPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.MailAuthenticationPolicyType)3 NonceCredentialsPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.NonceCredentialsPolicyType)3 SecurityQuestionsCredentialsPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityQuestionsCredentialsPolicyType)3 SmsAuthenticationPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SmsAuthenticationPolicyType)3 AbstractAuthenticationPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractAuthenticationPolicyType)2 PasswordCredentialsPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordCredentialsPolicyType)2 ArrayList (java.util.ArrayList)2 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 Task (com.evolveum.midpoint.task.api.Task)1 ObjectPolicyConfigurationEditor (com.evolveum.midpoint.web.component.ObjectPolicyConfigurationEditor)1 AEPlevel (com.evolveum.midpoint.web.page.admin.configuration.dto.AEPlevel)1 ObjectViewDto (com.evolveum.midpoint.web.page.admin.dto.ObjectViewDto)1 MyPasswordQuestionsPanel (com.evolveum.midpoint.web.page.admin.home.component.MyPasswordQuestionsPanel)1