Search in sources :

Example 1 with TrustStoreRealmConfiguration

use of org.infinispan.server.configuration.security.TrustStoreRealmConfiguration in project infinispan by infinispan.

the class ServerConfigurationSerializer method writeSecurityRealms.

private void writeSecurityRealms(ConfigurationWriter writer, RealmsConfiguration realms) {
    if (!realms.realms().isEmpty()) {
        writer.writeStartArrayElement(Element.SECURITY_REALMS);
        for (Map.Entry<String, RealmConfiguration> e : realms.realms().entrySet()) {
            RealmConfiguration realm = e.getValue();
            writer.writeStartElement(Element.SECURITY_REALM);
            realm.attributes().write(writer);
            writeServerIdentities(writer, realm.serverIdentitiesConfiguration());
            for (RealmProvider provider : realm.realmProviders()) {
                if (provider instanceof FileSystemRealmConfiguration) {
                    writeRealm(writer, (FileSystemRealmConfiguration) provider);
                } else if (provider instanceof LdapRealmConfiguration) {
                    writeRealm(writer, (LdapRealmConfiguration) provider);
                } else if (provider instanceof LocalRealmConfiguration) {
                    writeRealm(writer, (LocalRealmConfiguration) provider);
                } else if (provider instanceof PropertiesRealmConfiguration) {
                    writeRealm(writer, (PropertiesRealmConfiguration) provider);
                } else if (provider instanceof TokenRealmConfiguration) {
                    writeRealm(writer, (TokenRealmConfiguration) provider);
                } else if (provider instanceof TrustStoreConfiguration) {
                    writeRealm(writer, (TrustStoreRealmConfiguration) provider);
                }
            }
            // SECURITY_REALM
            writer.writeEndElement();
        }
        // SECURITY_REALMS
        writer.writeEndArrayElement();
    }
}
Also used : RealmConfiguration(org.infinispan.server.configuration.security.RealmConfiguration) LdapRealmConfiguration(org.infinispan.server.configuration.security.LdapRealmConfiguration) LocalRealmConfiguration(org.infinispan.server.configuration.security.LocalRealmConfiguration) TrustStoreRealmConfiguration(org.infinispan.server.configuration.security.TrustStoreRealmConfiguration) TokenRealmConfiguration(org.infinispan.server.configuration.security.TokenRealmConfiguration) PropertiesRealmConfiguration(org.infinispan.server.configuration.security.PropertiesRealmConfiguration) FileSystemRealmConfiguration(org.infinispan.server.configuration.security.FileSystemRealmConfiguration) PropertiesRealmConfiguration(org.infinispan.server.configuration.security.PropertiesRealmConfiguration) TrustStoreConfiguration(org.infinispan.server.configuration.security.TrustStoreConfiguration) RealmProvider(org.infinispan.server.configuration.security.RealmProvider) LocalRealmConfiguration(org.infinispan.server.configuration.security.LocalRealmConfiguration) TokenRealmConfiguration(org.infinispan.server.configuration.security.TokenRealmConfiguration) FileSystemRealmConfiguration(org.infinispan.server.configuration.security.FileSystemRealmConfiguration) LdapRealmConfiguration(org.infinispan.server.configuration.security.LdapRealmConfiguration) TrustStoreRealmConfiguration(org.infinispan.server.configuration.security.TrustStoreRealmConfiguration) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 FileSystemRealmConfiguration (org.infinispan.server.configuration.security.FileSystemRealmConfiguration)1 LdapRealmConfiguration (org.infinispan.server.configuration.security.LdapRealmConfiguration)1 LocalRealmConfiguration (org.infinispan.server.configuration.security.LocalRealmConfiguration)1 PropertiesRealmConfiguration (org.infinispan.server.configuration.security.PropertiesRealmConfiguration)1 RealmConfiguration (org.infinispan.server.configuration.security.RealmConfiguration)1 RealmProvider (org.infinispan.server.configuration.security.RealmProvider)1 TokenRealmConfiguration (org.infinispan.server.configuration.security.TokenRealmConfiguration)1 TrustStoreConfiguration (org.infinispan.server.configuration.security.TrustStoreConfiguration)1 TrustStoreRealmConfiguration (org.infinispan.server.configuration.security.TrustStoreRealmConfiguration)1