Hey Folks,
I was looking into hardening our namespaces and am curious how to properly leverage the SecurityToken feature on Namespaces. As described in the namespace registration help, the token is an “optional token for security check”
~ % tctl namespace register -h
NAME:
tctl namespace register - Register workflow namespace
USAGE:
tctl namespace register [command options] [arguments...]
OPTIONS:
--description value, --desc value Namespace description
--owner_email value, --oe value Owner email
--retention value, --rd value Workflow execution retention in days
--active_cluster value, --ac value Active cluster name
--clusters value, --cl value Clusters
--global_namespace value, --gd value Flag to indicate whether namespace is a global namespace
--namespace_data value, --dmd value Namespace data of key value pairs, in format of k1:v1,k2:v2,k3:v3
--security_token value, --st value Optional token for security check
--history_archival_state value, --has value Flag to set history archival state, valid values are "disabled" and "enabled"
--history_uri value, --huri value Optionally specify history archival URI (cannot be changed after first time archival is enabled)
--visibility_archival_state value, --vas value Flag to set visibility archival state, valid values are "disabled" and "enabled"
--visibility_uri value, --vuri value Optionally specify visibility archival URI (cannot be changed after first time archival is enabled)
I had assumed this might act like an API Key or something so that you can only publish to a namespace if you pass it as the matching header or something of that nature. This would be a useful feature for safety more than security, preventing different groups in the org from publishing to the wrong namespace by accident.
However, I only found it in the protobuffs for updating namespaces, and could not find it being set in the SDK for a request. I would have expected it on client/workflow options for example. I also didn’t see where it was validated in the main server codebase.
Is there any documentation about what the SecurityToken on a namespace is and how to leverage it? Is it just to protect updates to the namespace?
Thank you for the support!