-
Notifications
You must be signed in to change notification settings - Fork 10
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(core): New cryptoProvider config #939
Conversation
7f915f4
to
630e55a
Compare
@pflynn-virtru Can you review this? Some ideas for improvement to discuss:
|
@dmihalcik-virtru I opened up this issue earlier today. I think @ttschampel ran into similar issues. But it's not clear what eccertid is needed for or what it does. Also what are your thoughts on moving the crypto provider. It has felt kind of odd living under the server block when kas is the only service that leverages it. @biscoe916 @jrschumacher Would we use this same crypto for signing attributes or other resources in the future? |
- define new config structs to support rotation with different keys - this means the algorithm must be present - I'm using some heuristics to maintain backward compatibility of standard crypto configs, but hsm configs must be updated - Adds `kid` in response to kas_public_key sdk part
This allow searching multiple kas keys for ones that decrypt KAO values with no KID
f49d41e
to
3c60ccb
Compare
Reverts changes only required for day2 key rotation tests
@strantalis We can probably move all of the config into the |
🤖 I have created a release *beep* *boop* --- ## [0.2.4](protocol/go/v0.2.3...protocol/go/v0.2.4) (2024-06-18) ### Features * **core:** New cryptoProvider config ([#939](#939)) ([8150623](8150623)) * **policy:** add unsafe service protos and unsafe service proto Go gencode ([#1003](#1003)) ([55cc045](55cc045)) ### Bug Fixes * **core:** policy resource-mappings fix doc drift in proto comments ([#980](#980)) ([09ab763](09ab763)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.2.8](sdk/v0.2.7...sdk/v0.2.8) (2024-06-24) ### Features * Audit GetDecisions ([#976](#976)) ([55bdfeb](55bdfeb)) * **core:** New cryptoProvider config ([#939](#939)) ([8150623](8150623)) ### Bug Fixes * **core:** Update to lib/fixtures 0.2.7 ([#1017](#1017)) ([dbae6ff](dbae6ff)) * **core:** Updates to protos 0.2.4 ([#1014](#1014)) ([43e11a3](43e11a3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.4.7](service/v0.4.6...service/v0.4.7) (2024-06-24) ### Features * add dev_mode flag ([#985](#985)) ([8da2436](8da2436)) * adds new trace log level ([#989](#989)) ([25f699e](25f699e)) * Audit GetDecisions ([#976](#976)) ([55bdfeb](55bdfeb)) * **authz:** Use flattened entity representations in subject mapping evaluation ([#1007](#1007)) ([b80443f](b80443f)) * **core:** add doublestar for public routes ([#998](#998)) ([1c70c16](1c70c16)) * **core:** New cryptoProvider config ([#939](#939)) ([8150623](8150623)) * **policy:** add unsafe service protos and unsafe service proto Go gencode ([#1003](#1003)) ([55cc045](55cc045)) * **policy:** policy unsafe namespace RPCs wired up to database ([#1018](#1018)) ([239d9fa](239d9fa)) * **policy:** service stubs and registration for unsafe service ([#1009](#1009)) ([9145491](9145491)) ### Bug Fixes * config loaded debug statement logs secrets ([#1010](#1010)) ([6f6a603](6f6a603)) * **core:** Autobump service ([#1025](#1025)) ([588827c](588827c)) * **core:** Fixes issue failing to find keys for kid-free kaos ([#982](#982)) ([f27d484](f27d484)) * **core:** policy resource-mappings fix doc drift in proto comments ([#980](#980)) ([09ab763](09ab763)) * **core:** Update to lib/fixtures 0.2.7 ([#1017](#1017)) ([dbae6ff](dbae6ff)) * **core:** Updates to protos 0.2.4 ([#1014](#1014)) ([43e11a3](43e11a3)) * **kas:** remove old logs ([#992](#992)) ([192ff6d](192ff6d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
cryptoProvider
config structs to support rotation with different keyskid
in response to kas_public_keykid
in key access objects produced by SDKkid
value in the header. See ADR: NanoTDF KAS resource locator path and key identifier #900New Config:
some notes:
kid
values should be unique, preferably for the lifetime of the kas host domain namekid
values should short strings (I'd suggest maxing out at 44 characters)private
andcert
indicate the location of private key and a certificate, if availablehsm
keys, these should be label valuesstandard
keys, these should be paths to PEM files relative to the current working directoryeccertid
for a newkeyring
parameter which describes how KAS will interpret the key. So we have two sections:server.cryptoProvider
describes what keys are available, whileservice.kas.keyring
describes how KAS uses those keys.certid
fields to point to the new valuesTo come: