样品 https://github.com/microsoft/azure-spring-boot 安全吗?



自述文件介绍如何将服务主体的 ID 和机密放在属性中。这是否与使用密钥保管库存储机密不相悖?还是我读错了?

是的,在示例中,它公开了application.properties中的client idclient secret

如果要在 azure 中的生产环境中使用该示例,最佳做法是使用 MSI(托管标识(,则无需在application.properties中公开 id 和机密,只需启用 MSI 并将其添加到密钥保管库访问策略中,它支持 Azure Spring Cloud, 应用服务、VM。

参考资料 - https://github.com/microsoft/azure-spring-boot/blob/master/azure-spring-boot-starters/azure-keyvault-secrets-spring-boot-starter/README.md#use-msi--managed-identities

但真正的问题是,如果你不想使用MSI,给出key,tenant和enable = false不起作用,该怎么办。如上文参考。

最新更新