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

Simplify crypto config structure #3404

Merged
merged 3 commits into from
May 22, 2024
Merged

Simplify crypto config structure #3404

merged 3 commits into from
May 22, 2024

Conversation

dmjb
Copy link
Member

@dmjb dmjb commented May 22, 2024

Relates to #3315

My first attempt at a config structure was a bad fit for the envionment variable substitution which we used when deploying minder in k8s. Simplify the crypto config in the following ways:

  1. Only one fallback key/algo can be specified instead of a list. This
    is based under the assumption that we only need a single fallback
    before migrating to a new key.
  2. The keystore config has been changed from a map[string]any to a
    concrete type. If we need more types of config in future, we can add
    additional concrete types and when filling in the config, only one
    type needs to be filled in.

Changes tested locally.

Summary

Provide a brief overview of the changes and the issue being addressed.
Explain the rationale and any background necessary for understanding the changes.
List dependencies required by this change, if any.

Fixes #(related issue)

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@dmjb dmjb requested a review from a team as a code owner May 22, 2024 11:36
@dmjb dmjb force-pushed the fix-crypto-env-var-names branch 3 times, most recently from 3048e59 to feb1eea Compare May 22, 2024 11:39
Relates to #3315

My first attempt at a config structure was a bad fit for the envionment
variable substitution which we used when deploying minder in k8s.
Simplify the crypto config in the following ways:

1) Only one fallback key/algo can be specified instead of a list. This
   is based under the assumption that we only need a single fallback
   before migrating to a new key.
2) The keystore config has been changed from a `map[string]any` to a
   concrete type. If we need more types of config in future, we can add
   additional concrete types and when filling in the config, only one
   type needs to be filled in.
@dmjb dmjb force-pushed the fix-crypto-env-var-names branch from feb1eea to 25fe404 Compare May 22, 2024 11:40
@coveralls
Copy link

coveralls commented May 22, 2024

Coverage Status

coverage: 51.931% (+0.005%) from 51.926%
when pulling 869e20c on fix-crypto-env-var-names
into 04db03c on main.

@@ -152,7 +152,7 @@ spec:
- name: flags
configMap:
name: minder-flags
optional: true # We expect the outside environment to create this ConfigMap
optional: true # We expect the outside environment to create this ConfigMap
Copy link
Member Author

@dmjb dmjb May 22, 2024

Choose a reason for hiding this comment

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

Undo accidental space inserted in my previous PR

@dmjb dmjb merged commit cb61ff9 into main May 22, 2024
21 checks passed
@dmjb dmjb deleted the fix-crypto-env-var-names branch May 22, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants