<@ULVA73B9P>: Is there an out-of-the-box block typ...
# marvin-ai
c
@Marvin: Is there an out-of-the-box block type which is most suited to storing private key certificates?
m
thought for 99.9 seconds
Yes — the out-of-the-box block most suited for that is the
Secret
block. Example:
Copy code
python
from prefect.blocks.system import Secret

Secret(value=private_key_pem).save("my-private-key")
key = Secret.load("my-private-key").get()
A few notes: -
Secret
is the general-purpose built-in block for sensitive values - it works fine for multi-line PEM/private key/certificate text - values are treated as secret in Prefect and not shown plainly in the UI/logs - if your cert/key is binary, you’d typically base64-encode it first before storing in
Secret
If you’re already using a cloud secret manager, these can also be a better fit: - AWS Secrets Manager via
AwsSecret
in
prefect-aws
- GCP Secret Manager via
GcpSecret
in
prefect-gcp
So the short answer is: - Use
prefect.blocks.system.Secret
for most private key certificate storage needs - use AWS/GCP secret blocks instead if you want external secret management, versioning, or centralized rotation Relevant docs: - Blocks overview - `Secret` block reference If you want, I can also show the best pattern for loading a PEM cert/key from a
Secret
block into a flow or worker process.