oracle data masking and subsettingのご紹介

17
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Copyright © 2016 Oracle and/or its affiliates. All rights reserved. | Oracle Data Masking and Subsetting のののの のののののののののの

Post on 16-Apr-2017

348 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Oracle Data Masking and Subsettingのご紹介

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking and Subsettingのご紹介

日本オラクル株式会社

Page 2: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. | 2

以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するものです。また、情報提供を唯一の目的とするものであり、いかなる契約にも組み込むことはできません。以下の事項は、マテリアルやコード、機能を提供することをコミットメント(確約)するものではないため、購買決定を行う際の判断材料になさらないで下さい。オラクル製品に関して記載されている機能の開発、リリースおよび時期については、弊社の裁量により決定されます。Oracleは、米国オラクル・コーポレーション及びその子会社、関連会社の米国及びその他の国における登録商標または商標です。他社名又は製品名は、それぞれ各社の商標である場合があります。

Page 3: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking and Subsetting• 機密性の高い情報を様々な形式でマスキング

– 個人情報、医療情報、患者情報、クレジットカード番号・・

• データベースの特性を考慮したアーキテクチャ– 表の制約や表と表の関係性を認識した一貫性のあるマスキング– 列データの要素数、分布、件数など、本番データの特性を維持したマスキング環境の作成

• データのサブセット&マスキング– 本番環境の 10 分の 1 のデータを抽出~マスキング~ダンプファイル生成までを自動化

3

NAME SALARYAGUILAR *****

CHANDRA *****

010010110010101001001001001001001001010010110010101001001001001001001001010010110010101001001001001001001001

データ抽出 マスキング

NAME SALARYAGUILAR 50135.56BENSON 35789.89

CHANDRA 60765.23DONNER 103456.82

本番環境 開発・検証環境

Page 4: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

様々なマスキング形式を提供

4

• 固定数値• 固定文字列• ランダム桁数• ランダム数値• ランダム文字列• 配列リスト • シャッフル• 置換• SQL 式• NULL 値• 切り捨て• 部分文字列• 表の列の値• ユーザ定義関数• 正規表現• 暗号化

ID NAME1 SMITH

2 ALLEN

3 JONES

4 CLARK

5 ADAMS

: :

ID NAME1 akeskaf

2 oweiks

3 daikels

4 ilekdik

5 oetdjgqk

: :

ランダム文字ID CARDNUMBER1 7488-2984-1736-7400

2 4033-6177-0089-6401

3 6141-5126-0475-8802

4 1139-4145-6222-3703

5 8337-6263-1608-0104

: :

ID CARDNUMBER1 5870-2967-9149-5700

2 9634-7334-4874-2301

3 8430-8214-6445-1102

4 1573-9537-1503-5503

5 0606-3321-6271-8304

: :

ランダム数値+固定文字列ID COUNTRY1 US

2 JP

3 US

4 UK

5 FR

: :

ID COUNTRY1 US

2 FR

3 UK

4 FR

5 JP

: :

シャッフル

Page 5: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

マスキングを簡単に定義、実行

5

Enterprise Manager でマスキング定義を作成

それぞれの列にマスキングフォーマットを定義

Page 6: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking の特徴①

6

主キー / 一意 / 参照整合性制約を自動検知

ID NAME CID1 SMITH 1

2 ALLEN 4

3 JONES 1

4 CLARK 2

5 ADAMS 3

: : :

CID COUNTRY_NAME1 UNITED_KINGDOM

2 UNITED_STATES

3 AUSTRALIA

4 IRELAND

5 CANADA

: :

ID NAME CID1 Aaafeh 83

2 Aafhed 65

3 Aaaafhe 83

4 Bodofa 39

5 aaahfied 9

: : :

CID COUNTRY_NAME

83 UNITED_KINGDOM

39 UNITED_STATES

9 AUSTRALIA

65 IRELAND

7 CANADA

: :

参照整合性を維持したマスキング ( ランダム文字列+ランダム数値 )

外部キー制約を自動的に検知し、整合性を維持

Page 7: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking の特徴①

7

DEPT 表の DEPTNO 列が参照する列 (EMP 表の DEPTNO 列 ) が自動的に追加される

Page 8: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking の特徴②

8

論理的に関連のある列へのマスキング

ID COMPANY SALES_REP1 ABC Material SMITH

2 ZZZ Manifacture CLARK

3 B&C Inc JONES

4 OPQ World CLARK

5 YYY Corp ADAMS

: :

NAME COUNTRYCLARK UNITED_KINGDOM

JONES UNITED_STATES

SMITH AUSTRALIA

KEITH IRELAND

ADAMS CANADA

: :

ID COMPANY SALES_REP1 ABC Material cccchfk

2 ZZZ Manifacture aaaafdk

3 B&C Inc bbbeoh

4 OPQ World aaaafdk

5 YYY Corp 99999k

: :

NAME COUNTRYaaaafdk UNITED_KINGDOM

bbbeoh UNITED_STATES

cccchfk AUSTRALIA

1234akf IRELAND

99999k CANADA

: :

外部キー制約はないが、アプリで関連付けて使用

手動で列を指定することにより、関連付けてマスク

依存性を維持したマスキング( ランダム文字列 )

Page 9: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking の特徴②

9

明示的に依存関係を定義

Customer 表の lastname 列Bonus 表の ename 列の関係性がありと定義

Page 10: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking の特徴②

10

定義した依存列が自動的に呼び出される

Page 11: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking の特徴③

11

カーディナリティの維持

EMPNO ENAME3982 ALLEN3991 ALLEN4391 ALLEN4419 BOSH4501 BOSH4781 CATHY

4958 CATHY5104 CATHY5392 CATHY

5594 DAVID5920 DAVID

EMPNO ENAME3982 ajehndl3991 ajehndl4391 ajehndl4419 apemmm4501 apemmm4781 pfhes

4958 pfhes5104 pfhes5392 pfhes

5594 fmfaow5920 fmfaow

EMPNO ENAME3982 JANET3991 JANET4391 JANET4419 KATE4501 KATE4781 HOUGH

4958 HOUGH5104 HOUGH5392 HOUGH

5594 IGOR5920 IGOR

配列リストを使ったマスキング(GRUK, HOUGH, IGOR, JANET,

KATE,LEHMANN)ランダム文字列を使った

マスキング

カーディナリティ ( 濃度 )を維持したままマスキング

Page 12: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

開発者

アクセス

マスキングの方式

• 表を直接マスキングしてデータを更新する• ( パターン 1) 検証 DB またはマスキング用 DB へ表をコピーしてマスキングを

実行– クローニングまたは表のエクスポート / インポート– マスキングするリソースは検証 DB ・マスキング DB で実行されるため、本番 DB へ影響がない

• ( パターン 2) マスキング用の表を本番 DB にコピーしてマスキングを実行 – 表のエクスポート / インポート、 create table as select ~等– マスキング用の DB を別途立てなくてもよいが、本番 DB のリソースを使うことに注意

12

In-Database Masking

010010110010101001001001001001001001001001001000100101010010010010011100100100100100100

本番 DB 検証 DBまたは

マスキング用 DB本番 DB

エクスポート

マスキングの実行 マスキングの実行

Page 13: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

マスキングの方式

• マスキング定義に従って、ダンプファイル (datapump) を作成する• 表のデータ自体は更新されない• In-place masking に比べて、マスキング処理に時間がかかる• マスキング処理とダンプファイルの生成は、本番 DB のリソースを使用する

13

In-Export Masking

010010110010101001001001001001001001001001001000100101010010010010011100100100100100100100001001001011100100101010010010101010011010100101010010

マスクされたDataPump ファイ

本番 DB テスト DB

マスキングの実行

Page 14: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

最適化されたデータベース設定• 高速なデータマスキングの実現

– マスク処理をパラレル化– REDO ログ生成を無効化、オーバーヘッドの削減

• マスク後のパフォーマンスへの考慮– 統計情報のリフレッシュ、マスク処理によるデータ量の変化に対応– 一時表の削除により、不要なリソース占拠を回避

• テスト環境へクローニング+マスキングの自動化 (※ 要 Lifecycle Management オプション )

14

Page 15: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Subsetting• 表と表の関連性を維持したままデータをサブセット(部分集合)させる• サブセットする範囲の指定

– 割合によるランダムなレコード– Where 句の条件指定による任意のレコード

• サブセットに必要となるディスク領域の事前見積もりをサポート

15

100%100M Rows 20%

20M Rows2%

2M Rows

割合によるサブセット

条件:department 10

Table Rule

Employee ID Department ID Salary

Employees

245 10879 10

8475691234

Employee ID Department ID Salary

Employees

34566847566987491234

12125102451135210879

Where 句条件によるサブセット

Page 16: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Masking and Subsetting• サブセット~マスキングまでを一連のジョブとして実行

– 列マスク・ルールでの簡易マスキング ( 単純な固定文字でのマスキング )– 作成済みのマスキング定義の実行

• マスキングの場合と同様な2つの実行方法– In-Database Subsetting & Masking– In-Export Subsetting & Masking

In-Database Masking

In-Export Masking

16

Subsetting

Page 17: Oracle Data Masking and Subsettingのご紹介

Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |