Alon Bar-Lev has posted comments on this change. Change subject: aaa: Change builtin authenticators and directories initialization ......................................................................
Patch Set 1: (5 comments) http://gerrit.ovirt.org/#/c/25741/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java: Line 108: Line 109: new DwhHeartBeat().init(); Line 110: } Line 111: Line 112: private List<Properties> createInternalConfigurations() { > How do I do that exactly? 1. create packaging/extensions.d 2. put file 3. update Makefile, add directory: for d in bin branding conf .. Line 113: List<Properties> results = new ArrayList<>(); Line 114: Properties authConfig = new Properties(); Line 115: authConfig.put(ExtensionManager.CLASS, "org.ovirt.extensions.builtin.ldapkerberos.LdapKerberosAuthenticator"); Line 116: authConfig.put(ExtensionManager.PROVIDES, "org.ovirt.engine.core.authentication"); Line 152: dirConfig.put(ExtensionManager.PROVIDES, "org.ovirt.engine.core.authorization"); Line 153: dirConfig.put(ExtensionManager.ENABLED, true); Line 154: dirConfig.put(ExtensionManager.MODULE, "org.ovirt.engine.extensions.builtin"); Line 155: dirConfig.put(ExtensionManager.NAME, String.format("builtin-authz-%1$s", domain)); Line 156: dirConfig.put("org.ovirt.engine.aaa.authz.profile.name", domain); you should probably add a variable for the domain name so that the provider know what to use from vdc_options. or better!!!! put whatever you need from vdc_options within properties for the provider to read, do not access vdc_options at provider. Line 157: results.add(authConfig); Line 158: } Line 159: return results; Line 160: http://gerrit.ovirt.org/#/c/25741/1/backend/manager/modules/extensions-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ExtensionManager.java File backend/manager/modules/extensions-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ExtensionManager.java: Line 88: return (Properties) context.get(ExtensionProperties.CONFIGURATION); Line 89: } Line 90: Line 91: private void load(Properties props) { Line 92: enabled = props.get(ENABLED) != null ? Boolean.parseBoolean((String) props.get(ENABLED)) : true; > not sure i follow, this was moved from lines 51 - 55. remove the (String) cast? Line 93: context.put(ExtensionProperties.CONFIGURATION, props); Line 94: context.put(ExtensionProperties.NAME, props.getProperty(NAME)); Line 95: context.put(ExtensionProperties.PROVIDES, props.getProperty(PROVIDES)); Line 96: } Line 134: Line 135: public void load(Collection<Properties> configurations) { Line 136: if (configurations == null) { Line 137: return; Line 138: } > so you want me to remove this check for == null? yes, no reason to have it. Line 139: for (Properties configuration : configurations) { Line 140: ExtensionEntry entry = Line 141: new ExtensionEntry(configuration); Line 142: ExtensionEntry alreadyLoaded = loadedEntries.get(entry.getName()); Line 139: for (Properties configuration : configurations) { Line 140: ExtensionEntry entry = Line 141: new ExtensionEntry(configuration); Line 142: ExtensionEntry alreadyLoaded = loadedEntries.get(entry.getName()); Line 143: if (alreadyLoaded != null) { > i thought about it, i found the error handling to be slightly different, i it should be the same. Line 144: throw new ConfigurationException(String.format("Could not load the configuration '%1$s'. %2%s", Line 145: entry.getName(), Line 146: alreadyLoaded.file != null ? String.format("The already loaded file %1$s contains a configuration with the same name", Line 147: alreadyLoaded.file.getAbsolutePath()) -- To view, visit http://gerrit.ovirt.org/25741 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id8513cb992c5becef7e83c04a8da8bc7f1622348 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches