Alon Bar-Lev has uploaded a new change for review.

Change subject: aaa: construct a profile only if both authn/authz available
......................................................................

aaa: construct a profile only if both authn/authz available

mapping is not important, as we will get more observer events in future,
causing re-create anyway.

Topic: AAA
Change-Id: I6f69ec0965ab7bea872270d400e6c381bde2d854
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthenticationProfileRepository.java
1 file changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/61/28461/1

diff --git 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthenticationProfileRepository.java
 
b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthenticationProfileRepository.java
index 4879042..ae98c9b 100644
--- 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthenticationProfileRepository.java
+++ 
b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthenticationProfileRepository.java
@@ -72,17 +72,15 @@
         for (ExtensionProxy authnExtension : 
EngineExtensionsManager.getInstance().getExtensionsByService(AUTHN_SERVICE)) {
             String mapperName = 
authnExtension.getContext().<Properties>get(Base.ContextKeys.CONFIGURATION).getProperty(AUTHN_MAPPING_PLUGIN);
             String authzName = 
authnExtension.getContext().<Properties>get(Base.ContextKeys.CONFIGURATION).getProperty(AUTHN_AUTHZ_PLUGIN);
-            if (authzName == null) {
-                throw new ConfigurationException(String.format("Authz plugin 
for %1$s does not exist",
-                        authnExtension.getContext().<String> 
get(Base.ContextKeys.INSTANCE_NAME)));
-            }
-            AuthenticationProfile profile = new AuthenticationProfile(
-                    authnExtension,
-                    
EngineExtensionsManager.getInstance().getExtensionByName(authzName),
-                    mapperName != null ? 
EngineExtensionsManager.getInstance().getExtensionByName(mapperName) : null
-                    );
+            if (authzName != null) {
+                AuthenticationProfile profile = new AuthenticationProfile(
+                        authnExtension,
+                        
EngineExtensionsManager.getInstance().getExtensionByName(authzName),
+                        mapperName != null ? 
EngineExtensionsManager.getInstance().getExtensionByName(mapperName) : null
+                        );
 
-            results.put(profile.getName(), profile);
+                results.put(profile.getName(), profile);
+            }
         }
         return results;
     }


-- 
To view, visit http://gerrit.ovirt.org/28461
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f69ec0965ab7bea872270d400e6c381bde2d854
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to