use of org.apache.ignite.internal.processors.security.UserAttributesFactory in project ignite by apache.
the class CommonSecurityCheckTest method getConfiguration.
/**
* @param instanceName Instance name.
*/
@Override
protected IgniteConfiguration getConfiguration(String instanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(instanceName);
cfg.setActiveOnStart(false);
boolean isClient = instanceName.endsWith("2");
String name = isClient ? "client_" + instanceName : "srv_" + instanceName;
cfg.setPluginProviders(getPluginProvider(name));
SslContextFactory sslFactory = (SslContextFactory) GridTestUtils.sslFactory();
cfg.setSslContextFactory(sslFactory);
cfg.setConnectorConfiguration(new ConnectorConfiguration().setSslEnabled(true).setSslClientAuth(true).setSslClientAuth(true).setSslFactory(sslFactory));
cfg.setClientConnectorConfiguration(new ClientConnectorConfiguration().setSslEnabled(true).setSslClientAuth(true).setUseIgniteSslContextFactory(false).setSslContextFactory(sslFactory));
if (instanceName.endsWith("0"))
cfg.setGridLogger(listeningLog);
if (isClient)
cfg.setClientMode(true);
if (!fail) {
Map<String, String> attrs = new UserAttributesFactory().create();
cfg.setUserAttributes(attrs);
}
return cfg;
}
use of org.apache.ignite.internal.processors.security.UserAttributesFactory in project ignite by apache.
the class AttributeSecurityCheckTest method userAttributes.
/**
* @return User attributes.
*/
private Map<String, String> userAttributes() {
Map<String, String> attrs = new UserAttributesFactory().create();
attrs.put("key", "val");
return attrs;
}
Aggregations