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

feat: integration test cloud infra prep. #233

Closed
wants to merge 187 commits into from
Closed

Conversation

sqin2019
Copy link
Contributor

@sqin2019 sqin2019 commented Apr 1, 2023

part 1 of #158 - GH workflows provisioning cloud resources.
part 2 - will be addressed in an upcoming pr
follow up - enable local ci #238

raserva and others added 30 commits April 11, 2022 17:38
feat: Add scaffolding as well as implementation for rotation_handler
Revert "feat: Add scaffolding as well as implementation for rotation_handler"
…13)

* feat: Add scaffolding as well as implementation for rotation_handler

* PR feedback

* rename methods

* add comment

* change from map to slice
* feat: add config class and logic

* PR feedback

* change version from float to integer

* changed int8 to uint 8 in config version

* PR nits
* feat: Added service code for cert rotations.

* updated comments

* PR feedback

* hunting down some more capitalized logs

* PR feedback

* remove debug line

* moved dockerfile and build script

* updated to use comma as delimiter

* PR feedback
* 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

* add newly generated protos

* updated proto to use duration
* 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>

Co-authored-by: Seth Vargo <seth@sethvargo.com>
* 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

* PR feedback

* PR feedback

* reduce nesting

Co-authored-by: Seth Vargo <seth@sethvargo.com>
* chore: switched to zap as logger

* switch to structured
…es. (#25)

* 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

* PR feedback

* only save primary in labels

* clean up rotation handler

* order similar functions together

* go mod tidy

* PR feedback

* PR feedback

* update method name

Co-authored-by: Seth Vargo <seth@sethvargo.com>
* chore: add github actions

* updated directory

* fix error string

* error checking on mock server

* try this

* fix lint issues

* update to 1.18

* Pr feedback, fix minor issues

* added mutex to mock server

* added lots more quotes

* Switch to reusable workflow

* fix issues highlighted by linter

Co-authored-by: Seth Vargo <seth@sethvargo.com>
* 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>

* added ECDSA key sanity check

* update some other strings to remove escaped quotes

* change to use configured value

Co-authored-by: Seth Vargo <seth@sethvargo.com>
Co-authored-by: cshou <cshou@google.com>
* 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>
…ating for kms signer (#37)

* 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

* adding necessary changes to have create token api working

* add doc

* add validations and tests for config

* update main class

* PR feedback

* updated to add context before signing

* embedded signer

* minor style update

* update default

* fix lint issues

Co-authored-by: Seth Vargo <seth@sethvargo.com>
Co-authored-by: cshou <cshou@google.com>
* feat: added terraform implementation for server

* PR feedback from seth

* PR feedback

* make service account name stable

* add another module above jvs-service module

* combine google_project_service blocks, other PR feedback

* remove lifecycle policy on kms key

* broke out environemnts so that the ci project can be created once

* move out service name, run tf fmt

* move key to be per ci run

* PR feedback

* sort services
@sqin2019 sqin2019 force-pushed the sqin2019/issue158 branch from 68398d4 to 9bda14e Compare April 5, 2023 05:14
scripts/local_test.sh Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/integration.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
.goreleaser.docker.yaml Outdated Show resolved Hide resolved
.goreleaser.docker.yaml Outdated Show resolved Hide resolved
scripts/build.sh Outdated Show resolved Hide resolved
@sqin2019 sqin2019 force-pushed the sqin2019/issue158 branch 2 times, most recently from 09657d9 to 06804e9 Compare April 6, 2023 01:15
@sqin2019 sqin2019 force-pushed the sqin2019/issue158 branch from 06804e9 to 38f82e7 Compare April 6, 2023 01:28
@sqin2019 sqin2019 force-pushed the sqin2019/issue158 branch from 4f6ab65 to 8a42544 Compare April 6, 2023 02:44
@sqin2019 sqin2019 force-pushed the sqin2019/issue158 branch from 8a42544 to 7c62914 Compare April 6, 2023 02:52
Copy link
Contributor

@yolocs yolocs left a comment

Choose a reason for hiding this comment

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

nits

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.goreleaser.docker.yaml Outdated Show resolved Hide resolved
@sqin2019 sqin2019 force-pushed the sqin2019/issue158 branch from c6b356d to e47621d Compare April 6, 2023 06:41
@sqin2019 sqin2019 closed this Apr 6, 2023
@sqin2019 sqin2019 force-pushed the sqin2019/issue158 branch from 968f961 to 8f77b8a Compare April 6, 2023 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

10 participants