-
Notifications
You must be signed in to change notification settings - Fork 0
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
Secrets API #48
Secrets API #48
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #48 +/- ##
============================================
+ Coverage 79.18% 82.00% +2.81%
- Complexity 104 134 +30
============================================
Files 34 44 +10
Lines 370 439 +69
Branches 7 8 +1
============================================
+ Hits 293 360 +67
- Misses 73 74 +1
- Partials 4 5 +1 ☔ View full report in Codecov by Sentry. |
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.
@hizmailovich take a look, please
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.
@hizmailovich see below
final ResourceAlreadyExistsException exception | ||
) { | ||
log.warn(exception.getMessage(), exception); | ||
return new ResponseEntity<>( |
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.
lets create a new class RestError
that encapsulate the status
and returns a Json document. This can help us to resolve code duplication. WDYT?
@RequestParam final UUID project, | ||
@RequestParam final String key | ||
) { | ||
return this.secrets.value(project, key); | ||
} |
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.
we also should have an endpoint that returns a list of keys
for secrets in the project
. Lets create a puzzle for now
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.
@hizmailovich
Also, we miss the functionality of updating
secrets (new value
for the same key
) and value encryption (to keep passwords and other sensitive info safe.
Let's create a puzzles for this as well
@@ -36,6 +36,8 @@ | |||
/** | |||
* Secret Controller. | |||
* | |||
* @todo #44:30min create an endpoint to list all secrets from the project. |
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.
We should list their keys
only
@rultor merge |
@h1alexbel Thanks for your request; @hizmailovich please confirm this. |
@rultor merge |
@h1alexbel take a look, please
Closes #44
PR-Codex overview
This PR updates package names, adds secret-related functionality, and improves exception handling.
Detailed summary
request
tocontroller.request
Secret
entity, controller, and SQL schemaRqSecret
request recordResourceAlreadyExistsException
exception class