# SINCE 1.5.0
git.sshKeysFolder= ${baseFolder}/ssh
-# Use kerberos5 (GSS) authentication
+# Use Kerberos5 (GSS) authentication
#
# SINCE 1.7.0
-git.sshWithKrb5 = "false"
+git.sshWithKrb5 = false
-# The path to a kerberos 5 keytab.
+# The path to a Kerberos 5 keytab.
#
# SINCE 1.7.0
-git.sshKrb5Keytab = ""
+git.sshKrb5Keytab =
-# Strip the domain suffix from a kerberos username.
-# e.g. james@bigbox would be "james"
+# The service principal name to be used for Kerberos5.
+# The default is host/hostname.
#
# SINCE 1.7.0
-git.sshKrb5StripDomain = true
+git.sshKrb5ServicePrincipalName =
-# The service principal name to be used for Kerberos5. The default is host/hostname.
-#
-# SINCE 1.7.0
-git.sshKrb5ServicePrincipalName = ""
-
-# A comma-separated list of authentication method. They will be tried in
-# the given order. Possible values are
-# "gssapi-with-mic", "publickey", "keyboard-interactive" or "password"
++# Strip the domain suffix from a kerberos username.
++# e.g. james@bigbox would be "james"
+ #
+ # SINCE 1.7.0
-git.sshAuthenticatorsOrder = "password,keyboard-interactive,publickey"
++git.sshKrb5StripDomain = true
+
# SSH backend NIO2|MINA.
#
# The Apache Mina project recommends using the NIO2 backend.
protected final Logger log = LoggerFactory.getLogger(getClass());
protected final IAuthenticationManager authManager;
- public SshKrbAuthenticator(IAuthenticationManager authManager, IStoredSettings settings) {
+ protected final boolean stripDomain;
+
+
+ public SshKrbAuthenticator(IStoredSettings settings, IAuthenticationManager authManager) {
this.authManager = authManager;
- log.info("registry {}", authManager);
+
+ String keytabString = settings.getString(Keys.git.sshKrb5Keytab, "");
+ if(! keytabString.isEmpty()) {
+ setKeytabFile(keytabString);
+ }
+
+ String servicePrincipalName = settings.getString(Keys.git.sshKrb5ServicePrincipalName, "");
+ if(! servicePrincipalName.isEmpty()) {
+ setServicePrincipalName(servicePrincipalName);
+ }
++
+ this.stripDomain = settings.getBoolean(Keys.git.sshKrb5StripDomain, false);
}
@Override