Skip to content

CLOUDSTACK-8596 ability to query nested groups for Microsoft AD - #609

Merged
asfgit merged 3 commits into
apache:masterfrom
karuturi:CLOUDSTACK-8596
Jul 24, 2015
Merged

asfgit merged 3 commits into
apache:masterfrom
karuturi:CLOUDSTACK-8596

Conversation

@karuturi

Copy link
Copy Markdown
Member

added a new configuration to select the appropriate ldap implementation
incase of microsoft AD enabled nested querying of group members

moved LdapUserManager to an interface and added separate implementations
for openLdap and microsoft AD
Added unit tests for the new code

screen shot 2015-07-20 at 6 06 54 pm

added a new configuration to select the appropriate ldap implementation
incase of microsoft AD enabled nested querying of group members

moved LdapUserManager to an interface and added separate implementations
for openLdap and microsoft AD
Added unit tests
@asfbot

asfbot commented Jul 20, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #88 SUCCESS
This pull request looks good

@asfbot

asfbot commented Jul 20, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #786 SUCCESS
This pull request looks good

@asfbot

asfbot commented Jul 20, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #21 SUCCESS
This pull request looks good

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why inject and pass on in the constructor. Do both have usage scenarios?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constructor initialized ones were used in the unit tests to supply mocks.

the changes in commit ec32ea3 changed
gmaven version in ldap plugin which broke running the spock tests from
command line. Hence reverting the change until we fix it with
the new version.
@asfbot

asfbot commented Jul 22, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #101 SUCCESS
This pull request looks good

@karuturi

Copy link
Copy Markdown
Member Author
root@Rajani's MS ~/source/cloudstack/plugins/user-authenticators/ldap (CLOUDSTACK-8596)$ mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache CloudStack Plugin - User Authenticator LDAP 4.6.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ cloud-plugin-user-authenticator-ldap ---
[INFO] Deleting /root/source/cloudstack/plugins/user-authenticators/ldap/target (includes = [**/*], excludes = [])
[INFO] Deleting /root/source/cloudstack/plugins/user-authenticators/ldap (includes = [target, dist], excludes = [])
[INFO]
[INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ cloud-plugin-user-authenticator-ldap ---
[INFO] Starting audit...
Audit done.

[INFO]
[INFO] --- maven-remote-resources-plugin:1.3:process (default) @ cloud-plugin-user-authenticator-ldap ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ cloud-plugin-user-authenticator-ldap ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ cloud-plugin-user-authenticator-ldap ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 29 source files to /root/source/cloudstack/plugins/user-authenticators/ldap/target/classes
[INFO]
[INFO] --- gmaven-plugin:1.3:compile (default) @ cloud-plugin-user-authenticator-ldap ---
[INFO] Compiled 38 Groovy classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ cloud-plugin-user-authenticator-ldap ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ cloud-plugin-user-authenticator-ldap ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- gmaven-plugin:1.3:testCompile (default) @ cloud-plugin-user-authenticator-ldap ---
[INFO] Compiled 38 Groovy classes
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ cloud-plugin-user-authenticator-ldap ---
[INFO] Surefire report directory: /root/source/cloudstack/plugins/user-authenticators/ldap/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running groovy.org.apache.cloudstack.ldap.NoLdapUserMatchingQueryExceptionSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.304 sec - in groovy.org.apache.cloudstack.ldap.NoLdapUserMatchingQueryExceptionSpec
Running groovy.org.apache.cloudstack.ldap.LdapManagerImplSpec
log4j:WARN No appenders could be found for logger (org.apache.cloudstack.ldap.LdapManagerImpl).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.38 sec - in groovy.org.apache.cloudstack.ldap.LdapManagerImplSpec
Running groovy.org.apache.cloudstack.ldap.LdapListUsersCmdSpec
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec - in groovy.org.apache.cloudstack.ldap.LdapListUsersCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapAddConfigurationCmdSpec
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec - in groovy.org.apache.cloudstack.ldap.LdapAddConfigurationCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapUserSpec
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec - in groovy.org.apache.cloudstack.ldap.LdapUserSpec
Running groovy.org.apache.cloudstack.ldap.LdapAuthenticatorSpec
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 sec - in groovy.org.apache.cloudstack.ldap.LdapAuthenticatorSpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationVOSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationVOSpec
Running groovy.org.apache.cloudstack.ldap.OpenLdapUserManagerSpec
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.095 sec - in groovy.org.apache.cloudstack.ldap.OpenLdapUserManagerSpec
Running groovy.org.apache.cloudstack.ldap.LdapDeleteConfigurationCmdSpec
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec - in groovy.org.apache.cloudstack.ldap.LdapDeleteConfigurationCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapUserResponseSpec
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec - in groovy.org.apache.cloudstack.ldap.LdapUserResponseSpec
Running groovy.org.apache.cloudstack.ldap.LdapUserManagerFactorySpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.03 sec - in groovy.org.apache.cloudstack.ldap.LdapUserManagerFactorySpec
Running groovy.org.apache.cloudstack.ldap.ADLdapUserManagerImplSpec
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec - in groovy.org.apache.cloudstack.ldap.ADLdapUserManagerImplSpec
Running groovy.org.apache.cloudstack.ldap.LdapCreateAccountCmdSpec
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.201 sec - in groovy.org.apache.cloudstack.ldap.LdapCreateAccountCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapImportUsersCmdSpec
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 sec - in groovy.org.apache.cloudstack.ldap.LdapImportUsersCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapSearchUserCmdSpec
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec - in groovy.org.apache.cloudstack.ldap.LdapSearchUserCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapListConfigurationCmdSpec
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in groovy.org.apache.cloudstack.ldap.LdapListConfigurationCmdSpec
Running groovy.org.apache.cloudstack.ldap.NoSuchLdapUserExceptionSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in groovy.org.apache.cloudstack.ldap.NoSuchLdapUserExceptionSpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationResponseSpec
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationResponseSpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationSpec
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.057 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationSpec
Running groovy.org.apache.cloudstack.ldap.LdapContextFactorySpec
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.082 sec - in groovy.org.apache.cloudstack.ldap.LdapContextFactorySpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationDaoImplSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationDaoImplSpec
Running groovy.org.apache.cloudstack.ldap.LdapUtilsSpec
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec - in groovy.org.apache.cloudstack.ldap.LdapUtilsSpec

Results :

Tests run: 138, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.759 s
[INFO] Finished at: 2015-07-22T16:28:47+05:30
[INFO] Final Memory: 40M/717M
[INFO] ------------------------------------------------------------------------

@karuturi

Copy link
Copy Markdown
Member Author

@DaanHoogland now you can run the tests from the command line or ide

@asfbot

asfbot commented Jul 22, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #799 UNSTABLE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Jul 22, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #34 ABORTED

@karuturi

Copy link
Copy Markdown
Member Author

@DaanHoogland @abhinandanprateek @Runseb @wilderrodrigues @bhaisaab Can you please review this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of this change please move all LDAP related config to use the ConfigKey/Configurable mechanism of publishing them. Also is it possible to have multiple ldap providers configured?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. multiple providers are not possible.
I havent touched any of the existing configurations as I will be refactoring them along with https://cwiki.apache.org/confluence/display/CLOUDSTACK/WIP%3A+LDAP%3A+Trust+AD+and+Auto+Import

@koushik-das

Copy link
Copy Markdown
Contributor

Once the comments are addressed, LGTM.

In LdapUserManagerFactory moved the beans to a map
used a Enum for LdapProvider and made the corresponding changes in
LdapConfiguration and the callers.
@asfbot

asfbot commented Jul 23, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #115 SUCCESS
This pull request looks good

@asfbot

asfbot commented Jul 23, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #813 SUCCESS
This pull request looks good

@DaanHoogland

Copy link
Copy Markdown
Contributor

ran tests from command line. code looks good. I use eclipse and did not manage to run tests in the ide yet (no problem with the PR). HInts welcome :) 👍 waiting on travis and the analisys builds

@karuturi

Copy link
Copy Markdown
Member Author

to run from eclipse, you need to install Groovy eclipse plugin https://code.google.com/p/spock/wiki/GettingStarted#Eclipse

@asfbot

asfbot commented Jul 23, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #48 ABORTED

@karuturi

Copy link
Copy Markdown
Member Author

2 LGTMs and travis is green. I am merging this to master in sometime

@asfgit
asfgit merged commit 96cf032 into apache:master Jul 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants