use of org.ovirt.engine.core.extensions.mgr.ConfigurationException in project ovirt-engine by oVirt.
the class SsoContext method createProfiles.
private void createProfiles() {
// Get the extensions that correspond to authn (authentication) service.
// For each extension - get the relevant authn extension.
Map<String, AuthenticationProfile> results = new HashMap<>();
for (ExtensionProxy authnExtension : ssoExtensionsManager.getExtensionsByService(Authn.class.getName())) {
try {
String mapperName = authnExtension.getContext().<Properties>get(Base.ContextKeys.CONFIGURATION).getProperty(Authn.ConfigKeys.MAPPING_PLUGIN);
String authzName = authnExtension.getContext().<Properties>get(Base.ContextKeys.CONFIGURATION).getProperty(Authn.ConfigKeys.AUTHZ_PLUGIN);
AuthenticationProfile profile = new AuthenticationProfile(authnExtension, ssoExtensionsManager.getExtensionByName(authzName), mapperName != null ? ssoExtensionsManager.getExtensionByName(mapperName) : null);
if (results.containsKey(profile.getName())) {
log.warn("Profile name '{}' already registered for '{}', ignoring for '{}'", profile.getName(), results.get(profile.getName()).getAuthnName(), profile.getAuthnName());
} else {
results.put(profile.getName(), profile);
}
} catch (ConfigurationException e) {
log.debug("Exception", e);
}
}
profiles = results;
}
use of org.ovirt.engine.core.extensions.mgr.ConfigurationException in project ovirt-engine by oVirt.
the class AuthenticationProfileRepository method createProfiles.
private void createProfiles() {
// Get the extensions that correspond to authn (authentication) service.
// For each extension - get the relevant authn extension.
Map<String, AuthenticationProfile> results = new HashMap<>();
for (ExtensionProxy authnExtension : EngineExtensionsManager.getInstance().getExtensionsByService(Authn.class.getName())) {
try {
String mapperName = authnExtension.getContext().<Properties>get(Base.ContextKeys.CONFIGURATION).getProperty(Authn.ConfigKeys.MAPPING_PLUGIN);
String authzName = authnExtension.getContext().<Properties>get(Base.ContextKeys.CONFIGURATION).getProperty(Authn.ConfigKeys.AUTHZ_PLUGIN);
AuthenticationProfile profile = new AuthenticationProfile(authnExtension, authzName, mapperName != null ? EngineExtensionsManager.getInstance().getExtensionByName(mapperName) : null);
if (results.containsKey(profile.getName())) {
log.warn("Profile name '{}' already registered for '{}', ignoring for '{}'", profile.getName(), results.get(profile.getName()).getAuthnName(), profile.getAuthnName());
} else {
results.put(profile.getName(), profile);
}
} catch (ConfigurationException e) {
log.debug("Ignoring", e);
}
}
profiles = results;
setChanged();
notifyObservers();
}
Aggregations