fix(matchexpr): include jvmId in js binding #1393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Related to #1377
Related to #1389
Description of the change:
This copies the
jvmId
field from theServiceRef
object representing a target application into the object binding passed into the JS engine when evaluating a match expression.Motivation for the change:
Without this, the
jvmId
property tested in thematchExpression
will always be an undefined value, leading to expressions that do not properly test and evaluate against the intended targets. In #1377 Cryostat is still able to use the credentials to authenticate to -agents because the lookup is direct by stored credential ID rather than evaluating the associated expression, but this bug does actually manifest in the web-client since it is visible on the/security
view that the agents' stored credentials display as matching against 0 targets.How to manually test:
/security