久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何在不暴露密碼的情況下連接到需要密碼的數(shù)

How to connect to a database that requires password without exposing the password?(如何在不暴露密碼的情況下連接到需要密碼的數(shù)據(jù)庫(kù)?)
本文介紹了如何在不暴露密碼的情況下連接到需要密碼的數(shù)據(jù)庫(kù)?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在創(chuàng)建一個(gè)應(yīng)用程序,我需要連接到一個(gè)數(shù)據(jù)庫(kù).數(shù)據(jù)庫(kù)需要登錄名/密碼,因此應(yīng)用程序可以執(zhí)行選擇和插入等操作.

I am creating an application and I need to connect to a database. The database requires login/password so the application can do operations like select and insert.

在應(yīng)用程序中我需要使用登錄名和密碼連接到數(shù)據(jù)庫(kù),因此應(yīng)用程序可以自由地對(duì)數(shù)據(jù)庫(kù)執(zhí)行一些任務(wù).我的問題是:如何在不暴露密碼的情況下存儲(chǔ)和使用密碼連接數(shù)據(jù)庫(kù)?

In the application I need to connect to the database using login and password, so the application is free to do some tasks on the database. My question is: how do I store and use a password to connect to the database without exposing the password?

我不能簡(jiǎn)單地使用哈希或加密來存儲(chǔ)密碼,因?yàn)閿?shù)據(jù)庫(kù)必須識(shí)別密碼(我認(rèn)為大多數(shù)或所有數(shù)據(jù)庫(kù)都必須以純文本形式接收密碼).

I can't simply use a hash or encryption to store the password because the database must recognize the password (I think most or all databases must receive password as plain text).

.

.

注意:連接是由應(yīng)用程序建立的.無需人工輸入即可進(jìn)行連接.

Note: The connection is made by the application. No human input to do the connection.

(編輯)關(guān)于應(yīng)用程序的更多信息:它是一個(gè)使用 servlets/jsp 的 Web 應(yīng)用程序.數(shù)據(jù)庫(kù)位于應(yīng)用程序的同一臺(tái)服務(wù)器上.應(yīng)用程序的用戶是默認(rèn)用戶,沒有完全的管理權(quán)限,但它可以插入/刪除行并執(zhí)行大多數(shù)涉及查詢和表中數(shù)據(jù)修改的事情.

(Edit)More info about the application: it is a web application using servlets/jsp. The database is on the same server of the application. The user for the application is a default user without complete admin powers, but it may insert/delete rows and do most things that involve queries and data modification in tables.

推薦答案

通常的做法是將用戶名/密碼外部化為 property/config 文件,在運(yùn)行時(shí)讀取(無論您是否使用本機(jī) JDBC/JNDI/CDI/J2EE 數(shù)據(jù)源/等).

The usual way this is done is to externalize the username/password to a property/config file which is read at runtime (whether or not you use native JDBC/JNDI/CDI/J2EE datasource/etc).

系統(tǒng)管理員通過操作系統(tǒng)安全保護(hù)文件.

The file is protected via the O/S security by the sysadmins.

操作系統(tǒng)有比應(yīng)用代碼更好的保護(hù)工具.

The O/S has better tools for protection than app code.

這篇關(guān)于如何在不暴露密碼的情況下連接到需要密碼的數(shù)據(jù)庫(kù)?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Java Remove Duplicates from an Array?(Java從數(shù)組中刪除重復(fù)項(xiàng)?)
How to fix Invocation failed Unexpected Response from Server: Unauthorized in Android studio(如何修復(fù)調(diào)用失敗來自服務(wù)器的意外響應(yīng):在 Android 工作室中未經(jīng)授權(quán))
AES encryption, got extra trash characters in decrypted file(AES 加密,解密文件中有多余的垃圾字符)
AES Error: Given final block not properly padded(AES 錯(cuò)誤:給定的最終塊未正確填充)
Detecting incorrect key using AES/GCM in JAVA(在 JAVA 中使用 AES/GCM 檢測(cè)不正確的密鑰)
AES-256-CBC in Java(Java 中的 AES-256-CBC)
主站蜘蛛池模板: 一区二区三区网站 | 国产精品成人一区二区三区夜夜夜 | 久久久久亚洲精品 | 久久99精品国产99久久6男男 | 亚洲成人精品免费 | a级毛片基地 | 欧日韩在线观看 | 欧美综合视频在线 | 亚洲精品久久久一区二区三区 | 亚洲自拍偷拍免费视频 | 色视频在线播放 | 欧美最猛黑人 | 精品一区二区免费视频 | 午夜精品久久久久久久久久久久久 | 国产精品一区二区无线 | 久久久九九九九 | 自拍视频网站 | 91久久久久 | 久久久久久91香蕉国产 | 成人免费视频网站在线看 | 久久午夜视频 | 亚洲精品99| 国产一区999 | 国产精品资源在线 | 久久久国产网站 | 日本不卡一区二区 | 日韩视频在线一区 | 欧美区在线 | 男女羞羞视频免费看 | 国产精品久久久久久模特 | 免费色网址 | 亚洲精品一区二区在线观看 | 中文字幕成人 | 久久久高清| 综合五月婷 | 国产一区二区三区高清 | 午夜性视频 | 亚洲精品在线免费 | 成人在线观看免费视频 | 国产成人精品一区二三区在线观看 | 亚洲人精品 |