Skip to content
Browse files
Merge pull request #42 from fbelzunc/JENKINS-38290
JENKINS-38290 System Property to be able to ignore referrals
  • Loading branch information
fbelzunc committed Sep 17, 2016
2 parents d6f2723 + 2f48cd2 commit eca9c9e2421acf7b9acb2be3fe328bcd03f15fb7
Showing 1 changed file with 10 additions and 1 deletion.
@@ -536,7 +536,16 @@ public DirContext bind(String principalName, String password, List<SocketInfo> l
// as opposed to "joe@europe",
// but the bind operation doesn't appear to allow me to do so.
Hashtable<String, String> newProps = new Hashtable<String, String>();
newProps.put(Context.REFERRAL, "follow");

// Sometimes might be useful to ignore referral. Use this System property is under the user risk
Boolean ignoreReferrals = Boolean.valueOf(System.getProperty("hudson.plugins.active_directory.referral.ignore", "false"));

if (!ignoreReferrals) {
newProps.put(Context.REFERRAL, "follow");
} else {
newProps.put(Context.REFERRAL, "ignore");

newProps.put("java.naming.ldap.attributes.binary","tokenGroups objectSid");

0 comments on commit eca9c9e

Please sign in to comment.