From d43e8fb2f9864ca16e61a83c007de2e91c0208ce Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 13:47:02 +0200 Subject: [PATCH 01/57] Check if IT simplification works now in jenkins-ci infra --- .../EntoEndUserCacheLookupDisabledTest.java | 5 ----- .../EntoEndUserCacheLookupEnabledTest.java | 5 ----- .../docker/TheFlintstonesTest.java | 11 ++--------- ...rReadResolveTlsConfigurationSingleDomain.zip | Bin 954 -> 933 bytes ...TlsConfigurationMultipleDomainsOneDomain.zip | Bin 976 -> 976 bytes ...rReadResolveTlsConfigurationSingleDomain.zip | Bin 961 -> 976 bytes 6 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java index e5a50333..e256772d 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java @@ -41,17 +41,12 @@ public class EntoEndUserCacheLookupDisabledTest { private final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; private final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; private final static int MAX_RETRIES = 30; - private String dockerIp; - private int dockerPort; public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, String site, String bindName, String bindPassword, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, ActiveDirectoryInternalUsersDatabase internalUsersDatabase) throws Exception { TheFlintstonesTest.TheFlintstones d = docker.get(); - dockerIp = d.ipBound(3268); - dockerPort = d.port(3268); - activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java index 93b9e7a9..d1a109b1 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java @@ -44,8 +44,6 @@ public class EntoEndUserCacheLookupEnabledTest { private final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; private final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; private final static int MAX_RETRIES = 30; - private String dockerIp; - private int dockerPort; private static String CACHE_AUTH; @@ -69,10 +67,7 @@ public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, Str GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, ActiveDirectoryInternalUsersDatabase internalUsersDatabase) throws Exception { TheFlintstonesTest.TheFlintstones d = docker.get(); - dockerIp = d.ipBound(3268); - dockerPort = d.port(3268); - activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 3fddc563..b1cdd542 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -88,14 +88,10 @@ public class TheFlintstonesTest { public final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; public final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; public final static int MAX_RETRIES = 30; - public String dockerIp; - public int dockerPort; public void dynamicSetUp() throws Exception { TheFlintstones d = docker.get(); - dockerIp = d.ipBound(3268); - dockerPort = d.port(3268); - ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, dockerIp + ":" + dockerPort , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); + ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, null , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null); @@ -117,13 +113,10 @@ public void dynamicSetUp() throws Exception { public void manualSetUp() throws Exception { TheFlintstones d = docker.get(); - dockerIp = d.ipBound(3268); - dockerPort = d.port(3268); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = (ActiveDirectorySecurityRealm) j.jenkins.getSecurityRealm(); for (ActiveDirectoryDomain activeDirectoryDomain : activeDirectorySecurityRealm.getDomains()) { activeDirectoryDomain.bindPassword = Secret.fromString(AD_MANAGER_DN_PASSWORD); - activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; } while(!FileUtils.readFileToString(d.getLogfile()).contains("custom (exit status 0; expected)")) { @@ -198,7 +191,7 @@ public void checkDomainHealth() throws Exception { public void validateCustomDomainController() throws ServletException, NamingException, IOException, Exception { dynamicSetUp(); ActiveDirectoryDomain.DescriptorImpl adDescriptor = new ActiveDirectoryDomain.DescriptorImpl(); - assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, dockerIp + ":" + dockerPort, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); + assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, null, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); } @Issue("JENKINS-36148") diff --git a/src/test/resources/hudson/plugins/active_directory/docker/TheFlintstonesTest/testSimpleLoginFailsAfterReadResolveTlsConfigurationSingleDomain.zip b/src/test/resources/hudson/plugins/active_directory/docker/TheFlintstonesTest/testSimpleLoginFailsAfterReadResolveTlsConfigurationSingleDomain.zip index e7d7fe3b6ff7c78a4670f77e0febc3ec78c0d22c..e02cbb49d62436df3a10018532ba6c3986b1079c 100644 GIT binary patch delta 888 zcmV-;1Bd*&2c-uNP)h>@6aWYS2mpap-BOVb9)E1x+F)|q+F|2{iTxRpwikg(79ozLfH$G&?> zXl(^T63&{Z7uJ{48nB4Rgw30$(@E$2=Jd`vv7ho-a^{@WYIaN{4k^TLoDfE2CU8bp z;D2*QGA<-4IHjPY^lVgZG{Ex2dx0p|ROix0dwWetcnnT|5cqD-M#V;3a|vU`5+qwY znaIILyB5vBdG^Ewc~!x1Hr7GGd|itumaY;O$rt$sF)9?9&x&aMtLl$B&Lf4nG(c)tKnv>A``nPG6Hh->0 zZ7z78_BdbWX;ok+@LJPg+@bRI0Xrg6ejmy?*VE zY5)l&AqXETnU8>`r-Cn3KU7WB^dHX90@zY_T+bx6hR3LlHq3BNv!h@+RH{Tvnc_%~ zh|_rc>Ggkg`{T#^f$zPe4Tu_V-G7PaKX#_QUf)%ajrJV1QkWAOOCwW|gTY|Z?gsD3 zAU4`EikpRns&?36v98RezvptV^jr z*gy*8&+M>P^_qYg2=z=tvu;_a_?Zw37pCu&(owJ5=5{Ibj8Ij|?Q2(#;-Pt;KFT47 zeX224G&Qp+h>UO>7j(F&8%u3^&#cMdEY za*;Xb7pmy{Ce5Na1nStx{5}`o0d?wd6S`^RobnLU{vlFD>ih#xO9u#iq3fOl0{{T5 z1^@t1O928E0~7!V00;nqRNYd1q3fOl0{{T5lX(Lp9&Fp%U~=2qU{Fg11^@s600962 O07L))080Y^0000;i=|2c delta 909 zcmV;819JSO2f7CiP)h>@6aWYS2mpj(Xibq09)BYmj-NA4Qx18U7fdj1 z6n`~r3$YZ;NTo^5X#@k*^GSQKfT)V-8M4Y!gSS38I$J^^a|kBWBo4tvj2-S4{SJ>58X;W=_|DQW`bU6({lPk{2` zM5^S~nhEXE%qD-IGX)vufYP;L*q-Ny8h_o6bL)4V+vVQv)0KDqp=-Zt3oHxDM4)Mb zZyr3;qU7LZvhYa*IbO;{KA{B!gGv9O8B)DQ!%}0_Uk?ZUc^D6;v3-lahVg71+1J4| z_Q~G=MQ(;UK1r1ax083*cQ@B%nSXx&@MXQ=VZxISsYt21CGXy@ZXd7a-zt_ye}Dbo zcS?I#r>2>Kz$f*iv4Fx!2;2h^cXZfV$*LSnxv9#w9YGQemdSi{7y0BI>>L#oatkA+ zfWwvw^N(ffU`4scA^8nzn@f(mdpOt$6i}p~VrXT41uVT(@)5g-6~w!8I&qI6Hg-Pj z1aoh8j@lc-idNj51)CAXf^Kw4Gk-f!LGSy&(d56;WPbm78b?3K9wfc*qeT?o-z>-D zNr;e7jvTF0S}~q$CsUJ?>2xt1B|nHmeDcDm?;%xK?Hj2IY7D58@pq^f>5P_;$H&|z z_Q!nFZUY8SdO_2_>8VbQcugVhUTBR(vAg>-*Le4B0hr_KZW1e%F!D^NE!-AvJ&)8s7h>%q>o&IjO(P0(^kb7{ahd|h-Qk|~zXpDFwh!I4am{5) z`Q#L7BMp86P)i307W>Fs7y|$R+6DjsP)h*<6$2Ci2mlBGgkfk+7W>Fs7y|$R+LL4h jBOW6feu14Yz?+#xgneu14Yz?+#xgn<2LMPO6Nvx- diff --git a/src/test/resources/hudson/plugins/active_directory/docker/TheFlintstonesTest/testSimpleLoginSuccessfulAfterReadResolveTlsConfigurationSingleDomain.zip b/src/test/resources/hudson/plugins/active_directory/docker/TheFlintstonesTest/testSimpleLoginSuccessfulAfterReadResolveTlsConfigurationSingleDomain.zip index 3990b0df44975bae02efa5e9ba0f8fd0e1a861f9..69238d8c5e788d944cbc79e13b2a911ff4f68dda 100644 GIT binary patch delta 932 zcmV;V16%yT2hax&P)h>@6aWYS2mrWJ-BOVb9)A?r+F%>l+FIjXPTiQw?>m9lIiHK+Ga=2SdN_^&C4Bv^EtmRw$0; z&Xqg`$3E0(1WM%#Sl!{}HC1h{Q)! z2}zfj3JZlg`B{WHgenI`ohjOdJU-;8*ME##vu@ljOSd1_)@@xMs_V;Qq^OOgP9AUA$lE%J?4MTz?;8i08ojP=xW>py3H;uc~gUrD_=*U#VB1D_wJa zMTs>!1#Prpfl?w*8uL4*`neJb3U!a%#(OvD^k@EX7___ohg}*SyMoh>^AwXvoboaj z$KE5dy@I%E&LiV7k`nmQbv9P3BSMrw)URUmP+y}}vE49iM1bZG=$I$7Sburm(>*Mw zhjJk^!rEHF{!+wb>$+K$y#_)`igRG~&yz|>eKz$FH8 z+{7#$ol9e6FuR^wVMUzfx@!28w)#XB#Zl~74MSFblhL6fD?LGL@RmU3h;iv&Ua6v2 zRT@Rm9Ej`K=0E%LsZ&Q~=%$TJ!sdt!jx9x`?q5(#2MF>n%lU{Fg11^@s60096207L))0Coca G0002A!@6Do delta 917 zcmV;G18V%x2f+spP)h>@6aWYS2msh&Xibq09)GDCX zKnSTXYrJ+{)lI=$2I4Wp}?3l2@(6Ab5HJ<9sm7P z&RT1biVEI6IrCnfw1B4~qkP#tna{3IuTI|M7yf;jDZ%lJR?E+*A_;>m$a2c5(voPp zhJQ$Ks)baj;?#oJ==rGGSb&##_ylQbsrcMSdwWaBMFw~@j-z1cqiSQVrGlwpNvbzk z%MyIFYq1Pc>U$ySPZNybQyUa4H?5QrrMhhwy{BpiFE~c-%y~tCtnHF$=rItMA4nCf zTvDz)lG^0&GAbc8IT-26&~NtBU5$3jxqo%r&h2#T_TkLCc-yvbwFMSAp&Toco0SJo zBrh0vsmOg)LynhFo{dNjxHszVG(*Uj#xPf=>M#4f?lg${{v5za*W#P!-AAd9|h~VG=EiIse+_-%5dk`mvHoTFq+s<|R4JgONrFYBY$gX)@k0m zhjb-M9fOveo+!D-=JGlYY!j#_uBkxP*nlznVh0&eJo3X@wObMvAk9q+-L~hU>gPhN zT(~`!M#o%`+XHIM3(8C>pD)aM6c5e&^qUe&*rz&ELo+j5fYcP!VMD8QY%ZON<7|fJ zj%nib(ZA9*cYaeGqfX6WR9mfZ8SNUjZ3vdY^+ZUGPtQ!z_f3|?NCFJ|$UUo1iFxZ} z8@g-bl8J<{(IL`AivIvmO9u!!t4FsV0{{T;1^@t1O928E0~7!V00;osVQ5V`t4FsV r0{{T;29uBjA|9z4 Date: Tue, 29 Jun 2021 13:57:32 +0200 Subject: [PATCH 02/57] Remove the profile since tests do not seem to be triggering --- Jenkinsfile | 2 +- pom.xml | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b1fdfb75..df11bdf4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ node('docker') { sh 'docker pull fbelzunc/ad-build-container-with-docker-fixtures' } stage('maven') { - sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -P \'!noIT\'' + sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install } stage('surefire-report') { junit 'target/surefire-reports/*.xml' diff --git a/pom.xml b/pom.xml index a42183d6..35cab3c3 100644 --- a/pom.xml +++ b/pom.xml @@ -172,30 +172,6 @@ - - - noIT - - true - - - - - maven-surefire-plugin - - - **/TheFlintstonesTest.java - **/EntoEndUserCacheLookupEnabledTest.java - **/EntoEndUserCacheLookupDisabledTest.java - **/WindowsAdsiModeUserCacheDisabledTest.java - **/WindowsAdsiModeUserCacheEnabledTest.java - - - - - - - repo.jenkins-ci.org From 3d25f826af92345875d7450a852c502498db56ea Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 15:12:54 +0200 Subject: [PATCH 03/57] Update Jenkinsfile again --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index df11bdf4..09b524c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ node('docker') { sh 'docker pull fbelzunc/ad-build-container-with-docker-fixtures' } stage('maven') { - sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install + sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures } stage('surefire-report') { junit 'target/surefire-reports/*.xml' From 7a9a66d64c9e8d43805480ec3ad70ed48fe93114 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 15:19:42 +0200 Subject: [PATCH 04/57] And once more --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 09b524c6..805c707e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ node('docker') { sh 'docker pull fbelzunc/ad-build-container-with-docker-fixtures' } stage('maven') { - sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures + sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures' } stage('surefire-report') { junit 'target/surefire-reports/*.xml' From 081f71395bc314d516211d2c248c559e2a54c557 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 15:37:06 +0200 Subject: [PATCH 05/57] Create noWindows profile --- pom.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pom.xml b/pom.xml index 35cab3c3..4ed5fea6 100644 --- a/pom.xml +++ b/pom.xml @@ -172,6 +172,27 @@ + + + noWindows + + true + + + + + maven-surefire-plugin + + + **/WindowsAdsiModeUserCacheDisabledTest.java + **/WindowsAdsiModeUserCacheEnabledTest.java + + + + + + + repo.jenkins-ci.org From 693b00e83ad53f04e152e51ff80cac0f7b7b2725 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 15:48:07 +0200 Subject: [PATCH 06/57] Try to run test in serial mode so there are not bind issues --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4ed5fea6..da57fabe 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - - + 1C + false -Xms2048m -Xmx2048m From 829c6b770263b4c5a99848308de4990675ddb47d Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 16:19:29 +0200 Subject: [PATCH 07/57] test without simplification --- pom.xml | 26 +++++++++++++++++-- .../EntoEndUserCacheLookupDisabledTest.java | 2 +- .../EntoEndUserCacheLookupEnabledTest.java | 5 ++++ .../docker/TheFlintstonesTest.java | 11 ++++++-- 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index da57fabe..b9bd1320 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - 1C - false + + -Xms2048m -Xmx2048m @@ -173,6 +173,28 @@ + + noIT + + false + + + + + maven-surefire-plugin + + + **/TheFlintstonesTest.java + **/EntoEndUserCacheLookupEnabledTest.java + **/EntoEndUserCacheLookupDisabledTest.java + **/WindowsAdsiModeUserCacheDisabledTest.java + **/WindowsAdsiModeUserCacheEnabledTest.java + + + + + + noWindows diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java index e256772d..b666f18c 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java @@ -50,7 +50,7 @@ public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, Str List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); - ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, site, bindName, bindPassword, null, groupLookupStrategy, removeIrrelevantGroups, customDomain, cache, startTls, internalUsersDatabase); + ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, site, bindName, bindPassword, null, groupLookupStrategy, removeIrrelevantGroups, customDomain, cache, startTls, internalUsersDatabase, true); j.getInstance().setSecurityRealm(activeDirectorySecurityRealm); while(!FileUtils.readFileToString(d.getLogfile()).contains("custom (exit status 0; expected)")) { Thread.sleep(1000); diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java index d1a109b1..93b9e7a9 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java @@ -44,6 +44,8 @@ public class EntoEndUserCacheLookupEnabledTest { private final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; private final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; private final static int MAX_RETRIES = 30; + private String dockerIp; + private int dockerPort; private static String CACHE_AUTH; @@ -67,7 +69,10 @@ public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, Str GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, ActiveDirectoryInternalUsersDatabase internalUsersDatabase) throws Exception { TheFlintstonesTest.TheFlintstones d = docker.get(); + dockerIp = d.ipBound(3268); + dockerPort = d.port(3268); + activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index b1cdd542..3fddc563 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -88,10 +88,14 @@ public class TheFlintstonesTest { public final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; public final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; public final static int MAX_RETRIES = 30; + public String dockerIp; + public int dockerPort; public void dynamicSetUp() throws Exception { TheFlintstones d = docker.get(); - ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, null , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); + dockerIp = d.ipBound(3268); + dockerPort = d.port(3268); + ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, dockerIp + ":" + dockerPort , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null); @@ -113,10 +117,13 @@ public void dynamicSetUp() throws Exception { public void manualSetUp() throws Exception { TheFlintstones d = docker.get(); + dockerIp = d.ipBound(3268); + dockerPort = d.port(3268); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = (ActiveDirectorySecurityRealm) j.jenkins.getSecurityRealm(); for (ActiveDirectoryDomain activeDirectoryDomain : activeDirectorySecurityRealm.getDomains()) { activeDirectoryDomain.bindPassword = Secret.fromString(AD_MANAGER_DN_PASSWORD); + activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; } while(!FileUtils.readFileToString(d.getLogfile()).contains("custom (exit status 0; expected)")) { @@ -191,7 +198,7 @@ public void checkDomainHealth() throws Exception { public void validateCustomDomainController() throws ServletException, NamingException, IOException, Exception { dynamicSetUp(); ActiveDirectoryDomain.DescriptorImpl adDescriptor = new ActiveDirectoryDomain.DescriptorImpl(); - assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, null, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); + assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, dockerIp + ":" + dockerPort, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); } @Issue("JENKINS-36148") From 53c95f511977f0c1f5015911337f8bc35c754059 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 16:23:43 +0200 Subject: [PATCH 08/57] and test again --- .../docker/EntoEndUserCacheLookupDisabledTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java index b666f18c..e256772d 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java @@ -50,7 +50,7 @@ public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, Str List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); - ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, site, bindName, bindPassword, null, groupLookupStrategy, removeIrrelevantGroups, customDomain, cache, startTls, internalUsersDatabase, true); + ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, site, bindName, bindPassword, null, groupLookupStrategy, removeIrrelevantGroups, customDomain, cache, startTls, internalUsersDatabase); j.getInstance().setSecurityRealm(activeDirectorySecurityRealm); while(!FileUtils.readFileToString(d.getLogfile()).contains("custom (exit status 0; expected)")) { Thread.sleep(1000); From efa1834f70003295b2f16d3226a2985522740361 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 16:28:05 +0200 Subject: [PATCH 09/57] and re test again --- .../docker/EntoEndUserCacheLookupDisabledTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java index e256772d..e5a50333 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java @@ -41,12 +41,17 @@ public class EntoEndUserCacheLookupDisabledTest { private final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; private final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; private final static int MAX_RETRIES = 30; + private String dockerIp; + private int dockerPort; public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, String site, String bindName, String bindPassword, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, ActiveDirectoryInternalUsersDatabase internalUsersDatabase) throws Exception { TheFlintstonesTest.TheFlintstones d = docker.get(); + dockerIp = d.ipBound(3268); + dockerPort = d.port(3268); + activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); From ca840c1fb331ec89eed08919abf1682b5deda578 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 16:29:48 +0200 Subject: [PATCH 10/57] modify pom and re-test --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b9bd1320..bd4fc384 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - - + 2C + false -Xms2048m -Xmx2048m From dfb0d62ec935751a4ec915caa9f0d7f4668be45b Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 16:44:15 +0200 Subject: [PATCH 11/57] re-run --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bd4fc384..b9bd1320 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - 2C - false + + -Xms2048m -Xmx2048m From 275026ffb1ee6f6362a48d3340e61732b75d3e94 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 16:49:28 +0200 Subject: [PATCH 12/57] test again --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 805c707e..f079c840 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -buildPlugin() +buildPlugin(platforms: ['linux']) node('docker') { stage('checkout') { From 189d4e1fbc95479a122b79615ec95f4dc22e3742 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 16:57:02 +0200 Subject: [PATCH 13/57] bump again --- Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f079c840..a2082268 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,10 @@ node('docker') { sh 'docker pull fbelzunc/ad-build-container-with-docker-fixtures' } stage('maven') { - sh 'docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures' + sh ''' + netstat -anp | grep 3268 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures' + ''' } stage('surefire-report') { junit 'target/surefire-reports/*.xml' From c5b8befb5724deb17c0773ae3b7b25e59475339a Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 17:02:11 +0200 Subject: [PATCH 14/57] bump last time for today --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index b9bd1320..ed04d5ec 100644 --- a/pom.xml +++ b/pom.xml @@ -208,6 +208,8 @@ **/WindowsAdsiModeUserCacheDisabledTest.java **/WindowsAdsiModeUserCacheEnabledTest.java + **/EntoEndUserCacheLookupEnabledTest.java + **/EntoEndUserCacheLookupDisabledTest.java From e70b3486285a1b09d13b4a5d9e227f55cf864f90 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 17:13:49 +0200 Subject: [PATCH 15/57] build again --- .../plugins/active_directory/docker/TheFlintstonesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 3fddc563..5fd82010 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -349,7 +349,7 @@ public void testIncorrectPasswordMustFail() throws Exception { assertTrue(messages.stream().anyMatch(s -> s.contains("Failed to retrieve user Fred"))); } - @DockerFixture(id = "ad-dc", ports= {135, 138, 445, 39, 464, 389, 3268}, udpPorts = {53}, matchHostPorts = true) + @DockerFixture(id = "ad-dc", ports= {135, 138, 445, 39, 464, 389, 3268}, udpPorts = {53}, matchHostPorts = false) public static class TheFlintstones extends DockerContainer { } From a576e97aa3aecdfe15b5f5dde1aeb360616dc7c3 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 17:27:10 +0200 Subject: [PATCH 16/57] build again --- pom.xml | 4 ++-- .../plugins/active_directory/docker/TheFlintstonesTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index ed04d5ec..184e9767 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - - + 1C + false -Xms2048m -Xmx2048m diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 5fd82010..3fddc563 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -349,7 +349,7 @@ public void testIncorrectPasswordMustFail() throws Exception { assertTrue(messages.stream().anyMatch(s -> s.contains("Failed to retrieve user Fred"))); } - @DockerFixture(id = "ad-dc", ports= {135, 138, 445, 39, 464, 389, 3268}, udpPorts = {53}, matchHostPorts = false) + @DockerFixture(id = "ad-dc", ports= {135, 138, 445, 39, 464, 389, 3268}, udpPorts = {53}, matchHostPorts = true) public static class TheFlintstones extends DockerContainer { } From 8cbb0ac2ab10f10a28e2e5ce939b1dc8bfb3678a Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 22:03:18 +0200 Subject: [PATCH 17/57] build --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 184e9767..5e197a32 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - 1C - false + 2C + true -Xms2048m -Xmx2048m From 780203b7ad3f6c2b077167d32416270f7ffbe928 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 22:21:36 +0200 Subject: [PATCH 18/57] more builds --- .../docker/TheFlintstonesTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 3fddc563..51b5a102 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -88,14 +88,14 @@ public class TheFlintstonesTest { public final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; public final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; public final static int MAX_RETRIES = 30; - public String dockerIp; - public int dockerPort; + //public String dockerIp; + //public int dockerPort; public void dynamicSetUp() throws Exception { TheFlintstones d = docker.get(); - dockerIp = d.ipBound(3268); - dockerPort = d.port(3268); - ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, dockerIp + ":" + dockerPort , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); + //dockerIp = d.ipBound(3268); + //dockerPort = d.port(3268); + ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, null /*dockerIp + ":" + dockerPort*/ , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null); @@ -117,13 +117,13 @@ public void dynamicSetUp() throws Exception { public void manualSetUp() throws Exception { TheFlintstones d = docker.get(); - dockerIp = d.ipBound(3268); - dockerPort = d.port(3268); + //dockerIp = d.ipBound(3268); + //dockerPort = d.port(3268); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = (ActiveDirectorySecurityRealm) j.jenkins.getSecurityRealm(); for (ActiveDirectoryDomain activeDirectoryDomain : activeDirectorySecurityRealm.getDomains()) { activeDirectoryDomain.bindPassword = Secret.fromString(AD_MANAGER_DN_PASSWORD); - activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; + //activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; } while(!FileUtils.readFileToString(d.getLogfile()).contains("custom (exit status 0; expected)")) { From 0c1f165bd24c50df2117dd22e5061562144e9835 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 22:30:58 +0200 Subject: [PATCH 19/57] bump build --- .../plugins/active_directory/docker/TheFlintstonesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 51b5a102..d7e9965b 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -198,7 +198,7 @@ public void checkDomainHealth() throws Exception { public void validateCustomDomainController() throws ServletException, NamingException, IOException, Exception { dynamicSetUp(); ActiveDirectoryDomain.DescriptorImpl adDescriptor = new ActiveDirectoryDomain.DescriptorImpl(); - assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, dockerIp + ":" + dockerPort, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); + assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, /*dockerIp + ":" + dockerPort*/ null, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); } @Issue("JENKINS-36148") From f02bb85edcda262bd439613603228e0fc764d79a Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 23:08:03 +0200 Subject: [PATCH 20/57] again --- .../plugins/active_directory/docker/TheFlintstonesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index d7e9965b..2548df67 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -349,7 +349,7 @@ public void testIncorrectPasswordMustFail() throws Exception { assertTrue(messages.stream().anyMatch(s -> s.contains("Failed to retrieve user Fred"))); } - @DockerFixture(id = "ad-dc", ports= {135, 138, 445, 39, 464, 389, 3268}, udpPorts = {53}, matchHostPorts = true) + @DockerFixture(id = "ad-dc", ports= {135, 138, 445, 39, 53, 464, 389, 3268}, udpPorts = {53}, matchHostPorts = true) public static class TheFlintstones extends DockerContainer { } From a3327379ff0ae811de215b0f913e59c6b87798ae Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 23:28:36 +0200 Subject: [PATCH 21/57] build --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a2082268..35d21f06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,8 +9,7 @@ node('docker') { } stage('maven') { sh ''' - netstat -anp | grep 3268 - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures' + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures test -Dtest=TheFlintstonesTest#loadGroupFromGroupname' ''' } stage('surefire-report') { From 884b51b0916b1cf74634514a9bd87d16628ab177 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 23:39:10 +0200 Subject: [PATCH 22/57] build --- Jenkinsfile | 2 +- pom.xml | 23 +---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 35d21f06..62539d9d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures test -Dtest=TheFlintstonesTest#loadGroupFromGroupname' + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -P\!noIT ''' } stage('surefire-report') { diff --git a/pom.xml b/pom.xml index 5e197a32..67faad9d 100644 --- a/pom.xml +++ b/pom.xml @@ -176,7 +176,7 @@ noIT - false + true @@ -195,27 +195,6 @@ - - noWindows - - true - - - - - maven-surefire-plugin - - - **/WindowsAdsiModeUserCacheDisabledTest.java - **/WindowsAdsiModeUserCacheEnabledTest.java - **/EntoEndUserCacheLookupEnabledTest.java - **/EntoEndUserCacheLookupDisabledTest.java - - - - - - From 24f586cbbeaa85a49e52696ebc2072e2354f5824 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 23:40:59 +0200 Subject: [PATCH 23/57] build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 62539d9d..fd5a51d3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -P\!noIT + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -P \'!noIT\' ''' } stage('surefire-report') { From 9bc1baafd889d072543a23c9e509a5de3cac7fc3 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Tue, 29 Jun 2021 23:47:20 +0200 Subject: [PATCH 24/57] another one --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fd5a51d3..23981333 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -P \'!noIT\' + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures test -Dtest=TheFlintstonesTest#validateDomain ''' } stage('surefire-report') { From 347fb6001c7e5274cbd357190f3871a793eb04de Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 00:00:04 +0200 Subject: [PATCH 25/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 23981333..62539d9d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures test -Dtest=TheFlintstonesTest#validateDomain + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -P\!noIT ''' } stage('surefire-report') { From f8989c93e065142ba093e8e6931f6feceb3c1976 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 00:03:22 +0200 Subject: [PATCH 26/57] bump again --- Jenkinsfile | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 62539d9d..4ea6e1d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -P\!noIT + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package ''' } stage('surefire-report') { diff --git a/pom.xml b/pom.xml index 67faad9d..f054ecf6 100644 --- a/pom.xml +++ b/pom.xml @@ -184,7 +184,7 @@ maven-surefire-plugin - **/TheFlintstonesTest.java + **/EntoEndUserCacheLookupEnabledTest.java **/EntoEndUserCacheLookupDisabledTest.java **/WindowsAdsiModeUserCacheDisabledTest.java From 26ee82fb2dd7d2bb7a3ffeccf2d571d261739be8 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 00:17:10 +0200 Subject: [PATCH 27/57] bump --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f054ecf6..d62612ef 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - 2C - true + -Xms2048m -Xmx2048m From 3e710c983bd577b40bd9a115e6c8698dbecfe428 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 00:37:37 +0200 Subject: [PATCH 28/57] bump --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d62612ef..b77ce91c 100644 --- a/pom.xml +++ b/pom.xml @@ -164,8 +164,8 @@ org.apache.maven.plugins maven-surefire-plugin - + 1 + false -Xms2048m -Xmx2048m From 710dc3a307c15bec26a5bf6d473dc482a50ee673 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 00:59:48 +0200 Subject: [PATCH 29/57] bump --- .../docker/TheFlintstonesTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 2548df67..60d93560 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -88,13 +88,13 @@ public class TheFlintstonesTest { public final static String AD_MANAGER_DN = "CN=Administrator,CN=Users,DC=SAMDOM,DC=EXAMPLE,DC=COM"; public final static String AD_MANAGER_DN_PASSWORD = "ia4uV1EeKait"; public final static int MAX_RETRIES = 30; - //public String dockerIp; - //public int dockerPort; + public String dockerIp; + public int dockerPort; public void dynamicSetUp() throws Exception { TheFlintstones d = docker.get(); - //dockerIp = d.ipBound(3268); - //dockerPort = d.port(3268); + dockerIp = d.ipBound(3268); + dockerPort = d.port(3268); ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, null /*dockerIp + ":" + dockerPort*/ , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); @@ -117,13 +117,13 @@ public void dynamicSetUp() throws Exception { public void manualSetUp() throws Exception { TheFlintstones d = docker.get(); - //dockerIp = d.ipBound(3268); - //dockerPort = d.port(3268); + dockerIp = d.ipBound(3268); + dockerPort = d.port(3268); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = (ActiveDirectorySecurityRealm) j.jenkins.getSecurityRealm(); for (ActiveDirectoryDomain activeDirectoryDomain : activeDirectorySecurityRealm.getDomains()) { activeDirectoryDomain.bindPassword = Secret.fromString(AD_MANAGER_DN_PASSWORD); - //activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; + activeDirectoryDomain.servers = dockerIp + ":" + dockerPort; } while(!FileUtils.readFileToString(d.getLogfile()).contains("custom (exit status 0; expected)")) { @@ -198,7 +198,7 @@ public void checkDomainHealth() throws Exception { public void validateCustomDomainController() throws ServletException, NamingException, IOException, Exception { dynamicSetUp(); ActiveDirectoryDomain.DescriptorImpl adDescriptor = new ActiveDirectoryDomain.DescriptorImpl(); - assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, /*dockerIp + ":" + dockerPort*/ null, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); + assertEquals("OK: Success", adDescriptor.doValidateTest(AD_DOMAIN, dockerIp + ":" + dockerPort, null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD, null).toString().trim()); } @Issue("JENKINS-36148") From ad9237adc9fad9dfc0aeaadfd3d1c270fd7c4b5e Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:01:12 +0200 Subject: [PATCH 30/57] bump --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b77ce91c..10b32c4d 100644 --- a/pom.xml +++ b/pom.xml @@ -184,8 +184,8 @@ maven-surefire-plugin - - **/EntoEndUserCacheLookupEnabledTest.java + **/TheFlintstonesTest.java + **/EntoEndUserCacheLookupDisabledTest.java **/WindowsAdsiModeUserCacheDisabledTest.java **/WindowsAdsiModeUserCacheEnabledTest.java From c2cde0c11aa6e332ec54132aeaf242d42ee27f80 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:19:05 +0200 Subject: [PATCH 31/57] increase timeout --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4ea6e1d4..654ccd61 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -buildPlugin(platforms: ['linux']) +buildPlugin(platforms: ['linux'], timeout: "600") node('docker') { stage('checkout') { From e1220eb66c0170a2f6fc527b2765aa65c05b95b3 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:24:08 +0200 Subject: [PATCH 32/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 654ccd61..b44312a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -Djenkins.test.timeout=360 ''' } stage('surefire-report') { From 9b31ab2fcee3ccd813a4bf445bb9f71d77c0a972 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:27:07 +0200 Subject: [PATCH 33/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b44312a7..c5dda619 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package -Djenkins.test.timeout=360 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package '-Djenkins.test.timeout=3600' ''' } stage('surefire-report') { From 40a968f9f2797cc0ae35b38d828b9aae0008c85b Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:29:14 +0200 Subject: [PATCH 34/57] again --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c5dda619..b8296e84 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package '-Djenkins.test.timeout=3600' + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package \'-Djenkins.test.timeout=3600\' ''' } stage('surefire-report') { From 381a4d14882449a67626099b02b55a486db0595b Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:30:30 +0200 Subject: [PATCH 35/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b8296e84..c9db00b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean package \'-Djenkins.test.timeout=3600\' + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install \'-Djenkins.test.timeout=3600\' ''' } stage('surefire-report') { From 16305dce7338d97943f7c0bab3dfacfcb09f35ee Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:35:25 +0200 Subject: [PATCH 36/57] bump --- .../docker/EntoEndUserCacheLookupEnabledTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java index 93b9e7a9..bf85abde 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java @@ -78,9 +78,12 @@ public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, Str ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, site, bindName, bindPassword, null, groupLookupStrategy, removeIrrelevantGroups, customDomain, cache, startTls, internalUsersDatabase); j.getInstance().setSecurityRealm(activeDirectorySecurityRealm); + while(!FileUtils.readFileToString(d.getLogfile()).contains("custom (exit status 0; expected)")) { Thread.sleep(1000); } + + UserDetails userDetails = null; int i = 0; while (i < MAX_RETRIES && userDetails == null) { From 49a71c8308a1a12e37f401e7f7d3c3ff26bc87bd Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:37:03 +0200 Subject: [PATCH 37/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c9db00b4..e6d24d8c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install \'-Djenkins.test.timeout=3600\' + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -D\'jenkins.test.timeout=3600\' ''' } stage('surefire-report') { From cace6cba7b5f7dfd9a84e38d7f33c1d021628c0f Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:37:54 +0200 Subject: [PATCH 38/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e6d24d8c..34b681aa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -D\'jenkins.test.timeout=3600\' + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install ''' } stage('surefire-report') { From b9a41b33568e0cc750be98ea640adef643ff3357 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:39:36 +0200 Subject: [PATCH 39/57] bump --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 34b681aa..3769dfd4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -buildPlugin(platforms: ['linux'], timeout: "600") +buildPlugin(platforms: ['linux']) node('docker') { stage('checkout') { @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -Djenkins.test.timeout=3600 ''' } stage('surefire-report') { From 14be6ee3fa56f1bd64c170b23a81f2bc22d9c2c5 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 01:51:42 +0200 Subject: [PATCH 40/57] bump the good one --- pom.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pom.xml b/pom.xml index 10b32c4d..700597a8 100644 --- a/pom.xml +++ b/pom.xml @@ -184,9 +184,6 @@ maven-surefire-plugin - **/TheFlintstonesTest.java - - **/EntoEndUserCacheLookupDisabledTest.java **/WindowsAdsiModeUserCacheDisabledTest.java **/WindowsAdsiModeUserCacheEnabledTest.java From 668039824521e036a18b40416d906c2f686df3c0 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 07:10:02 +0200 Subject: [PATCH 41/57] bump --- pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pom.xml b/pom.xml index 700597a8..10b32c4d 100644 --- a/pom.xml +++ b/pom.xml @@ -184,6 +184,9 @@ maven-surefire-plugin + **/TheFlintstonesTest.java + + **/EntoEndUserCacheLookupDisabledTest.java **/WindowsAdsiModeUserCacheDisabledTest.java **/WindowsAdsiModeUserCacheEnabledTest.java From 16400f1d34904150855dd684ae46c145159b4f04 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 07:33:10 +0200 Subject: [PATCH 42/57] bump again --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 10b32c4d..804a801e 100644 --- a/pom.xml +++ b/pom.xml @@ -186,7 +186,7 @@ **/TheFlintstonesTest.java - **/EntoEndUserCacheLookupDisabledTest.java + **/WindowsAdsiModeUserCacheDisabledTest.java **/WindowsAdsiModeUserCacheEnabledTest.java From b62c7149340b53a366c7ee0bdb757a41ed7cf9cb Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 07:39:38 +0200 Subject: [PATCH 43/57] remove space to bump --- .../docker/EntoEndUserCacheLookupDisabledTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java index e5a50333..ec9c5fe8 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java @@ -140,7 +140,6 @@ public void testEndtoEndManagerDnCacheDisabled() throws Exception { // Try to login as Fred with correct password wc.login("Fred", "ia4uV1EeKait"); assertThat(wc.goToXml("whoAmI/api/xml").asXml().replaceAll("\\s+", ""), containsString("Fred")); - } @DockerFixture(id = "ad-dc", ports= {135, 138, 445, 39, 464, 389, 3268}, udpPorts = {53}, matchHostPorts = true, dockerfileFolder="docker/TheFlintstonesTest/TheFlintstones") From 4a141494eff248d89188e0db13fc30430f44c288 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 07:50:05 +0200 Subject: [PATCH 44/57] bump --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 804a801e..e923f721 100644 --- a/pom.xml +++ b/pom.xml @@ -184,8 +184,8 @@ maven-surefire-plugin - **/TheFlintstonesTest.java - + + **/EntoEndUserCacheLookupEnabledTest.java **/WindowsAdsiModeUserCacheDisabledTest.java **/WindowsAdsiModeUserCacheEnabledTest.java From 294980807f1756a4877fbd6ade1159c92a5e7de9 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 08:01:21 +0200 Subject: [PATCH 45/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3769dfd4..0c54d937 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -Djenkins.test.timeout=3600 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures install -Djenkins.test.timeout=3600 ''' } stage('surefire-report') { From 28071a46acfff499507c628d8c33af0a5b337184 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 08:29:22 +0200 Subject: [PATCH 46/57] bump again --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0c54d937..3769dfd4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures install -Djenkins.test.timeout=3600 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -Djenkins.test.timeout=3600 ''' } stage('surefire-report') { From 212872d9a8b314f06dfa19fee8bdc03aa610a2dc Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 09:32:42 +0200 Subject: [PATCH 47/57] bump again --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3769dfd4..cec54cc7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -Djenkins.test.timeout=3600 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -Djenkins.test.timeout=36000 ''' } stage('surefire-report') { From 9f0d80d28ca6fcc82b1fec6712d5aa1e73afa826 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 11:17:25 +0200 Subject: [PATCH 48/57] bump build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cec54cc7..d65a3451 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures clean install -Djenkins.test.timeout=36000 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures install -Djenkins.test.timeout=36000 ''' } stage('surefire-report') { From 893256f7775b30e6ec24c71d889263449c7e3d7c Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 11:46:28 +0200 Subject: [PATCH 49/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d65a3451..3e015e32 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures install -Djenkins.test.timeout=36000 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=36000 ''' } stage('surefire-report') { From 34c9b850c51de194580b654417c8e5c81e4d5d81 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 12:33:29 +0200 Subject: [PATCH 50/57] bump a new build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3e015e32..3e35b1c9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=36000 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=60000 ''' } stage('surefire-report') { From effb516b7c6af19661dcb7c2ecca09285cf5a4b6 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 13:50:06 +0200 Subject: [PATCH 51/57] bump build increasing timeout --- pom.xml | 2 +- .../docker/EntoEndUserCacheLookupDisabledTest.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e923f721..a20e2b14 100644 --- a/pom.xml +++ b/pom.xml @@ -184,7 +184,7 @@ maven-surefire-plugin - + **/TheFlintstonesTest.java **/EntoEndUserCacheLookupEnabledTest.java **/WindowsAdsiModeUserCacheDisabledTest.java diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java index ec9c5fe8..4ee89afc 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupDisabledTest.java @@ -16,6 +16,7 @@ import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.LoggerRule; +import org.jvnet.hudson.test.recipes.WithTimeout; import java.util.ArrayList; import java.util.List; @@ -73,6 +74,7 @@ public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, Str } @Test + @WithTimeout(6000) public void testEndtoEndManagerDnCacheEnabled() throws Exception { List messages; l.record(hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.class, Level.FINE).capture(20); @@ -109,6 +111,7 @@ public void testEndtoEndManagerDnCacheEnabled() throws Exception { } @Test + @WithTimeout(6000) public void testEndtoEndManagerDnCacheDisabled() throws Exception { List messages; l.record(hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.class, Level.FINE).capture(20); From e59bb238ef9ea659897603226908167589425745 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 22:44:48 +0200 Subject: [PATCH 52/57] bump build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3e35b1c9..c000c1c2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=60000 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=6000 ''' } stage('surefire-report') { From e78533b38d4d769a99a61003ae1125a4f7f265c3 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 23:12:54 +0200 Subject: [PATCH 53/57] bump full build --- pom.xml | 4 ++-- .../EntoEndUserCacheLookupEnabledTest.java | 3 +++ .../docker/TheFlintstonesTest.java | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a20e2b14..bfb11b5f 100644 --- a/pom.xml +++ b/pom.xml @@ -184,8 +184,8 @@ maven-surefire-plugin - **/TheFlintstonesTest.java - **/EntoEndUserCacheLookupEnabledTest.java + + **/WindowsAdsiModeUserCacheDisabledTest.java **/WindowsAdsiModeUserCacheEnabledTest.java diff --git a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java index bf85abde..815b487a 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/EntoEndUserCacheLookupEnabledTest.java @@ -19,6 +19,7 @@ import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.LoggerRule; +import org.jvnet.hudson.test.recipes.WithTimeout; import java.util.ArrayList; import java.util.List; @@ -97,6 +98,7 @@ public void customSingleADSetup(ActiveDirectoryDomain activeDirectoryDomain, Str } @Test + @WithTimeout(6000) public void testEndtoEndManagerDnCacheEnabled() throws Exception { List messages; l.record(hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.class, Level.FINE).capture(20); @@ -133,6 +135,7 @@ public void testEndtoEndManagerDnCacheEnabled() throws Exception { } @Test + @WithTimeout(6000) public void testEndtoEndManagerDnCacheDisabled() throws Exception { List messages; l.record(hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.class, Level.FINE).capture(20); diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 60d93560..6ad7ad9f 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -69,6 +69,7 @@ import hudson.util.RingBufferLogHandler; import org.jvnet.hudson.test.LoggerRule; import org.jvnet.hudson.test.recipes.LocalData; +import org.jvnet.hudson.test.recipes.WithTimeout; /** * Integration tests with Docker @@ -142,6 +143,7 @@ public void manualSetUp() throws Exception { } @Test + @WithTimeout(6000) public void simpleLoginSuccessful() throws Exception { dynamicSetUp(); UserDetails userDetails = j.jenkins.getSecurityRealm().loadUserByUsername("Fred"); @@ -149,6 +151,7 @@ public void simpleLoginSuccessful() throws Exception { } @Test + @WithTimeout(6000) public void actualLogin() throws Exception { dynamicSetUp(); JenkinsRule.WebClient wc = j.createWebClient().login("Fred", "ia4uV1EeKait"); @@ -162,6 +165,7 @@ public void actualLogin() throws Exception { @Issue("SECURITY-2099") @Test + @WithTimeout(6000) public void shouldNotAllowEmptyPassword() throws Exception { l.record(hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.class, Level.FINE).capture(20); dynamicSetUp(); @@ -175,6 +179,7 @@ public void shouldNotAllowEmptyPassword() throws Exception { } @Test + @WithTimeout(6000) public void simpleLoginFails() throws Exception { dynamicSetUp(); try { @@ -186,6 +191,7 @@ public void simpleLoginFails() throws Exception { @Issue("JENKINS-36148") @Test + @WithTimeout(6000) public void checkDomainHealth() throws Exception { dynamicSetUp(); ActiveDirectorySecurityRealm securityRealm = (ActiveDirectorySecurityRealm) Jenkins.getInstance().getSecurityRealm(); @@ -195,6 +201,7 @@ public void checkDomainHealth() throws Exception { @Issue("JENKINS-36148") @Test + @WithTimeout(6000) public void validateCustomDomainController() throws ServletException, NamingException, IOException, Exception { dynamicSetUp(); ActiveDirectoryDomain.DescriptorImpl adDescriptor = new ActiveDirectoryDomain.DescriptorImpl(); @@ -203,6 +210,7 @@ public void validateCustomDomainController() throws ServletException, NamingExce @Issue("JENKINS-36148") @Test + @WithTimeout(6000) public void validateDomain() throws ServletException, NamingException, IOException, Exception { dynamicSetUp(); ActiveDirectoryDomain.DescriptorImpl adDescriptor = new ActiveDirectoryDomain.DescriptorImpl(); @@ -212,6 +220,7 @@ public void validateDomain() throws ServletException, NamingException, IOExcepti @Issue("JENKINS-45576") @Test + @WithTimeout(6000) public void loadGroupFromGroupname() throws Exception { dynamicSetUp(); String groupname = "The Rubbles"; @@ -221,6 +230,7 @@ public void loadGroupFromGroupname() throws Exception { @Issue("JENKINS-45576") @Test + @WithTimeout(6000) public void loadGroupFromAlias() throws Exception { dynamicSetUp(); // required to monitor the log messages, removing this line the test will fail @@ -266,6 +276,7 @@ public synchronized void publish(LogRecord record) { @LocalData @Test + @WithTimeout(6000) public void testSimpleLoginSuccessfulAfterReadResolveTlsConfigurationSingleDomain() throws Exception { manualSetUp(); UserDetails userDetails = j.jenkins.getSecurityRealm().loadUserByUsername("Fred"); @@ -274,6 +285,7 @@ public void testSimpleLoginSuccessfulAfterReadResolveTlsConfigurationSingleDomai @LocalData @Test + @WithTimeout(6000) public void testSimpleLoginFailsAfterReadResolveTlsConfigurationSingleDomain() throws Exception { manualSetUp(); try { @@ -285,6 +297,7 @@ public void testSimpleLoginFailsAfterReadResolveTlsConfigurationSingleDomain() t @LocalData @Test + @WithTimeout(6000) public void testSimpleLoginSuccessAfterReadResolveTlsConfigurationMultipleDomainsOneDomain() throws Exception { manualSetUp(); UserDetails userDetails = j.jenkins.getSecurityRealm().loadUserByUsername("Fred"); @@ -293,6 +306,7 @@ public void testSimpleLoginSuccessAfterReadResolveTlsConfigurationMultipleDomain @LocalData @Test + @WithTimeout(6000) public void testSimpleLoginFailsAfterReadResolveTlsConfigurationMultipleDomainsOneDomain() throws Exception { manualSetUp(); try { @@ -305,6 +319,7 @@ public void testSimpleLoginFailsAfterReadResolveTlsConfigurationMultipleDomainsO // TlsConfiguration tests @LocalData @Test + @WithTimeout(6000) public void testSimpleLoginSuccessfulTrustingAllCertificates() throws Exception { manualSetUp(); UserDetails userDetails = j.jenkins.getSecurityRealm().loadUserByUsername("Fred"); @@ -313,6 +328,7 @@ public void testSimpleLoginSuccessfulTrustingAllCertificates() throws Exception @LocalData @Test + @WithTimeout(6000) public void testSimpleLoginFailsTrustingJDKTrustStore() throws Exception { try { manualSetUp(); @@ -323,6 +339,7 @@ public void testSimpleLoginFailsTrustingJDKTrustStore() throws Exception { @Issue("SECURITY-2117") @Test + @WithTimeout(6000) public void testNullBytesInPasswordMustFail() throws Exception { l.record(hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.class, Level.FINE).capture(20); dynamicSetUp(); @@ -337,6 +354,7 @@ public void testNullBytesInPasswordMustFail() throws Exception { @Issue("SECURITY-2117") @Test + @WithTimeout(6000) public void testIncorrectPasswordMustFail() throws Exception { l.record(hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.class, Level.FINE).capture(20); dynamicSetUp(); From b220d358e50e36d746231c22677d79378d96d6d0 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Wed, 30 Jun 2021 23:34:39 +0200 Subject: [PATCH 54/57] bump full tests --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c000c1c2..cf8337a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=6000 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=7000 ''' } stage('surefire-report') { From 5686679e908e1403cf39fc8318cffd2f93297fc0 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Thu, 1 Jul 2021 08:45:06 +0200 Subject: [PATCH 55/57] bump --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cf8337a8..c000c1c2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node('docker') { } stage('maven') { sh ''' - docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=7000 + docker run --add-host=samdom.example.com:127.0.0.1 -v /var/lib/docker --privileged --dns=127.0.0.1 --dns=8.8.8.8 -v $WORKSPACE:/project fbelzunc/ad-build-container-with-docker-fixtures package -Djenkins.test.timeout=6000 ''' } stage('surefire-report') { From d95b532243053ba180940a88905588121e9bd1b8 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Thu, 1 Jul 2021 09:39:52 +0200 Subject: [PATCH 56/57] bump again --- .../plugins/active_directory/docker/TheFlintstonesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 6ad7ad9f..1d3f4d60 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -96,7 +96,7 @@ public void dynamicSetUp() throws Exception { TheFlintstones d = docker.get(); dockerIp = d.ipBound(3268); dockerPort = d.port(3268); - ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, null /*dockerIp + ":" + dockerPort*/ , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); + ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, null, dockerIp + ":" + dockerPort , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null); From a3d864d21d1fe961c7be17d76fc67a62314b4739 Mon Sep 17 00:00:00 2001 From: fbelzunc Date: Thu, 1 Jul 2021 09:49:43 +0200 Subject: [PATCH 57/57] rerbump --- .../plugins/active_directory/docker/TheFlintstonesTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java index 1d3f4d60..568d622b 100644 --- a/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java +++ b/src/test/java/hudson/plugins/active_directory/docker/TheFlintstonesTest.java @@ -96,8 +96,7 @@ public void dynamicSetUp() throws Exception { TheFlintstones d = docker.get(); dockerIp = d.ipBound(3268); dockerPort = d.port(3268); - ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, null, dockerIp + ":" + dockerPort , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); - List domains = new ArrayList<>(1); + ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(AD_DOMAIN, dockerIp + ":" + dockerPort , null, AD_MANAGER_DN, AD_MANAGER_DN_PASSWORD); List domains = new ArrayList<>(1); domains.add(activeDirectoryDomain); ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null); j.getInstance().setSecurityRealm(activeDirectorySecurityRealm);