简体   繁体   中英

Securely storing sensitive information in a standalone Java application

I am working on a standalone Java application and I need to securely store sensitive information such as passwords and API keys without using a cloud management system. At present it is hardcoded in the code as mentioned below. How can retrieve it during runtime? What are the best practices for securely storing and managing the key?

public static final String TECH_USER_TOKEN = "SomePassword";

Update

I discovered a cloud solution that allows me to securely store sensitive information. The system provides a URL with a token to access the information in JSON format. The question is, where should the token be placed to access the cloud URL without hardcoding it? This is a requirement for a standalone application.

Used

Jasypt

encryption library and solved the problem. Thanks every one for support!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM