Setting Headers in the process instance object

How can we set headers at process instance creation from Zeebe client which can be accessed at task level.

Hi @Saurab and welcome to the forums :wave:

The task headers can only be defined statically in the process model, they cannot be defined dynamically using process variables or so.

If you need data to arrive in your worker that differs per process instance, please create the process instance with process variables.

Hope this helps :bowing_man:

1 Like

We want to float some auth tokens which we want to hide from the operate view as the process variables are visible in the view. Our use case requires to add those tokens at level of process instance creation and can be accessed throughout the entire lifecycle of the process instance.

Secret variables aren’t available in Camunda Platform 8 yet.

A solution is to store the secrets in a separate secrets store (e.g. Vault) and then pass the secret’s identifier to the process instance. This way your worker can use the identifier to retrieve the secret from your secrets store. This also makes sure you have a single source for your secrets.

Hope it helps.

1 Like

No problem ,thanks for the info.Looking forward to have the secret
variables functionality in future releases.

1 Like