Juan Hernandez has posted comments on this change.

Change subject: core: Add Kerberos authenticator
......................................................................


Patch Set 2:

(3 comments)

....................................................
File 
backend/manager/modules/authentication/src/main/java/org/ovirt/engine/core/authentication/kerberos/KerberosConfiguration.java
Line 12: import org.slf4j.LoggerFactory;
Line 13: 
Line 14: /**
Line 15:  * This class contains the same information that is usually saved in 
the {@code /etc/kerberos.conf} file, and it has the
Line 16:  * capability to generate that file.
Currently we generate the kr5.conf file (there is a typo in the comment, should 
be krb5.conf instead of kerberos.conf) from the engine-manage-domains tool. If 
we want to make the authentication layer abstract, and thus independent of 
Kerberos concepts, we need to generate it from the authenticator or directory, 
and only if they are loaded.

What I am currently doing is using this class to generate the Kerberos 
configuration in a temporary file that is created when the Kerberos 
authenticator is created and removed when the engine is stopped.

The capability to generate the file could go in a different class. I think it 
makes sense to have it here.
Line 17:  */
Line 18: public class KerberosConfiguration {
Line 19:     // The log:
Line 20:     private static final Logger log = 
LoggerFactory.getLogger(KerberosConfiguration.class);


Line 33:     public static KerberosConfiguration getInstance() {
Line 34:         if (instance == null) {
Line 35:             synchronized (KerberosConfiguration.class) {
Line 36:                 if (instance == null) {
Line 37:                     instance = new KerberosConfiguration();
I have been using this idiom for singletons in all the patch series, but I am 
changing it to instance declaration everywhere.

In this particular case it isn't important if the instance is created when the 
class is loaded, as creating it doesn't have any side effect.
Line 38:                 }
Line 39:             }
Line 40:         }
Line 41:         return instance;


....................................................
File 
backend/manager/modules/authentication/src/main/java/org/ovirt/engine/core/authentication/kerberos/KerberosJaasConfiguration.java
Line 19:     public static KerberosJaasConfiguration getInstance() {
Line 20:         if (instance == null) {
Line 21:             synchronized(KerberosJaasConfiguration.class) {
Line 22:                 if (instance == null) {
Line 23:                     instance = new KerberosJaasConfiguration();
Done
Line 24:                 }
Line 25:             }
Line 26:         }
Line 27:         return instance;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia4004e4a783530767b2f7682be17b3ce1e9a3802
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
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

Reply via email to