# Allow only certain variables through task

**URL:** <https://forum.camunda.io/t/allow-only-certain-variables-through-task/6203>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [February 16, 2018, 7:59pm UTC](https://forum.camunda.io/t/allow-only-certain-variables-through-task/6203 "2018-02-16T19:59:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tair](https://forum.camunda.io/user_avatar/forum.camunda.io/tair/32/2101_2.png) [@tair](https://forum.camunda.io/u/tair)\
**Post date:** [February 16, 2018, 7:59pm UTC](https://forum.camunda.io/t/allow-only-certain-variables-through-task/6203/1 "2018-02-16T19:59:04Z")

</div>

Is it possible to allow reading/submitting only certain variables through a user task?

I want `GET /task/anId/form-variables` only return a certain set of variables fro security reasons

---

<div class="post-metadata">

**Author:** ![Webcyberrob](https://forum.camunda.io/user_avatar/forum.camunda.io/webcyberrob/32/5990_2.png) [@Webcyberrob](https://forum.camunda.io/u/Webcyberrob)\
**Post date:** [February 17, 2018, 7:37am UTC](https://forum.camunda.io/t/allow-only-certain-variables-through-task/6203/2 "2018-02-17T07:37:16Z")

</div>

Hi,

An approach Ive considered is to use a create listener to create local variables. Hence you can restrict access to the subset required for the task. Then use another (end) listener to integrate any updates into the main process variables.

Next you will need to enable access to the REST API for retrieving local variables and disable access to the API for retrieving process variables. If you have an API gateway or similar, this can readily be achieved…

regards

Rob

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 30, 2024, 11:07am UTC](https://forum.camunda.io/t/allow-only-certain-variables-through-task/6203/3 "2024-01-30T11:07:08Z")

</div>

Closed on January 30, 2024, 11:07am UTC


