Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LDAP and SAML groups #314

Merged
merged 25 commits into from
Jun 16, 2020
Merged

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented May 26, 2020

This PR adds support for Org group management by introducing the following methods:

  • CreateGroup
  • GetGroupByHref
  • GetGroupById
  • GetGroupByName
  • GetGroupByNameOrId
  • Delete
  • Update
  • NewGroup

Additionally it adds two new methods for adminOrg - LdapConfigure and LdapDisable to aid automated testing.

Testing

Two tests test_GroupCRUD and test_GroupFinderGetGenericEntity are added. They are both are run from main test Test_LDAP which sets up LDAP configuration in vCD - spawns Photon OS VM and uses testing LDAP container https://github.com/rroemhild/docker-test-openldap inside it (using customization scripts.

Note. These tests will not work when run separately because LDAP configuration must be present.
Note. External network with valid IPs and DNS servers must be configured because guest will not be able to pull docker image otherwise.

make test passed on 9.5 and 10.1. Also on 10.1 using SAML authentication (and enabling SAML group related tests in test_GroupCRUD.

@Didainius Didainius marked this pull request as ready for review May 28, 2020 19:28
@Didainius Didainius self-assigned this May 28, 2020
Copy link
Contributor

@vbauzys vbauzys left a comment

Choose a reason for hiding this comment

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

Overall looks good ;-)

govcd/adminorg_administration.go Outdated Show resolved Hide resolved
govcd/adminorg_administration.go Show resolved Hide resolved
govcd/adminorg_ldap_test.go Outdated Show resolved Hide resolved
govcd/adminorg_ldap_test.go Outdated Show resolved Hide resolved
govcd/adminorg_ldap_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

LGTM! Just a question about the reasons for a big timeout increase.

@@ -7,7 +7,7 @@ default: fmtcheck vet static build
# test runs the test suite and vets the code
test: testunit
@echo "==> Running Functional Tests"
cd govcd && go test -tags "functional" -timeout=200m -check.vv .
cd govcd && go test -tags "functional" -timeout=300m -check.vv .
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please tell more why are you adding additional one hundred minutes to the timeout :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is not related to this exact group PR. I did hit timeouts in general for full suite runs in slower envs that is why I increased the "default".

@Didainius Didainius merged commit 4faf9ee into vmware:master Jun 16, 2020
@Didainius Didainius deleted the ldap_groups branch June 16, 2020 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants