Hiding injected parameters when using Python + Jupyter #11988
Replies: 2 comments 4 replies
-
I'll take a look. Meanwhile, I wouldn't use parameters for sensitive data but environment variables, possibly defined in |
Beta Was this translation helpful? Give feedback.
-
We'll fix the regression, though I want to add some additional information about your usecase
We have a feature in Quarto to provide secrets through environment variables: https://quarto.org/docs/projects/environment.html#managing-secrets Environment variables are accessible using computation code cells. This could be an alternative to using parameters. |
Beta Was this translation helpful? Give feedback.
-
Description
Consider the following Quarto document which depends on the use of a username and password. We don't want to hardcode our authentication details into the notebook for security reasons, so we have added them as parameters. We have also added
echo: false
to the parameters block with the intention of hiding the username and password.However, when we render this notebook, it appears as follows:
The parameter definition block has been successfully hidden, but the parameter values have not. Unfortunately there is no obvious way to hide it, despite it being security critical to do so.
One workaround I've discovered is to make the default computation block hidden, by adding this to the YAML header:
This works, but has the downside that we now have to
echo: true
every subsequent block that we want to show, which is most of them.I wonder if there is a better way to stop my parameters showing up?
This question/issue/feature request relates to #723 (comment), the status of which is not clear.
Beta Was this translation helpful? Give feedback.
All reactions