Before you start
Copy examples into Workbench and run the statements in order in the same session. Stop if a statement fails and inspect its output. The examples use unused names beginning withlearn_. Replace example values for your environment.
Local values need the encrypted secret store and its persistent encryption key. External references need a provider alias already configured by the operator. SQL creates a local name or reference. It does not configure the provider, create remote secrets, or grant cloud permissions.
Choose a secret type
An ARN is an AWS resource identifier. SSM is AWS Systems Manager. KV v2 is Vault’s versioned key-value store.
Encrypted local values
Use a local value when Laminar should keep the secret itself. This example uses demonstration text, not a working service token.learn_token with revision and version metadata. SHOW and DESCRIBE do not return its plaintext. Copy the name into a credential’s secret-reference field.
Text values can also hold JSON documents, including saved AWS key bundles. The secret store treats the value as opaque data. The consuming credential validates the document format.
CREATE SECRET IF NOT EXISTS keeps an existing value. It does not replace or rotate it.
External reference format
A reference has the formprovider_alias://secret_name?version=value. The alias names a provider configured in this Laminar instance. The examples below use illustrative aliases such as learn_sm and learn_ssm; replace them with actual aliases.
The provider alias and local secret name are different. For example, learn_catalog_token can be a stable local name whose source is learn_sm://retail/catalog-token.
Only version is supported as a reference query parameter. Do not add a JSON-field selector. An unpinned reference follows the provider’s current or latest selection when resolved.
AWS Secrets Manager
Before running: configure anaws-secrets-manager provider alias and permission to read an existing secret. Set its optional Region or profile and supply an AWS SDK identity to the secret-service process.
AWS Parameter Store
Before running: configure anaws-ssm alias, its region or profile when required, and an AWS runtime identity that can read the parameter. SecureString parameters also need the required KMS decryption access. This provider uses the AWS SDK.
/retail/catalog-token. Replace version 3 with an existing positive integer version. Parameter labels are not version numbers.
Google Secret Manager
Before running: configure agcp-secret-manager alias with a project and Application Default Credentials that can access the existing secret’s versions.
Azure Key Vault
Before running: configure anazure-key-vault alias with vault_url, its SDK authentication method, and permission to read the existing secret.
HashiCorp Vault
Before running: configure avault alias with a KV v2 mount, an API address, and an authorized token in the configured token_env variable. The configured mount is separate from the path in this SQL.
aws_access_key_id and aws_secret_access_key. A bearer credential needs raw token text, so a Vault object such as {"token":"..."} is not a matching input. This integration does not select one field from that object. Use an existing positive integer version; deleted, destroyed, or expired data cannot supply a usable value.
Environment variables
Before running: configure anenvironment alias with a mapping such as secret name catalog_token to variable CATALOG_TOKEN. Set that variable on the host that resolves secrets.
catalog_token is the configured mapping key. This is not an arbitrary environment-variable lookup, and it does not read your browser or laptop environment. Do not add ?version=. Changing an environment variable elsewhere does not change the already running process’s environment.
Files
Before running: configure afile alias with a mapping such as catalog_token to /run/secrets/catalog-token. The path must be absolute, readable by the secrets host, and within the configured size limit.
Use a secret in a credential
For a real bearer token, create one of the references above or replace the demonstration local value. Then create a credential that refers to the local name:Change one thing
Rotate the demonstration local secret and inspect its metadata again:learn_token keeps the same reference name.
To move a local name to an external provider, use an existing provider and remote secret:
?version= returns it to the provider’s current selection.
Local metadata exposes a current version identifier. A reference such as local://learn_token?version=<current-version> can require that exact version. After rotation, an older local version is rejected; this is not historical secret storage.
Check the result
For each example you chose, check the local name, source, and version with DESCRIBE. Use a compatible credential and a real consumer to prove remote resolution and access. SHOW and DESCRIBE alone inspect metadata, not acquired values or permissions.Clean up
Remove consumers first, then lesson-only credentials, then their secrets. For the local example:DROP SECRET IF EXISTS with the names of any other examples you created above. Dropping an external alias removes only the local registration. It does not delete the remote secret, environment variable, or file. Keep shared aliases and provider configuration in place.