-
Bug
-
Resolution: Unresolved
-
Minor
-
None
The AD plugin checks for connectivity during its initialization:
https://github.com/jenkinsci/active-directory-plugin/blob/fd842788a91d34cac5061045a2a937353c9b908c/src/main/java/hudson/plugins/active_directory/ActiveDirectoryDomain.java#L302
Configuring at startup via init.d groovy:
def instance = Jenkins.getInstance() println "--> configure LDAP" String domain = "server.domain.com" String site = "site" String server = "server:3268" String bindName = "username" String bindPassword = 'password' adrealm = new ActiveDirectorySecurityRealm(domain, site, bindName, bindPassword, server) instance.setSecurityRealm(adrealm)
If this fails, it will throw an error at startup but will also create partial configuration, causing havoc:
<domains> <hudson.plugins.active__directory.ActiveDirectoryDomain> <name></name> <servers>server:3268</servers> <bindPassword>{redact}</bindPassword> </hudson.plugins.active__directory.ActiveDirectoryDomain> </domains>
It creates the block but leaves out bindName whic is not indicitive of a failure. It should either create NO configuration block on failure or add the bindName instead of only leaving out a piece.
- is related to
-
JENKINS-44822 bindName and bindPassword not being displayed when created via Groovy
-
- Open
-
-
JENKINS-32710 Configure AD Authorization with Groovy
-
- Reopened
-
Connectivity might be one issue but I also had to add the following lines in order to make it work on versions 2.6 and 2.8