@Override public SecurityContext authenticate(String username, String password, X509Certificate[] peerCertificates) throws SecurityException { if (peerCertificates != null) { return this.sslBroker.authenticate(username, password, peerCertificates); } else { return this.nonSslBroker.authenticate(username, password, peerCertificates); } } }
public Broker installPlugin(Broker broker) { initialiseJaas(); return new JaasCertificateAuthenticationBroker(broker, configuration); } }
public Broker installPlugin(Broker broker) { initialiseJaas(); return new JaasDualAuthenticationBroker(broker, configuration, sslConfiguration); }
public Broker installPlugin(Broker parent) { SimpleAuthenticationBroker broker = new SimpleAuthenticationBroker(parent, userPasswords, userGroups); broker.setAnonymousAccessAllowed(anonymousAccessAllowed); broker.setAnonymousUser(anonymousUser); broker.setAnonymousGroup(anonymousGroup); return broker; }
public void afterPropertiesSet() throws Exception { if (adminRoles != null) { setAdminACLs(parseACLs(adminRoles)); } if (writeRoles != null) { setWriteACLs(parseACLs(writeRoles)); } if (readRoles != null) { setReadACLs(parseACLs(readRoles)); } } }
/** * Overriding removeConnection to make sure the security context is cleaned. */ @Override public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { super.removeConnection(context, info, error); if (isSSL(context, info)) { this.sslBroker.removeConnection(context, info, error); } else { this.nonSslBroker.removeConnection(context, info, error); } }
@Override public Set<Object> getAdminACLs(ActiveMQDestination destination) { Set<AuthorizationEntry> entries = getAllEntries(destination); Set<Object> answer = new WildcardAwareSet<Object>(); // now lets go through each entry adding individual for (Iterator<AuthorizationEntry> iter = entries.iterator(); iter.hasNext();) { AuthorizationEntry entry = iter.next(); answer.addAll(entry.getAdminACLs()); } return answer; }
/** * Provides synchronized and defensive access to the read ACLs for temp destinations as the super implementation * returns live copies of the ACLs and {@link AuthorizationEntry} is not setup for concurrent access. */ @Override public Set<Object> getTempDestinationReadACLs() { checkForUpdates(); DefaultAuthorizationMap map = this.map.get(); return transcribeSet(map.getTempDestinationReadACLs()); }
/** * Provides synchronized and defensive access to the write ACLs for temp destinations as the super implementation * returns live copies of the ACLs and {@link AuthorizationEntry} is not setup for concurrent access. */ @Override public Set<Object> getTempDestinationWriteACLs() { checkForUpdates(); DefaultAuthorizationMap map = this.map.get(); return transcribeSet(map.getTempDestinationWriteACLs()); }
public Broker installPlugin(Broker broker) { initialiseJaas(); return new JaasAuthenticationBroker(broker, configuration); }
@Override public Set<Object> getTempDestinationAdminACLs() { if (tempDestinationAuthorizationEntry != null) { Set<Object> answer = new WildcardAwareSet<Object>(); answer.addAll(tempDestinationAuthorizationEntry.getAdminACLs()); return answer; } else { return null; } }
/** * Provides synchronized access to the write ACLs for the destinations as {@link AuthorizationEntry} is not setup * for concurrent access. */ @Override public Set<Object> getWriteACLs(ActiveMQDestination destination) { checkForUpdates(); DefaultAuthorizationMap map = this.map.get(); return map.getWriteACLs(destination); }
/** * Provides synchronized access to the read ACLs for the destinations as {@link AuthorizationEntry} is not setup for * concurrent access. */ @Override public Set<Object> getReadACLs(ActiveMQDestination destination) { checkForUpdates(); DefaultAuthorizationMap map = this.map.get(); return map.getReadACLs(destination); }
@Override public void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws Exception { // Give both a chance to clear out their contexts this.sslBroker.removeDestination(context, destination, timeout); this.nonSslBroker.removeDestination(context, destination, timeout); super.removeDestination(context, destination, timeout); }
public Set<Object> getTempDestinationAdminACLs() { if (tempDestinationAuthorizationEntry != null) { return tempDestinationAuthorizationEntry.getAdminACLs(); } else { return null; } }
public Set<Object> getTempDestinationReadACLs() { if (tempDestinationAuthorizationEntry != null) { return tempDestinationAuthorizationEntry.getReadACLs(); } else { return null; } }
public Set<Object> getTempDestinationWriteACLs() { if (tempDestinationAuthorizationEntry != null) { return tempDestinationAuthorizationEntry.getWriteACLs(); } else { return null; } }
@Override public void objectChanged(NamingEvent evt) { // This test is a hack to work around the fact that Apache DS 2.0 seems to trigger notifications // for the entire sub-tree even when one-level is the selected search scope. if (permissionType != null) { SimpleCachedLDAPAuthorizationMap.this.objectChanged(evt, destinationType, permissionType); } } }
@Override public void objectAdded(NamingEvent evt) { // This test is a hack to work around the fact that Apache DS 2.0 seems to trigger notifications // for the entire sub-tree even when one-level is the selected search scope. if (permissionType != null) { SimpleCachedLDAPAuthorizationMap.this.objectAdded(evt, destinationType, permissionType); } }
@Override public Destination intercept(Destination destination) { return new AuthorizationDestinationFilter(destination, broker); }