use of com.hazelcast.security.SecurityContext in project hazelcast by hazelcast.
the class ExecutorServiceSubmitToPartitionMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
SecurityContext securityContext = clientEngine.getSecurityContext();
Data callableData = parameters.callable;
if (securityContext != null) {
Subject subject = getEndpoint().getSubject();
Callable callable = serializationService.toObject(parameters.callable);
callable = securityContext.createSecureCallable(subject, callable);
callableData = serializationService.toData(callable);
}
return new CallableTaskOperation(parameters.name, parameters.uuid, callableData);
}
use of com.hazelcast.security.SecurityContext in project hazelcast by hazelcast.
the class DurableExecutorSubmitToPartitionMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
SecurityContext securityContext = clientEngine.getSecurityContext();
Data callableData = parameters.callable;
if (securityContext != null) {
Subject subject = getEndpoint().getSubject();
Callable callable = serializationService.toObject(parameters.callable);
callable = securityContext.createSecureCallable(subject, callable);
callableData = serializationService.toData(callable);
}
return new TaskOperation(parameters.name, callableData);
}
use of com.hazelcast.security.SecurityContext in project hazelcast by hazelcast.
the class AbstractMessageTask method interceptBefore.
private void interceptBefore(Credentials credentials) {
final SecurityContext securityContext = clientEngine.getSecurityContext();
final String methodName = getMethodName();
if (securityContext != null && methodName != null) {
final String objectType = getDistributedObjectType();
final String objectName = getDistributedObjectName();
securityContext.interceptBefore(credentials, objectType, objectName, methodName, getParameters());
}
}
use of com.hazelcast.security.SecurityContext in project hazelcast by hazelcast.
the class AbstractMessageTask method interceptAfter.
private void interceptAfter(Credentials credentials) {
final SecurityContext securityContext = clientEngine.getSecurityContext();
final String methodName = getMethodName();
if (securityContext != null && methodName != null) {
final String objectType = getDistributedObjectType();
final String objectName = getDistributedObjectName();
securityContext.interceptAfter(credentials, objectType, objectName, methodName);
}
}
use of com.hazelcast.security.SecurityContext in project hazelcast by hazelcast.
the class ExecutorServiceSubmitToAddressMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
SecurityContext securityContext = clientEngine.getSecurityContext();
Data callableData = parameters.callable;
if (securityContext != null) {
Callable callable = serializationService.toObject(parameters.callable);
Subject subject = getEndpoint().getSubject();
callable = securityContext.createSecureCallable(subject, callable);
callableData = serializationService.toData(callable);
}
MemberCallableTaskOperation op = new MemberCallableTaskOperation(parameters.name, parameters.uuid, callableData);
op.setCallerUuid(endpoint.getUuid());
return op;
}
Aggregations