-
Notifications
You must be signed in to change notification settings - Fork 80
Description
What are you really trying to do?
Similar to how the web UI uses the authorization and authorization-extras headers, I'd like to be able to pass these via the temporal CLI.
I'd like to add these headers (grpc-meta) in the temporal env config file to simplify CLI invocation, e.g.
temporal operator namespace list \
--grpc-meta "authorization=${AUTHORIZATION}" \
--grpc-meta "authorization-extras=${AUTHORIZATION_EXTRAS}" \
--address temporal.example.com \
--tls
and the command succeeds as expected when valid auth headers are supplied.
Describe the bug
The temporal env command clobbers existing values when setting grpc-meta and it's not clear how to manually edit the YAML file to set them either.
Minimal Reproduction
temporal env set --env=example --key=grpc-meta --value="authorization=${AUTHORIZATION} authorization-extras=${AUTHORIZATION_EXTRAS}"
env:
example:
grpc-meta: authorization=Bearer xxx.yyy.zzz authorization-extras=REDACTEDHowever this doesn't work, the ClientOptions.GrpcMeta according to my debugger has a value like:
map[authorization:Bearer xxx.yyy.zzz authorization-extras=REDACTED]
i.e. a map[string]string but the key is authorization and the value is all the other grpc-meta values I'm trying to populate from the config.
Environment/Versions
- OS and processor: M1 Mac
- Temporal Version: 1.3.0
- Are you using Docker or Kubernetes or building Temporal from source? Temporal CLI install from homebrew