Skip to content

Mask sensitive data #265

Sep 6, 2022 · 1 comments · 9 replies
Discussion options

You must be logged in to vote

Hi @fkunzmann 👋

I've answered the same on StackOverflow, but posting here as well for posterity.

From the OPA docs on the topic, you'll see that the original input attribute may be referenced under input.input (i.e. not just input, as that's the input attribute for the masking policy itself).

package system.log

mask["/input/password"] {
  # OPA provides the entire decision log event as input to the masking policy.
  # Refer to the original input document under input.input.
  input.input.resource == "user"
}

Changing input.attributes.request.http.body to input.input.attributes.request.http.body should do it.

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@anderseknert
Comment options

@fkunzmann
Comment options

@anderseknert
Comment options

@fkunzmann
Comment options

@anderseknert
Comment options

Answer selected by fkunzmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants