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

CLOUDP-70047: mongocli atlas security ldap verify #437

Merged
merged 5 commits into from
Sep 10, 2020

Conversation

andreaangiolillo
Copy link
Collaborator

Proposed changes

Jira ticket: CLOUDP-70047

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

./bin/mongocli atlas ldap verify --hostname 2.tcp.ngrok.io --port 19657 --bindUsername "cn=admin,dc=example,dc=org" --binPassword admin
REQUEST ID                 PROJECT ID                 STATUS
5f5a45e1862d6e0f036cb1a5   5e4e593f70dfbf1010295836   PENDING
./bin/mongocli atlas ldap verify --hostname 2.tcp.ngrok.io --port 19657 --bindUsername "cn=admin,dc=example,dc=org" --binPassword admin -o json
{
  "requestId": "5f5a468d758b50534d028f98",
  "groupId": "5e4e593f70dfbf1010295836",
  "request": {
    "hostname": "2.tcp.ngrok.io",
    "port": 19657,
    "bindUsername": "cn=admin,dc=example,dc=org"
  },
  "status": "PENDING",
  "links": [
    {
      "rel": "self",
      "href": "https://cloud-dev.mongodb.com/api/atlas/v1.0/groups/5e4e593f70dfbf1010295836/userSecurity/ldap/verify/5f5a468d758b50534d028f98"
    }
  ]
}

@andreaangiolillo andreaangiolillo marked this pull request as ready for review September 10, 2020 16:29
Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

LGTM one small nit but non blocking

@@ -24,6 +24,12 @@ const (
Secret = "secret" // Secret flag
ProjectID = "projectId" // ProjectID flag to use a project ID
AuthDB = "authDB" // AuthDB flag
Hostname = "hostname" // Hostname flag
Port = "port" // Port flag
Copy link
Collaborator

Choose a reason for hiding this comment

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

wow we did not have this yet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, that's really strange indeed. I was sure they were already there 🤷‍♂️

@@ -36,6 +36,12 @@ const (
DBUsername = "Username for authenticating to MongoDB."
TeamName = "Name of the team."
UserID = "The ID of the user."
Hostname = "The hostname or IP address of the LDAP server."
Port = "The port to which the LDAP server listens for client connections. Default: 636"
Copy link
Collaborator

Choose a reason for hiding this comment

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

[non-blocking] we should name this LDAPPort to avoid someone copy/pasting the flag without realising the copy is ldap specific

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am going to change them in the next PR

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.

2 participants