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

INTMDB-301: Feature add: Add support for management of federated authentication configuration #296

Merged
merged 21 commits into from
May 27, 2022

Conversation

martinstibbe
Copy link
Collaborator

@martinstibbe martinstibbe commented May 18, 2022

Description

Add support for managment of federated authentication configuration

Link to any related issue(s):
https://jira.mongodb.org/browse/INTMDB-301

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Required 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

@martinstibbe martinstibbe requested a review from a team as a code owner May 18, 2022 21:15
Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

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

Thanks for adding these resources. I have some minor comments

mongodbatlas/federation_settings.go Outdated Show resolved Hide resolved
mongodbatlas/federation_settings.go Outdated Show resolved Hide resolved
mongodbatlas/federation_settings.go Outdated Show resolved Hide resolved
mongodbatlas/federation_settings.go Show resolved Hide resolved
mongodbatlas/federation_settings_connected_org_config.go Outdated Show resolved Hide resolved
return nil, NewArgError("federationSettingsID", "must be set")
}

basePath := fmt.Sprintf(federationSettingsOrganizationConnectionBasePath, federationSettingsID, orgID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

@@ -0,0 +1,157 @@
// Copyright 2019 MongoDB Inc
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Copyright 2019 MongoDB Inc
// Copyright 2022 MongoDB Inc

@@ -0,0 +1,76 @@
// Copyright 2019 MongoDB Inc
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Copyright 2019 MongoDB Inc
// Copyright 2022 MongoDB Inc

@martinstibbe martinstibbe changed the title INTMDB-301: Feature add: Add support for managment of federated authentication configuration INTMDB-301: Feature add: Add support for management of federated authentication configuration May 25, 2022
@themantissa
Copy link
Collaborator

@gssbzn is there anyone else on the team that can review this while Andrea is out on vacation?

@colm-quinn
Copy link
Collaborator

Tagging @blva @tibulca @fmenezes, can one of you review these Terraform PR's, following the guidance Andrea added to the wiki? Thanks!

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.

There's a big change required here which is orgnaizing all the added method under the same service to follow our practice of grouping the same way the docs group

Get(context.Context, string) (*FederatedSettings, *Response, error)
Delete(context.Context, string) (*Response, error)
ListConnectedOrgs(context.Context, *ListOptions, string) (*FederatedSettingsConnectedOrganizations, *Response, error)
GetConnectedOrgs(context.Context, string, string) (*FederatedSettingsConnectedOrganization, *Response, error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
GetConnectedOrgs(context.Context, string, string) (*FederatedSettingsConnectedOrganization, *Response, error)
GetConnectedOrg(context.Context, string, string) (*FederatedSettingsConnectedOrganization, *Response, error)

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.

Some small nits, I still see many of andreas comments unaddressed, common themes, godocs need to be reviewed, and let's keep list options as last params

mongodbatlas/federation_settings.go Outdated Show resolved Hide resolved
mongodbatlas/federation_settings.go Outdated Show resolved Hide resolved
mongodbatlas/federation_settings.go Outdated Show resolved Hide resolved
UpdateRoleMapping(context.Context, string, string, string, *FederatedSettingsOrganizationRoleMapping) (*FederatedSettingsOrganizationRoleMapping, *Response, error)
DeleteRoleMapping(context.Context, string, string, string) (*Response, error)

ListIdentityProvider(context.Context, *ListOptions, string) ([]FederatedSettingsIdentityProvider, *Response, error)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ListIdentityProvider(context.Context, *ListOptions, string) ([]FederatedSettingsIdentityProvider, *Response, error)
ListIdentityProviders(context.Context, *ListOptions, string) ([]FederatedSettingsIdentityProvider, *Response, error)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored to ListIdentityProviders(context.Context, string, *ListOptions) ([]FederatedSettingsIdentityProvider, *Response, error)

mongodbatlas/federation_settings.go Outdated Show resolved Hide resolved
mongodbatlas/federation_settings_connected_org_config.go Outdated Show resolved Hide resolved
mongodbatlas/federation_settings_identity_provider.go Outdated Show resolved Hide resolved
@martinstibbe martinstibbe requested a review from gssbzn May 26, 2022 17:10
@martinstibbe martinstibbe requested a review from gssbzn May 27, 2022 11:53
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 thanks for all the work here

@martinstibbe martinstibbe merged commit ba676d3 into master May 27, 2022
@martinstibbe martinstibbe deleted the INTMDB-301 branch May 27, 2022 13:36
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