摘自:http://www.2cto.com/database/201107/97945.html
oracle Wallet的使用(即内部加密技术TDE(Transparent Data Encryption ))
1. TDE是Oracle10gR2中推出的一个新功能,使用时要保证Oracle版本是在10gR2或者以上
--查看oracle版本:
select * from v$version;
2、创建一个新目录,并指定为Wallet目录
D:\oracle\product\10.2.0\admin\ora10\ora_wallet
3. 设置wallet目录,在参数文件sqlnet.ora中,按照下面的格式加入信息:
ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)
(METHOD_DATA=(DIRECTORY=D:\oracle\product\10.2.0\admin\ora10\ora_wallet)))
4. 创建master key文件,指定wallet密码,使用SYS用户登入系统,建立加密文件
SQL> alter system set encryption key identified by "wallet";
System altered
-- 密码"wallet"不加引号时,后面使用时也不需要用引号
此时在设置的目录下,多出一个Personal Information Exchange类型的文件,相当于我们生成的master key文件。D:\oracle\product\10.2.0\admin\ora10\ora_wallet\ewallet.p12
5、启动、关闭Wallet
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet";
ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet"
ORA-28354: wallet 已经打开
SQL> ALTER SYSTEM SET ENCRYPTION WALLET CLOSE; --关闭
System altered
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet"; --打开
System altered
到此,已经成功配置了Wallet,创建了master key。
下面看如何使用TDE进行数据加密:
加密数据列:
对数据列加密是TDE一个常用的功能。常需要对数据库中某个表的某个敏感数据进行加密处理,方式信息的外泄。
首先,在定义数据表中的数据列(或者修改数据列)的时候,使用ENCRYPT进行标注。表示这个字段是使用加密保护的重要字典。
--建临时表:
create table t_tmp_emplorey
as
select * from emplorey t
--加密数据列,使用了ENCRYPT进行标志,表明需要对这个字段进行加密处理,采用默认的加密配置。
alter table scott.t_tmp_emplorey modify (sal encrypt);
注意:在默认不指定的情况下,Oracle在加密之前,对明文都要进行salt处理。所谓salt处理是一种强化加密数据的方法。通过在加密前明文中掺入一个随机字符串,来强化加密层级,防止进行字典攻击和其他类型的破解操作。如果不需要进行salt处理,就是在ENCRYPT后面加No
Salt。
--例:alter table scott.t_tmp_emplorey modify (sal encrypt no salt);
--指定加密算法
alter table scott.t_tmp_emplorey modify (sal encrypt using '3DES168');
--如果要对一个已经加密处理的数据列,解除加密,使用alter table…和DECRYPT关键字就可以实现。
SQL> alter table scott.t_tmp_emplorey modify (sal DECRYPT) ;
Table altered
--解除加密后,关闭Wallet后,查询数据不受影响。
6. 对查询、索引的影响:
查询结果似乎和一般的没有差别,但是如果关闭了解密Wallet会如何?
SQL> ALTER SYSTEM SET ENCRYPTION WALLET CLOSE;
System altered
--再次查询时报错
select * from scott.t_tmp_emplorey t;
ORA-28365: Wallet 未打开
--能够查找到数目
select count(1) from scott.t_tmp_emplorey t;
--对索引的影响,如果列加密使用了salt,在对该列进行索引的时候,会报错。:
SQL> create index ind_t_tmp_emplorey on t_tmp_emplorey(sal);
create index ind_t_tmp_emplorey on t_tmp_emplorey(sal);
ORA-28338: 无法使用salt 值加密索引列
SQL> create index ind_t_tmp_emplorey on t_tmp_emplorey(EMPNO);
Index created
--没有加密的列可以建立索引
ocp 考核题:
Q401. You opened the walletand then issued the following command:
SQL>CREATE TABLESPACE securespace
DATAFILE '/home/user/oradata/secure01.dbf'
SIZE 150M
ENCRYPTION USING '3DES168'
DEFAULT STORAGE(ENCRYPT);
Then you closed the wallet. Later, you issued the followingcommand to create the EMPLOYEES table in the SECURESPACE tablespace and you usethe NO SALT option for the EMPID column.
What is the outcome?
A. It creates the table and encrypts the data in it.
B. It generates an error because the wallet is closed.
C. It creates the table but does not encrypt the data in it.
D. It generates an error because the NO SALT option cannot beused with the ENCRYPT option.
Answer: B
分享到:
相关推荐
oracle WALLET 与SSL 配置oracle的ssl连接 SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ora10g.unimassystem.com) (ORACLE_HOME = D:\oracle\product\10.2.0\db_1) (SID_NAME = ora10g) ) ...
用Oracle Wallet实现透明加密.pdf
本程序可对ORACLE数据库建立连接,同时可以对数据库的数据进行操作,并且对数据进行加密。本程序属本人原创。
oracle 11g/10g code example. setup oracle wallet install RAC
配置安全连接使用安全套接层连接 Oracle 需要经过多个步骤,包括创建 Wallet、生成认证请求、制作数字证书、导入信认根证书和用户证书、配置使用 SSL 的 TCP/IP 连接服务端等。 ### 2. 使用 Wallet Manager 创建 ...
Oracle wallet encryption 简单介绍,rman口令模式加密
keycloak-oracle-wallet 带有脚本的Keycloack自定义容器,可与Oracle Cloud free数据库一起使用。
Oracle客户端连接远端数据库 Oracle客户端连接远端数据库
使用浏览器下载证书,并创建一个钱包并导入证书(有关如何执行此操作的更多详细信息,请点击此处,): ###创建钱包orapki wallet create -wallet /home/oracle/wallet -pwd WalletPasswd123orapki wallet add -...
// If connecting to OCI (Oracle cloud) need to specify location of Oracle Wallet process . env [ 'TNS_ADMIN' ] = '/Users/vmorneau/oracle/wallets/atp01' ; publisher . publish ( { libDir : "/Users/...
The Oracle Database Advanced Security Administrator's Guide is intended for users and systems professionals involved with the implementation, configuration, and administration of Oracle Advanced ...
使用内存中的钱包连接到Oracle Cloud Autonomous Database的示例服务这是什么? 这是一个小样本服务,演示了如何使用从OCI Vault实时检索的内存中钱包。 该服务所需的所有组件都包含在Oracle免费套餐中: : 这是其中...
主要简述Oracle 10G/11G数据库管理及、数据库调度、wallet 管理等等 欢迎大家下载
The Oracle Database Enterprise User Security Administrator's Guide is intended for security administrators, DBAs, and application developers who perform one or more of the following tasks: ■ Manage ...
witnet-rust是用Rust编写的Witnet Decentralized Oracle Network协议的开源实现。组件witnet-rust实现了... : node和wallet使用的便捷本地存储解决方案。 :用于管理对等会话和连接的模块。 :所有其他组件共有的数
Node.js的一个包含电池的多语言(MSSQL,MySQL,PostgreSQL,SQLite3,Oracle(包括Oracle Wallet身份验证))查询生成器,具有: 和API 支持Node.js 10+版本。 查看以开始使用! 浏览为knex构建的 查看我们的以...
usage: main.py [-h] [--wallet wallet_name] [--node node] [--chain-id chain_id] [--vote-period vote_period] [--password password] [--home home_dir] [--gas-fee gas_fee] [--gas-denom gas_denom] [--...
以太坊浏览器扩展支持Oracle网络 支持语言:Deutsch,English,Français,Nederlands,Tiếng Việt,Türkçe,español,italiano,polski,slovenščina,čeština,русский,ไทย,中文 (简体),中文 (繁體),日本語...
这是如何使用Chainlink API oracle调用的示例。检查文件夹合同中的Solidity Smart Contract:Clock.sol该智能合约已部署在Kovan测试网中,并拥有一些ETH和LINK令牌才能正常工作。它每隔x次调用Chainlink智能合约预告...