@Override public SecurityIdentity getSecurityIdentity() { return connection.getLocalIdentity(); } }
public SecurityIdentity getLocalIdentity() { return delegate.getLocalIdentity(); }
public SecurityIdentity getLocalIdentity(final int id) { return delegate.getLocalIdentity(id); }
private SecurityIdentity getSecurityIdentity(int msgId, int invId, int secContext, boolean hasSecContext) { SecurityIdentity securityIdentity; if (hasSecContext) { securityIdentity = channel.getConnection().getLocalIdentity(secContext); } else { securityIdentity = channel.getConnection().getLocalIdentity(); } if(!securityIdentity.implies(RemoteTransactionPermission.getInstance())) { writeExceptionResponse(msgId, invId, P_SEC_EXC, log.noPermission(securityIdentity.getPrincipal().getName(), RemoteTransactionPermission.getInstance())); return null; } return securityIdentity; }
methodLocator = unmarshaller.readObject(EJBMethodLocator.class); int identityId = unmarshaller.readInt(); identity = identityId == 0 ? connection.getLocalIdentity() : connection.getLocalIdentity(identityId); } else { assert version <= 2; identity = connection.getLocalIdentity();
void handleSessionOpenRequest(final int invId, final MessageInputStream inputStream) throws IOException { final String appName = inputStream.readUTF(); final String moduleName = inputStream.readUTF(); final String distName = inputStream.readUTF(); final String beanName = inputStream.readUTF(); final int securityContext; final ExceptionSupplier<ImportResult<?>, SystemException> transactionSupplier; if (version >= 3) { securityContext = inputStream.readInt(); transactionSupplier = readTransaction(inputStream); } else { securityContext = 0; transactionSupplier = null; } final Connection connection = channel.getConnection(); final EJBIdentifier identifier = new EJBIdentifier(appName, moduleName, beanName, distName); association.receiveSessionOpenRequest(new RemotingSessionOpenRequest( invId, identifier, transactionSupplier, connection.getLocalIdentity(securityContext))); }
@Override public SecurityIdentity getSecurityIdentity() { return connection.getLocalIdentity(); } }
public SecurityIdentity getLocalIdentity(final int id) { return delegate.getLocalIdentity(id); }
public SecurityIdentity getLocalIdentity() { return delegate.getLocalIdentity(); }
@Override public void handleEvent(final Event event) throws IOException { final SecurityIdentity localIdentity = channel.getConnection().getLocalIdentity(); InetSocketAddress peerSocketAddress = channel.getConnection().getPeerAddress(InetSocketAddress.class); final InetAddress remoteAddress = peerSocketAddress != null ? peerSocketAddress.getAddress() : null; try { AccessAuditContext.doAs(localIdentity, remoteAddress, new PrivilegedExceptionAction<Void>() { @Override public Void run() throws IOException { SecurityActions.currentAccessAuditContext().setAccessMechanism(AccessMechanism.JMX); event.run(); return null; } }); } catch (PrivilegedActionException e) { Exception cause = e.getException(); if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
private SecurityIdentity getSecurityIdentity(int msgId, int invId, int secContext, boolean hasSecContext) { SecurityIdentity securityIdentity; if (hasSecContext) { securityIdentity = channel.getConnection().getLocalIdentity(secContext); } else { securityIdentity = channel.getConnection().getLocalIdentity(); } if(!securityIdentity.implies(RemoteTransactionPermission.getInstance())) { writeExceptionResponse(msgId, invId, P_SEC_EXC, log.noPermission(securityIdentity.getPrincipal().getName(), RemoteTransactionPermission.getInstance())); return null; } return securityIdentity; }
private SecurityIdentity getSecurityIdentity(int msgId, int invId, int secContext, boolean hasSecContext) { SecurityIdentity securityIdentity; if (hasSecContext) { securityIdentity = channel.getConnection().getLocalIdentity(secContext); } else { securityIdentity = channel.getConnection().getLocalIdentity(); } if(!securityIdentity.implies(RemoteTransactionPermission.getInstance())) { writeExceptionResponse(msgId, invId, P_SEC_EXC, log.noPermission(securityIdentity.getPrincipal().getName(), RemoteTransactionPermission.getInstance())); return null; } return securityIdentity; }
methodLocator = unmarshaller.readObject(EJBMethodLocator.class); int identityId = unmarshaller.readInt(); identity = identityId == 0 ? connection.getLocalIdentity() : connection.getLocalIdentity(identityId); } else { assert version <= 2; identity = connection.getLocalIdentity();
methodLocator = unmarshaller.readObject(EJBMethodLocator.class); int identityId = unmarshaller.readInt(); identity = identityId == 0 ? connection.getLocalIdentity() : connection.getLocalIdentity(identityId); } else { assert version <= 2; identity = connection.getLocalIdentity();
@Override public ManagementChannelHandler startReceiving(Channel channel) { final ManagementChannelHandler handler = new ManagementChannelHandler(ManagementClientChannelStrategy.create(channel), getExecutor()); handler.addHandlerFactory(new ModelControllerClientOperationHandler(getController(), handler, getResponseAttachmentSupport(), getClientRequestExecutor(), channel.getConnection().getLocalIdentity())); channel.receiveMessage(handler.getReceiver()); return handler; } }
@Override public ManagementChannelHandler startReceiving(Channel channel) { final ManagementChannelHandler handler = new ManagementChannelHandler(ManagementClientChannelStrategy.create(channel), getExecutor()); handler.addHandlerFactory(new ModelControllerClientOperationHandler(getController(), handler, getResponseAttachmentSupport(), getClientRequestExecutor(), channel.getConnection().getLocalIdentity())); channel.receiveMessage(handler.getReceiver()); return handler; } }
void handleSessionOpenRequest(final int invId, final MessageInputStream inputStream) throws IOException { final String appName = inputStream.readUTF(); final String moduleName = inputStream.readUTF(); final String distName = inputStream.readUTF(); final String beanName = inputStream.readUTF(); final int securityContext; final ExceptionSupplier<ImportResult<?>, SystemException> transactionSupplier; if (version >= 3) { securityContext = inputStream.readInt(); transactionSupplier = readTransaction(inputStream); } else { securityContext = 0; transactionSupplier = null; } final Connection connection = channel.getConnection(); final EJBIdentifier identifier = new EJBIdentifier(appName, moduleName, beanName, distName); association.receiveSessionOpenRequest(new RemotingSessionOpenRequest( invId, identifier, transactionSupplier, connection.getLocalIdentity(securityContext))); }
void handleSessionOpenRequest(final int invId, final MessageInputStream inputStream) throws IOException { final String appName = inputStream.readUTF(); final String moduleName = inputStream.readUTF(); final String distName = inputStream.readUTF(); final String beanName = inputStream.readUTF(); final int securityContext; final ExceptionSupplier<ImportResult<?>, SystemException> transactionSupplier; if (version >= 3) { securityContext = inputStream.readInt(); transactionSupplier = readTransaction(inputStream); } else { securityContext = 0; transactionSupplier = null; } final Connection connection = channel.getConnection(); final EJBIdentifier identifier = new EJBIdentifier(appName, moduleName, beanName, distName); association.receiveSessionOpenRequest(new RemotingSessionOpenRequest( invId, identifier, transactionSupplier, connection.getLocalIdentity(securityContext))); }