安全JDBC连接 [英] Secure JDBC connection

查看:377
本文介绍了安全JDBC连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个纯Java应用程序,应该连接到数据库。我不想存储数据库连接url和用户名/密码在属性文件或硬编码在应用程序中。什么是常见方法来解决这个问题? Java应用程序如何连接到数据库而不显示用户名/密码?

I have a plain Java application which is supposed to connect to the database. I don't want to store database connection url and username/password in a properties file or hardcode it in application. What is a common way to solve this problem? How a Java application can connect to database without revealing username/password?

推荐答案

我是一个.NET开发者,但我遇到了完全相同的情况。

I'm a .NET dev, but I've run into the exact same situation.

去年,我在一家公司工作,必须符合PCI标准才能存储信用卡数据,所以安全性是一个大问题。 URL /登录数据必须存在于某处。我见过的最常见的保护方法是加密。我不知道特别是Java,但.NET在核心框架中有几个加密命名空间。我们使用这些来加密数据库登录。

Last year I was working at a company that had to be PCI compliant to store credit card data, so security was a big deal. The URL/login data has to exist somewhere. The most common method I've seen for securing it is with encryption. I don't know about Java in particular, but .NET has several encryption namespaces in the core Framework. We used these to encrypt the database logins.

您仍然存在潜在的安全漏洞,这是用于加密/解密数据的加密密钥。我们在这里使用PCI补偿控制方法。访问密钥仅限于密钥管理角色。我们还跟踪密钥本身的访问,以便有所有用户发起和系统启动的访问的记录。没有任何用户可以访问这些日志,因此单个用户可能无法覆盖曲目。这些重叠的安全方法本质上创造了一种情况,其中不需要多个管理员之间的协调阴谋来使数据处于危险中。

You still have a potential security vulnerability, which are the encryption keys used to encrypt/decrypt the data. We used the PCI "compensating controls" method here. Access to the keys is restricted to "key management" role. We also tracked access of the key itself so that there was a record of all user-initiated and system-initiated access. No one user had access to these logs, so there could be no covering of tracks by a single user. These overlapping security methods essentially create a situation where nothing less than a coordiated conspiracy between multiple administrators is required to put the data in jeopardy.

这篇关于安全JDBC连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆