-
Notifications
You must be signed in to change notification settings - Fork 59
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
control-service: secrets service implementation #2241
Conversation
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]>
Fix codacy checks Signed-off-by: Dako Dakov <[email protected]>
Fix codacy violations. Signed-off-by: Dako Dakov <[email protected]>
projects/control-service/projects/pipelines_control_service/build.gradle
Outdated
Show resolved
Hide resolved
...ol_service/src/main/java/com/vmware/taurus/secrets/controller/DataJobsSecretsController.java
Outdated
Show resolved
Hide resolved
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]>
Address review feedback. Signed-off-by: Dako Dakov <[email protected]>
...es_control_service/src/main/java/com/vmware/taurus/exception/DataJobPropertiesException.java
Show resolved
Hide resolved
...ts/pipelines_control_service/src/main/java/com/vmware/taurus/secrets/service/JobSecrets.java
Outdated
Show resolved
Hide resolved
...lines_control_service/src/main/java/com/vmware/taurus/secrets/service/JobSecretsService.java
Outdated
Show resolved
Hide resolved
...lines_control_service/src/main/java/com/vmware/taurus/secrets/service/JobSecretsService.java
Outdated
Show resolved
Hide resolved
...lines_control_service/src/main/java/com/vmware/taurus/secrets/service/JobSecretsService.java
Outdated
Show resolved
Hide resolved
...lines_control_service/src/main/java/com/vmware/taurus/secrets/service/JobSecretsService.java
Outdated
Show resolved
Hide resolved
...ol_service/src/main/java/com/vmware/taurus/secrets/controller/DataJobsSecretsController.java
Outdated
Show resolved
Hide resolved
...es_control_service/src/main/java/com/vmware/taurus/exception/DataJobPropertiesException.java
Outdated
Show resolved
Hide resolved
...lines_control_service/src/main/java/com/vmware/taurus/exception/DataJobSecretsException.java
Outdated
Show resolved
Hide resolved
Address review feedback. Signed-off-by: Dako Dakov <[email protected]>
projects/control-service/projects/pipelines_control_service/build.gradle
Outdated
Show resolved
Hide resolved
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]>
package com.vmware.taurus.exception; | ||
|
||
/** Exception thrown, when a secret storage has not been configured */ | ||
public class SecretStorageNotConfiguredException extends ExternalSystemError { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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.