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

Feature/secret override #154

Closed
wants to merge 11 commits into from
Closed

Conversation

cberg-aot
Copy link
Contributor

@cberg-aot cberg-aot commented Apr 11, 2023

Description

Refactored Secret objects to use stringData instead of Data as field. This prevents base64 error when trying to pull data into the secret that may not be base64 (such as usernames).

Types of changes

Refactor w/ encryption side effects (should make Secrets work as intended).

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Tested with manual helm install, and NOT piping secrets to | base64.

This wasn't a tested workflow during the original PR (was feeding test data to base64, overlooking the usual flow of just placing stringData into the secret)

Copy link
Member

@jujaga jujaga left a comment

Choose a reason for hiding this comment

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

StringData is not a good design pattern. I do see the current misalignment concern with the overrides not being base64 encoded, but this should be done via a proper string operation and pipe instead of depending on StringData. As it is implemented right now, this would work for the override, but this would double encrypt the default generated password values instead, leading to unintended results.
I'll be taking a look at this and doing parallel adjustments to the helm chart to compensate for the issue.

jujaga added a commit that referenced this pull request Apr 12, 2023
Renames variables in secrets template to be more consistent with purpose

Signed-off-by: Jeremy Ho <[email protected]>
@jujaga
Copy link
Member

jujaga commented Apr 13, 2023

Superceded by #158

@jujaga jujaga closed this Apr 13, 2023
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.

3 participants