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

BIP Need Not Decode Base64 Postfixed Attributes When Attributes are assigned from Vault #2248

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

nelsestu
Copy link
Contributor

As our secret setting github action runner reads from vault, secret attributes that end with _BASE64, experience a transformation that is easily missed. The set-k8s-secrets.sh script will automatically decode them, passing the decoded values as attributes no longer containing the BASE64 postfix

What was the problem?

The problem is that the keystore and truststore as configured in Vault is inconsistent with truststore and keystore attributes. In some cases we store BIP_KEYSTORE_BASE64, and that attribute gets transformed in the set-k8s-secret.sh script. In this case, the attribute will get decoded in the bash script and the container will receive a BIP_KEYSTORE attribute containing the. decoded value.

Associated tickets or Slack threads:

How does this fix it?1

The code catches failed base64 decoding, and attempts to the raw value.

How to test this PR

  • Deploy to LHDI dev and confirm that crashloopbackoff is resolved.

Footnotes

  1. Pull-Requests guidelines. If PR is significant, update Current Software State wiki page.

…ttributes that end with _BASE64, experience a transformation that is easily missed. The [set-k8s-secrets.sh script](https://github.com/department-of-veterans-affairs/abd-vro/blob/1af4443d64a3d8231258d4e814c4931d9aa7fc59/.github/runner/set-k8s-secrets.sh) will automatically decode them, passing the decoded values as attributes no longer containing the BASE64 postfix
@nelsestu nelsestu requested a review from a team as a code owner November 22, 2023 08:46
Copy link
Contributor

github-actions bot commented Nov 22, 2023

Test Results

138 tests  ±0   138 ✔️ ±0   46s ⏱️ -1s
  38 suites ±0       0 💤 ±0 
  38 files   ±0       0 ±0 

Results for commit b832bf2. ± Comparison against base commit 1af4443.

♻️ This comment has been updated with latest results.

Copy link
Contributor

JaCoCo Test Coverage

There is no coverage information present for the Files changed

Total Project Coverage 76.47%

@chengjie8 chengjie8 self-requested a review November 28, 2023 17:41
@nelsestu nelsestu merged commit 796874a into develop Dec 13, 2023
1 check passed
@nelsestu nelsestu deleted the bip-secret-fix branch December 13, 2023 16:41
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