Hello again! is there a way to not display flow ru...
# ask-community
p
Hello again! is there a way to not display flow run parameters of type pydantic.SecretStr in the UI?
looks like the model is properly defined. This is on 2.6.4
n
hmm values of type SecretStr should already be masked in the UI what type of field are you showing in the last screencap?
p
the first screenshot shows the type of field
storage_config
from the deployment. the second scheenshot is how the storage_config field is rendered in the UI
Copy code
class CsvSourceWithSecrets(BaseModel):
    url: str
    has_header: Optional[bool] = True
    encoding: Optional[str] = None
    escape_char: Optional[str] = None
    storage_config: Optional[SecretStr] = "{}"
isnt there another way of doing it? the package where I define these schemas does not import prefect
n
wait - maybe I missed something here, are you trying to mask specific sections of the parameters field for a given flow run?
p
yes
but i define the flow schemas in a separate pkg with all my business logic
n
ok then my first suggestion doesn't make sense let me check if we can accomplish this
p
thanks so much!
n
Hi @Paco Ibañez - I haven't forgotten about this! I believe there might be a slight bug hiding here and I'm working with the rest of the team to figure it out if you happen to need masked parameters for only subflows, that should work fine now as shown here - otherwise I'll get back to you in this thread when I know something concrete
p
Ideally I would need secrets masked for both flows and subflows. Thanks a lot for your help!
👍 1
n
in the meantime, would it make sense to just store your secret strings in Secret blocks and just pass the name of the secret block as a
str
parameter to the flow?
🙌 2
p
sounds good. thanks for your help!
👍 1