HPCC-35978 Handle invalid vault definitions#21149
Conversation
Improved values.schema.json to validate Akeyless vault definitions Added common vaults section copy XSL with validation for component XMLs Added type/kind validation to jsecrets code Signed-Off-By: Kenneth Rowland kenneth.rowland@lexisnexisrisk.com
|
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-35978 Jirabot Action Result: |
asselitx
left a comment
There was a problem hiding this comment.
Maybe two small changes but looks good otherwise.
| <vaults> | ||
| <xsl:copy-of select="/Environment/Software/vaults/@*"/> | ||
| <xsl:for-each select="/Environment/Software/vaults/*"> | ||
| <xsl:variable name="vaultType" select="translate(normalize-space(@type), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/> |
There was a problem hiding this comment.
I don't think vaultType and vaultKind are used here so they could be removed.
There was a problem hiding this comment.
Correct, an artifact from previous incantations. Good find.
| </xsl:if> | ||
| </xsl:template> | ||
|
|
||
| </xsl:stylesheet> No newline at end of file |
There was a problem hiding this comment.
Looks like a missing final newline
🔄 Upmerge Test ResultsStatus: ✅ All branches merged successfully ✅ Successful Branches (1)
|
|
@ghalliday @jakesmith Please merge |
ghalliday
left a comment
There was a problem hiding this comment.
@kenrowland this is failing (probably because of the unused static function.
Please add documentation to the jira to describe what the checks are and why they are there.
Also there should be some tests in testing/helm/errtests to exercise these checks.
Added helm positive and negative values tests for Akeyless
|
Removed the unused static method and added positive and negative tests for helm. Interesting that there were no existing Hashicorp tests. |
🔄 Upmerge Test ResultsStatus: ✅ All branches merged successfully ✅ Successful Branches (1)
|
ghalliday
left a comment
There was a problem hiding this comment.
@kenrowland I am confused - why are there two different enums which are now identical?
| "enum": ["kv-v2", "kv-v1"] | ||
| "enum": ["kv-v2", "kv-v1", "akeyless"] | ||
| }, | ||
| "type": { |
There was a problem hiding this comment.
Why do we have two enumerations that now contain identical values? It is too late, but the names should have been chosen more carefully. Can type be deleted, and just rely on type?
| }, | ||
| "required": ["kind"] | ||
| }, | ||
| "then": { |
There was a problem hiding this comment.
This is going to cause backward compatibility issues with deployments that do not have the value set - when it was previously optional.
Improved values.schema.json to validate Akeyless vault definitions
Added common vaults section copy XSL with validation for component XMLs
Added type/kind validation to jsecrets code
Signed-Off-By: Kenneth Rowland kenneth.rowland@lexisnexisrisk.com
Type of change:
Checklist:
Smoketest:
Testing: