Skip to main content
Version: 8.3

system.secrets.readConfiguredSecretValue

New in 8.3.8


This function is used in Python Scripting.

Description​

Reads the value of a secret configured by its SecretConfig.

Syntax​

system.secrets.readConfiguredSecretValue(secretConfig)

Parameters​

TypeParameterDescription
PyObjectsecretConfigThe JSON object containing the SecretConfig.

Returns​

PyPlaintext - A PyPlaintext instance containing the specified secret.

Raises​

ValueError - Throws a ValueError if there is no JSON.

SecretException - Throws a SecretException if there is a problem reading the secret.

JsonParseException - Throws a JsonParseException if there is a problem parsing the SecretConfig from the given argument.

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Code Snippet
# This example will create an embedded secret that an operator can use and prints it to 
# a label component on the same view.
# Create the embedded secret
cipher = system.secrets.encrypt('password')
embeddedSecret = system.secrets.createEmbeddedSecretConfig(cipher)

# Print it to a label component
self.getSibling("Label").props.text = system.secrets.readConfiguredSecretValue(embeddedSecret).getSecretAsString()