我使用部署到关键云代工厂的 Spring Cloud 数据流,将 Spring Batch 作业作为 Spring Cloud 任务运行,并且这些作业需要 aws 凭据才能访问 s3 存储桶。
我尝试将 aws 凭据作为任务属性传递,但凭据在任务的日志文件中显示为参数或属性。(https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#spring-cloud-dataflow-global-properties)
现在,我在每次部署后手动将凭据设置为 pcf 中的 env 变量,但我正在尝试自动执行此操作。在实际启动任务之前不会部署任务,因此在部署时我必须启动任务,然后等待它由于缺少凭据而失败,然后使用cf
cli 设置环境变量凭据。我如何提供这些凭据,而不显示在 pcf 应用程序的日志中?
我也探索过使用 vault 和 spring cloud config,但同样,我需要将凭据传递给任务以访问 spring cloud config。
谢谢!