Class SecurityHelper
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.security.SecurityHelper
-
- All Implemented Interfaces:
ModelAuditRecorder
@Component public class SecurityHelper extends Object implements ModelAuditRecorder
- Author:
- semancik
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTEXTUAL_PROPERTY_AUDITED_NAME
-
Constructor Summary
Constructors Constructor Description SecurityHelper()
-
Method Summary
-
-
-
Field Detail
-
CONTEXTUAL_PROPERTY_AUDITED_NAME
public static final String CONTEXTUAL_PROPERTY_AUDITED_NAME
-
-
Method Detail
-
auditLoginSuccess
public void auditLoginSuccess(@NotNull @NotNull FocusType user, @NotNull @NotNull ConnectionEnvironment connEnv)
- Specified by:
auditLoginSuccess
in interfaceModelAuditRecorder
-
auditLoginSuccess
public void auditLoginSuccess(@NotNull @NotNull NodeType node, @NotNull @NotNull ConnectionEnvironment connEnv)
-
auditLoginFailure
public void auditLoginFailure(@Nullable @Nullable String username, @Nullable @Nullable FocusType focus, @NotNull @NotNull ConnectionEnvironment connEnv, String message)
- Specified by:
auditLoginFailure
in interfaceModelAuditRecorder
-
auditLogout
public void auditLogout(ConnectionEnvironment connEnv, Task task)
- Specified by:
auditLogout
in interfaceModelAuditRecorder
-
getUsernameFromMessage
public String getUsernameFromMessage(javax.xml.soap.SOAPMessage saajSoapMessage) throws org.apache.wss4j.common.ext.WSSecurityException
- Throws:
org.apache.wss4j.common.ext.WSSecurityException
-
getSOAPMessage
public javax.xml.soap.SOAPMessage getSOAPMessage(org.apache.cxf.binding.soap.SoapMessage msg)
-
locateSecurityPolicy
public <F extends FocusType> SecurityPolicyType locateSecurityPolicy(PrismObject<F> focus, PrismObject<SystemConfigurationType> systemConfiguration, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
Returns security policy applicable for the specified user. It looks for organization and global policies and takes into account deprecated properties and password policy references. The resulting security policy has all the (non-deprecated) properties set. If there is also referenced value policy, it is will be stored as "object" in the value policy reference inside the returned security policy.
-
locateFocusSecurityPolicy
public <F extends FocusType> SecurityPolicyType locateFocusSecurityPolicy(PrismObject<F> focus, Task task, OperationResult result) throws SchemaException
- Throws:
SchemaException
-
locateGlobalSecurityPolicy
public <F extends FocusType> SecurityPolicyType locateGlobalSecurityPolicy(PrismObject<F> focus, PrismObject<SystemConfigurationType> systemConfiguration, Task task, OperationResult result) throws CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
locateProjectionSecurityPolicy
public SecurityPolicyType locateProjectionSecurityPolicy(RefinedObjectClassDefinition structuralObjectClassDefinition, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
-
getSecurityEnforcer
public SecurityEnforcer getSecurityEnforcer()
-
-