@Override public void run() { if (workContext.getSecurityHelper() != null) { //if using the inheritable thread local security or if unassocation has been sloppy, there may a security context associated workContext.getSecurityHelper().clearSecurityContext(); } workContext.runInContext(r); }
@Override public void run() { if (workContext.getSecurityHelper() != null) { //if using the inheritable thread local security or if unassocation has been sloppy, there may a security context associated workContext.getSecurityHelper().clearSecurityContext(); } workContext.runInContext(r); }
@Override public void run() { if (workContext.getSecurityHelper() != null) { //if using the inheritable thread local security or if unassocation has been sloppy, there may a security context associated workContext.getSecurityHelper().clearSecurityContext(); } workContext.runInContext(r); }
private void processMessagePacket(Message packet) { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_TRANSPORT, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_TRANSPORT, "processing message:" + packet); //$NON-NLS-1$ } workContext.getSession().setLastPingTime(System.currentTimeMillis()); if (this.workContext.getSecurityHelper() != null) { this.workContext.getSecurityHelper().clearSecurityContext(); } final ServerWorkItem work = new ServerWorkItem(this, packet.getMessageKey(), packet, this.csr); this.workContext.runInContext(work); }
public static boolean sameSubject(DQPWorkContext workContext) { Object currentContext = workContext.getSecurityHelper().getSecurityContext(); if (currentContext != null) { Subject currentUser = workContext.getSecurityHelper().getSubjectInContext(workContext.getSecurityDomain()); if (workContext.getSubject() != null && currentUser != null && workContext.getSubject().equals(currentUser)) { return true; } if (currentUser == null && workContext.getSubject() == null) { return true; //unauthenticated } } return false; }
public synchronized void authenticate() throws ConnectionException, CommunicationException { Object previousSecurityContext = workContext.getSecurityHelper().associateSecurityContext(workContext.getSession().getSecurityContext()); try { logoff(); } finally { workContext.getSecurityHelper().associateSecurityContext(previousSecurityContext);
private DQPWorkContext createWorkContext(final CommandContext context, VDBMetaData vdb) { SessionMetadata session = createTemporarySession(context.getUserName(), "asynch-mat-view-load", vdb); //$NON-NLS-1$ session.setSubject(context.getSubject()); session.setSecurityDomain(context.getSession().getSecurityDomain()); session.setSecurityContext(context.getSession().getSecurityContext()); DQPWorkContext workContext = new DQPWorkContext(); workContext.setAdmin(true); DQPWorkContext current = context.getDQPWorkContext(); workContext.setSession(session); workContext.setPolicies(current.getAllowedDataPolicies()); workContext.setSecurityHelper(current.getSecurityHelper()); return workContext; }
private DQPWorkContext createWorkContext(final CommandContext context, VDBMetaData vdb) { SessionMetadata session = createTemporarySession(context.getUserName(), "asynch-mat-view-load", vdb); //$NON-NLS-1$ session.setSubject(context.getSubject()); session.setSecurityDomain(context.getSession().getSecurityDomain()); session.setSecurityContext(context.getSession().getSecurityContext()); DQPWorkContext workContext = new DQPWorkContext(); workContext.setAdmin(true); DQPWorkContext current = context.getDQPWorkContext(); workContext.setSession(session); workContext.setPolicies(current.getAllowedDataPolicies()); workContext.setSecurityHelper(current.getSecurityHelper()); return workContext; }
private DQPWorkContext createWorkContext(final CommandContext context, VDBMetaData vdb) { SessionMetadata session = createTemporarySession(context.getUserName(), "asynch-mat-view-load", vdb); //$NON-NLS-1$ session.setSubject(context.getSubject()); session.setSecurityDomain(context.getSession().getSecurityDomain()); session.setSecurityContext(context.getSession().getSecurityContext()); DQPWorkContext workContext = new DQPWorkContext(); workContext.setAdmin(true); DQPWorkContext current = context.getDQPWorkContext(); workContext.setSession(session); workContext.setPolicies(current.getAllowedDataPolicies()); workContext.setSecurityHelper(current.getSecurityHelper()); return workContext; }