简体   繁体   English

您在哪里/如何在Spring Boot应用程序中存储应用程序密钥(密码,API KEY)

[英]Where/how do you store application secrets(password, API KEY) in Spring Boot application

I want to encrypt sensitive data in application properties. 我想加密应用程序属性中的敏感数据。 I will use AES algorithm to encrypt/decrypt data. 我将使用AES算法来加密/解密数据。 The key to decrypt will be stored in ENV variables, accessing this key requires the same privileges as modifying production application. 解密密钥将存储在ENV变量中,访问此密钥需要与修改生产应用程序相同的特权。

What do you think about this approach? 您如何看待这种方法?

How do you protect sensitive data? 您如何保护敏感数据?

There are many ways: 有很多方法:

  1. Spring Cloud Config Spring Cloud Config
  2. Spring Cloud Config Vault Spring Cloud Config Vault
  3. Not store them at all and provide them via environment variables/files/whatever at run time 根本不存储它们,并在运行时通过环境变量/文件/任何内容提供它们
  4. I'm sure there are other ways 我敢肯定还有其他方法

This is really too broad of a topic for Stackoverflow and is not really specific to Spring Boot or anything in particular. 对于Stackoverflow来说,这确实是一个太宽泛的话题,并且并不是特定于Spring Boot或任何特定事物。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Spring Boot应用程序中模拟外部依赖关系? - How do you mock external dependencies in spring boot application? 如何将密码传递给 java (Spring boot) 应用程序 - how to pass password to a java (Spring boot) application 在 Spring 引导中存储 AWS Secrets Manager 的 accessKey 和 secretKey 的位置 - Where to store the accessKey and secretKey for AWS Secrets Manager in Spring Boot 在哪里存储 Spring Boot 应用程序-{profile}.properties? - Where to store Spring Boot application-{profile}.properties? 如何在 Spring 启动应用程序中使用 DistanceMatrix Api - How To use DistanceMatrix Api in Spring boot Application Spring Boot - 在代码中设置的密钥存储密码 - Spring Boot - Key Store Password set in Code 在 HashiCorp Vault 中安全地存储 Spring Boot 应用程序的秘密? - Securely storing secrets of a Spring Boot application in HashiCorp Vault? 在用于spring boot之前,我如何首先在application.properties中解密密码 - How do I KMS decrypt the password in the application.properties first before being used in spring boot 如何对 Spring Boot 应用程序进行集成测试? - How to do an integration test for a Spring Boot application? 如何通过 docker-compose 将 gitlab-ci 机密传递给 spring-boot 应用程序? - How to pass gitlab-ci secrets via docker-compose to spring-boot application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM