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

control-service: secrets service implementation #2241

Merged
merged 20 commits into from
Jun 14, 2023

Conversation

dakodakov
Copy link
Collaborator

Iterative change for VEP-1493.

The service is still not publich/marked as not implemented due to lack of tests which are going to be implmented as a next step.

Added the ability to optionallly configure a hashicorp vault instance, through a feature flag, uri token settings.

The change uses the spring cloud library as a client library for connecting to Hashicorp Vault.

I've opted out of using a Vault based Spring CRUD repositroy and other Spring Vault facilities as the 2.x version of the spring libraries cannot work with a vault k/v secrets storage v.2 which is now the default and migrating to spring 3.0 would require a lot of other changes across the whole service.

ddakov and others added 2 commits June 13, 2023 11:57
Iterative change for VEP-1493.

The service is still not publich/marked as not implemented due to
lack of tests which are going to be implmented as a next step.

Added the ability to optionallly configure a hashicorp vault instance,
through a feature flag, uri token settings.

The change uses the spring cloud library as a client library for
connecting to Hashicorp Vault.

I've opted out of using a Vault based Spring CRUD repositroy and
other Spring Vault facilities as the 2.x version of the spring
libraries cannot work with a vault k/v secrets storage v.2 which is
now the default and migrating to spring 3.0 would require a lot of
other changes across the whole service.

Signed-off-by: Dako Dakov <[email protected]>
ddakov and others added 3 commits June 13, 2023 13:16
Fix codacy checks

Signed-off-by: Dako Dakov <[email protected]>
Fix codacy violations.

Signed-off-by: Dako Dakov <[email protected]>
ddakov and others added 2 commits June 13, 2023 14:48
ddakov and others added 5 commits June 13, 2023 15:50
Address review feedback.

Signed-off-by: Dako Dakov <[email protected]>
Address review feedback.

Signed-off-by: Dako Dakov <[email protected]>
Address review feedback.

Signed-off-by: Dako Dakov <[email protected]>
ddakov and others added 2 commits June 14, 2023 10:02
Address review feedback.

Signed-off-by: Dako Dakov <[email protected]>
@dakodakov dakodakov merged commit 59fbfc1 into main Jun 14, 2023
@dakodakov dakodakov deleted the person/ddakov/secrets-service-initial-implementation branch June 14, 2023 14:21
package com.vmware.taurus.exception;

/** Exception thrown, when a secret storage has not been configured */
public class SecretStorageNotConfiguredException extends ExternalSystemError {
Copy link
Collaborator

Choose a reason for hiding this comment

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

External System error is 503. That does not seem suitable here.

503 is generally a re-triable error. And often would be re-tried. But as the secrets feature is disbaled re-trying is unnecessary.

403 Forbidden (means The server understood the request, but is refusing to fulfill it.)
501 Not Implemented

seem more suitable for this case. I'd vote for 501

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. I'll fix it in the upcoming PR for the tests.

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