Hi,
Backgroud
I am trying to make some specific key/value stored under kv secret engine become invisible.
Question
1.If it possible to make “copy” and “see” component disable in WebUI page? Please refer to the attachment
- How to make abc’s value become visible meanwhile def’s value can not see.
l have create a EGP however it doesn’t work
import "strings"
# A list of valid keys for this path
param valid_keys default ["abc"]
is_valid_key = func() {
# Print some debugging info
print("Namespace path:", namespace.path)
print("Request path:", request.path)
print("Request data:", request.data)
for request.data.data as key {
if !(valid_keys contains key) {
print(key, "not contained within", valid_keys)
# Found an invalid key name - mark update as invalid
return false
}
}
return true
}
precond = rule {
# Only apply the rule when writing a secret
request.operation == "read" or request.operation == "list"
}
main = rule when precond {
# Call function to determine validity of the keys in the request
is_valid_key()
}