Details
-
Bug
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
Centos 7.2
java-1.8.0-openjdk-1.8.0.111-1.b15.el7_2
jenkins-2.19.2-1.1
Active Directory plugin 2.0
Description
Using groovy script like this:
import jenkins.model.*
import hudson.security.*
import hudson.plugins.active_directory.*def instance = Jenkins.getInstance()
String domain = 'mydomain.com'
String site = null
String server = 'my_ldap_server'
String bindName = null
String bindPassword = nulladrealm = new ActiveDirectorySecurityRealm(domain, site, bindName, bindPassword, server)
instance.setSecurityRealm(adrealm)instance.save()
field domain controllers remains empty. This was working in previous version of plugin and it's somehow related to multiple domain support.
hi @fbelzunc
Thanks for the above construct, could you also give an example to use Jenkins internal fallback user for the following construct. I am unable to enable (ActiveDirectoryInternalUsersDatabase internalUsersDatabase) using the code also there is no example anywhere that I could find.
ActiveDirectorySecurityRealm([String|http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true] domain, List<ActiveDirectoryDomain> domains, String site, String bindName, String bindPassword, String server, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, hudson.plugins.active_directory.TlsConfiguration tlsConfiguration, ActiveDirectoryInternalUsersDatabase internalUsersDatabase)