From cbb05f91c4d46ea969738f2c49265414bb64cd43 Mon Sep 17 00:00:00 2001 From: jcrichlake <145698165+jcrichlake@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:05:28 -0400 Subject: [PATCH] Adr for public and private keys (#583) * Pushing draft adr for public and private keys * Updating key names * Updating ADR file --- .pre-commit-config.yaml | 2 +- adr/014-keys.md | 33 +++++++++++++++++++ ...ation-report-stream-private-key-local.pem} | 0 ...zation-report-stream-public-key-local.pem} | 0 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 adr/014-keys.md rename mock_credentials/{organization-report-stream-private-key.pem => organization-report-stream-private-key-local.pem} (100%) rename mock_credentials/{organization-report-stream-public-key.pem => organization-report-stream-public-key-local.pem} (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d98201ed..0d04138fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: check-symlinks - id: check-yaml - id: detect-private-key - exclude: (mock_credentials|.+\/JjwtEngine.java|.+\/resources\/(organization-report-stream-public-key.pem|trusted-intermediary-private-key-local.pem)) + exclude: (mock_credentials|.+\/JjwtEngine.java|.+\/resources\/(organization-report-stream-public-key-local.pem|trusted-intermediary-private-key-local.pem)) - id: end-of-file-fixer - id: no-commit-to-branch - id: trailing-whitespace diff --git a/adr/014-keys.md b/adr/014-keys.md new file mode 100644 index 000000000..303b4523a --- /dev/null +++ b/adr/014-keys.md @@ -0,0 +1,33 @@ +# 14. Keys + +Date: 2023-10-23 + +## Decision + +### Internal Keys + +These keys are used for the intermediary's internal use. These keys will follow the following naming paradigm... + +`trusted-intermediary--key-`. + +For example, `trusted-intermediary-private-key-staging` or `trusted-intermediary-public-key-prod`. + +### Organization Keys + +These are keys for external orgs to authenticate with us. Currently, report stream is the only organization we have. The pattern for the name of these keys is + +`organization---key-`. + +For example, `organization-report-stream-public-key-staging` + +## Status + +Accepted. + +## Context + +This naming convention applies to all locations where our keys are stored. Previously, we didn't have a consistent naming convention across all our locations which caused confusion on which key was to be used in which context and environment. + +### Related Issues + +- #584 diff --git a/mock_credentials/organization-report-stream-private-key.pem b/mock_credentials/organization-report-stream-private-key-local.pem similarity index 100% rename from mock_credentials/organization-report-stream-private-key.pem rename to mock_credentials/organization-report-stream-private-key-local.pem diff --git a/mock_credentials/organization-report-stream-public-key.pem b/mock_credentials/organization-report-stream-public-key-local.pem similarity index 100% rename from mock_credentials/organization-report-stream-public-key.pem rename to mock_credentials/organization-report-stream-public-key-local.pem