private void persistSecuritySettings(final Region<String, Configuration> configRegion) { Properties securityProps = this.cache.getDistributedSystem().getSecurityProperties(); Configuration clusterPropertiesConfig = configRegion.get(ConfigurationPersistenceService.CLUSTER_CONFIG); if (clusterPropertiesConfig == null) { clusterPropertiesConfig = new Configuration(ConfigurationPersistenceService.CLUSTER_CONFIG); configRegion.put(ConfigurationPersistenceService.CLUSTER_CONFIG, clusterPropertiesConfig); } // put security-manager and security-post-processor in the cluster config Properties clusterProperties = clusterPropertiesConfig.getGemfireProperties(); if (securityProps.containsKey(SECURITY_MANAGER)) { clusterProperties.setProperty(SECURITY_MANAGER, securityProps.getProperty(SECURITY_MANAGER)); } if (securityProps.containsKey(SECURITY_POST_PROCESSOR)) { clusterProperties.setProperty(SECURITY_POST_PROCESSOR, securityProps.getProperty(SECURITY_POST_PROCESSOR)); } }
protected Properties getCredentials(DistributedMember member) { String authInitMethod = this.system.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT); return getCredentials(authInitMethod, this.system.getSecurityProperties(), member, false, (InternalLogWriter) this.system.getLogWriter(), (InternalLogWriter) this.system.getSecurityLogWriter()); }
public Object verifyCredentials() throws AuthenticationRequiredException, AuthenticationFailedException { String methodName = this.system.getProperties().getProperty(SECURITY_CLIENT_AUTHENTICATOR); return verifyCredentials(methodName, this.credentials, this.system.getSecurityProperties(), (InternalLogWriter) this.system.getLogWriter(), (InternalLogWriter) this.system.getSecurityLogWriter(), this.id.getDistributedMember(), this.securityService); }
private void checkIfAuthenticWanSite(DataInputStream dis, DataOutputStream dos, DistributedMember member) throws GemFireSecurityException, IOException { if (this.credentials == null) { return; } String authenticator = this.system.getProperties().getProperty(SECURITY_CLIENT_AUTHENTICATOR); Properties peerWanProps = readCredentials(dis, dos, this.system, this.securityService); verifyCredentials(authenticator, peerWanProps, this.system.getSecurityProperties(), (InternalLogWriter) this.system.getLogWriter(), (InternalLogWriter) this.system.getSecurityLogWriter(), member, this.securityService); } }
final LogWriter systemLogWriter = cache.getLogger(); final String xmlDocumentUri = (String) cache.getDistributedSystem().getSecurityProperties().get(DOC_URI_PROP_NAME);
Handshake.verifyCredentials(authenticator, credentials, system.getSecurityProperties(), this.logWriter, this.securityLogWriter, member, this.cache.getSecurityService());
public AuthenticateUserOpImpl(Connection con, ExecutablePool pool) { super(MessageType.USER_CREDENTIAL_MESSAGE, 1); byte[] credentialBytes = null; DistributedMember server = new InternalDistributedMember(con.getSocket().getInetAddress(), con.getSocket().getPort(), false); DistributedSystem sys = InternalDistributedSystem.getConnectedInstance(); String authInitMethod = sys.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT); Properties tmpSecurityProperties = sys.getSecurityProperties(); // LOG: following passes the DS API LogWriters into the security API Properties credentials = Handshake.getCredentials(authInitMethod, tmpSecurityProperties, server, false, (InternalLogWriter) sys.getLogWriter(), (InternalLogWriter) sys.getSecurityLogWriter()); getMessage().setMessageHasSecurePartFlag(); HeapDataOutputStream heapdos = new HeapDataOutputStream(Version.CURRENT); try { DataSerializer.writeProperties(credentials, heapdos); credentialBytes = ((ConnectionImpl) con).encryptBytes(heapdos.toByteArray()); } catch (Exception e) { throw new ServerOperationException(e); } finally { heapdos.close(); } getMessage().addBytesPart(credentialBytes); }
system.getSecurityProperties(), (InternalLogWriter) system.getLogWriter(), (InternalLogWriter) system.getSecurityLogWriter(), this.proxyId.getDistributedMember(), this.securityService);