-
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
feat: adding implementation for client lib #36
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Seth Vargo <seth@sethvargo.com>
raserva
changed the title
feat: adding implementation for client lib
!! DO NOT REVIEW - RE WRITING !! feat: adding implementation for client lib
May 24, 2022
raserva
changed the title
!! DO NOT REVIEW - RE WRITING !! feat: adding implementation for client lib
feat: adding implementation for client lib
May 24, 2022
This should be ready for another pass, whenever people have time |
capri-xiyue
approved these changes
May 25, 2022
yolocs
previously requested changes
May 25, 2022
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
Co-authored-by: cshou <cshou@google.com>
sethvargo
approved these changes
May 26, 2022
sqin2019
pushed a commit
that referenced
this pull request
Apr 6, 2023
* feat: add config class and logic * PR feedback * change version from float to integer * changed int8 to uint 8 in config version * feat: Added protobufs and gen_protos script * added newline * removed extra newline * remove optional * s/v1/v0 * adding implementation for jvs server * add newly generated protos * implementing jvs server * minor updates * adding config tests * PR feedback * Update pkg/config/justification_config.go Co-authored-by: Seth Vargo <seth@sethvargo.com> * feat: added signing code to jvs * minor updates * Update to not use gcp jwt library * minor cosmetic fixes * minor fixes * PR feedback * updated comment * ran go mod tidy and go format * PR feedback * fix issue * feat: Implementing cert rotation logic that leverages an external db to save some state * PR feedback * cont'd * PR feedback * updates * reduce nesting * added working implementation & tests * small fixes and comments * tidy * moar tests * changed to use labels * updated labels to match kms guidelines * remove unnecessary config members * added comment * fix bug where current time is not updated. * refactor to make state store an interface * add required dependency to main * added some comments * move method into state store * starting public key api * PR feedback * more public key implementation * minor updates * remove dependency, some PR feedback * add cache * only save primary in labels * change to en cache * fix one merge miss * clean up rotation handler * order similar functions together * go mod tidy * update to use zap * PR feedback * added the cache tests * fix comment * add return after http err * fix some linter issues * PR feedback * Update pkg/jvscrypto/key_hosting_test.go Co-authored-by: cshou <cshou@google.com> * adding client libs * added ECDSA key sanity check * update some other strings to remove escaped quotes * feat: adding client implementation * few small improvements * switched to JWX library * formatting * cache timeout validation * remove print statements * add doc * Update client-lib/go/client/jvs_client.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * refactored tests Co-authored-by: Seth Vargo <seth@sethvargo.com> Co-authored-by: cshou <cshou@google.com>
verbanicm
pushed a commit
that referenced
this pull request
Jun 14, 2023
* feat: add config class and logic * PR feedback * change version from float to integer * changed int8 to uint 8 in config version * feat: Added protobufs and gen_protos script * added newline * removed extra newline * remove optional * s/v1/v0 * adding implementation for jvs server * add newly generated protos * implementing jvs server * minor updates * adding config tests * PR feedback * Update pkg/config/justification_config.go Co-authored-by: Seth Vargo <seth@sethvargo.com> * feat: added signing code to jvs * minor updates * Update to not use gcp jwt library * minor cosmetic fixes * minor fixes * PR feedback * updated comment * ran go mod tidy and go format * PR feedback * fix issue * feat: Implementing cert rotation logic that leverages an external db to save some state * PR feedback * cont'd * PR feedback * updates * reduce nesting * added working implementation & tests * small fixes and comments * tidy * moar tests * changed to use labels * updated labels to match kms guidelines * remove unnecessary config members * added comment * fix bug where current time is not updated. * refactor to make state store an interface * add required dependency to main * added some comments * move method into state store * starting public key api * PR feedback * more public key implementation * minor updates * remove dependency, some PR feedback * add cache * only save primary in labels * change to en cache * fix one merge miss * clean up rotation handler * order similar functions together * go mod tidy * update to use zap * PR feedback * added the cache tests * fix comment * add return after http err * fix some linter issues * PR feedback * Update pkg/jvscrypto/key_hosting_test.go Co-authored-by: cshou <cshou@google.com> * adding client libs * added ECDSA key sanity check * update some other strings to remove escaped quotes * feat: adding client implementation * few small improvements * switched to JWX library * formatting * cache timeout validation * remove print statements * add doc * Update client-lib/go/client/jvs_client.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * Update client-lib/go/client/jvs_client_test.go Co-authored-by: cshou <cshou@google.com> * refactored tests Co-authored-by: Seth Vargo <seth@sethvargo.com> Co-authored-by: cshou <cshou@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Few things to note:
The environment config library does not gracefully handle overwrite and default flags set. In this library, you pass in an existing object (originally set using YAML in this code), and if "overwrite" is set, then existing values are overwritten if env vars are set. There is also functionality to specify a default if no env var is set. Right now, if default and overwrite is set, existing (YAML) values will always be overwritten. Therefore, the precedence (if using the library) is env vars > default > yaml. However, i would like env vars > yaml > default, and must set it manually through code.
Currently, the core JVS implementations use a different library for JWT creation & signing. Here is another PR that does the necessary changes server-side: #37