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 Project Connection setup for Vault OAuth provider. #91

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fatmcgav
Copy link

@fatmcgav fatmcgav commented Oct 29, 2020

This is an initial commit adding support for managing Hashicorp
Vault OAuthProvider connections.

N.B: This requires the HashiCorp Vault Support plugin is installed
within TeamCity

Fixes #90

This is an initial commit adding support for managing Hashicorp
Vault OAuthProvider connections.

N.B: This requires the `HashiCorp Vault Support` plugin is installed
within TeamCity
@fatmcgav fatmcgav marked this pull request as draft October 29, 2020 16:20
@fatmcgav fatmcgav changed the title Add Project Connection setup for Vault OAuth provider. WIP: Add Project Connection setup for Vault OAuth provider. Oct 29, 2020
Gavin Williams added 4 commits October 30, 2020 10:34
Move a lot of the `project_feature_versioned_settings` tests into a
dedicated test file.

Expand `project_feature_test` to create test multiple features, etc.
This adds a new `Locator` function to generate a Type and Provider
locator query string.
This commit adds a new `GetByTypeAndProvider` function to the
`ProjectFeatureService`.

This function can be used to find TeamCity Project features based on
their `type` and `providerType` values.
Useful when there are multiple featurs of a single `type`, such as when
multiple `OAuthProvider` features are enabled on a given project.
@fatmcgav fatmcgav marked this pull request as ready for review November 3, 2020 16:35
@fatmcgav
Copy link
Author

fatmcgav commented Nov 3, 2020

@cvbarros I think this one is ready for a review now.

Let me know if can provide any more info etc :)

@fatmcgav fatmcgav changed the title WIP: Add Project Connection setup for Vault OAuth provider. Add Project Connection setup for Vault OAuth provider. Nov 3, 2020
@cvbarros cvbarros added this to the v1.3.0 milestone Nov 18, 2020
Copy link
Owner

@cvbarros cvbarros left a comment

Choose a reason for hiding this comment

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

This is 💯 , super complete implementation - Really really helpful!
My only suggestion would be to extract the Vault Connection-specific implementation and types to its own files and test cases, making it easier to extend with new project connections (as there are endless possibilities with plugins here).

@@ -0,0 +1,161 @@
package teamcity
Copy link
Owner

Choose a reason for hiding this comment

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

May I suggest we break the feature_connection from the specific Vault types here?
Perhaps a project_connection_vault_oauth.go would be more suitable.

Options: ConnectionProviderVaultOptions{},
}

// stringProperties := []string{"displayName", "endpoint", "namespace", "role-id", "url", "vault-namespace"}
Copy link
Owner

Choose a reason for hiding this comment

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

Are these comments expected?

@cvbarros cvbarros self-assigned this Nov 18, 2020
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.

Support TeamCity project connections
2 participants