tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.56k stars 598 forks source link

Securing TabPy #550

Closed ejohmac closed 2 years ago

ejohmac commented 2 years ago

Hi I have deployed a custom function in TabPy and can call this function from my calculated field in Tableau. I am calling my deployed function in Tableau using tabpy.query('MyFunction',_arg1)['response'] This all works great.

My TabPy setup has authentication turned on but i also want to turn off the /evaluate endpoint. I only want deployed functions to be available from my TabPy server. When I set TABPY_EVALUATE_ENABLE = false my Tableau dashboard fails to call my deployed function and I can see 404 being returned from TabPy in the logs. The docs also state:

evaluate allows calling a deployed endpoint from within the Python code block. The convention for this is to use a provided function call tabpy.query in the code, which behaves like the query method in tabpy-tools.

So it looks like the /evaluate is needed for a deployed function called using tabpy.query?

How can i disable the /evaluate endpoint and be able to call my deployed function on the TabPy server from a calculated field?

Many thanks

ejohmac commented 2 years ago

hi Any update on my question above? I don't seem to be able to add the question label to it?

nmannheimer commented 2 years ago

Hi @ejohmac, the feature to support this in Tableau, a new calculation type for calling models directly called MODEL_EXTENSION_X is scheduled to ship in the Tableau 22.1 release. Until this time, /evaluate is required to call models from Tableau. Thanks for your patience.

nmannheimer commented 2 years ago

Just an update, this feature has shipped with the Tableau 22.1 release, closing the issue.