https://dagster.io/ logo
#ask-community
Title
# ask-community
d

Dominick Giordano

04/13/2022, 2:41 PM
Hi everyone, If I am passing sensitive information to my dagster container as environment variables, how do I pass them as secrets? I would prefer if they did not show in the UI with their values in the launchpad. Thanks!
z

Zach

04/13/2022, 4:46 PM
you might want a StringSource config type - having trouble finding an example in the docs but you should be able to do something like
Copy code
from dagster import StringSource
@op(
config_schema={'env_secret': Field(StringSource)}
)
then you can set the environment variable in the launchpad, and it'll automatically be replaced with the environment variable value at runtime.
1
d

Dominick Giordano

04/14/2022, 6:25 PM
Thanks for the help! I will try it out @Zach
y

yuhan

06/20/2022, 10:43 PM
@Dagster Bot discussion Pass sensitive information as environment variables
d

Dagster Bot

06/20/2022, 10:43 PM
Question in the thread has been surfaced to GitHub Discussions for future discoverability: https://github.com/dagster-io/dagster/discussions/8507