機密データの取り扱い
セッションの記録中にユーザーのプライバシーを保護するには、デフォルトですべてのテキストフィールドと入力フィールドを非表示にするオプションを有効にして、機密データをマスクするようにセッションリプレイを設定します。
レンダリングモード
| モード | 説明 |
|---|---|
RenderingMode.NATIVE |
アプリケーションの画面を定期的にキャプチャし、セッションリプレイによって即座に機密データが削除されます。その後、キャプチャした各フレームを結合して、1 つのセッション録音を作成します。 |
RenderingMode.WIREFRAME |
画面データをワイヤフレームとしてのみ表現し、アプリケーションをキャプチャします。ユーザーデータは記録されません。これはユーザーデータのセキュリティ保護に推奨されるレンダリングメソッドです。 |
レンダリングモードの設定
import com.appdynamics.eumagent.runtime.Instrumentation;
...
@Override public void onCreate(Bundle savedInstanceState) {
Instrumentation.start(AgentConfiguration.builder()
.withAppKey("<EUM_APP_KEY>")
.withContext(getApplicationContext())
// The default SaaS EUM Server and Screenshot Service are in the Americas,
// so you can omit the following settings if you are in the Americas.
.withSessionReplayEnabled.withSensitivity(true)
.withBlobServiceURL(configHelper.getSessionReplayUrl())
.build());
...
}
レンダリングモードの読み取り
import com.appdynamics.eumagent.runtime.Instrumentation;
...
@Override public void onCreate(Bundle savedInstanceState) {
Instrumentation.start(AgentConfiguration.builder()
.withAppKey("<EUM_APP_KEY>")
.withContext(getApplicationContext())
// The default SaaS EUM Server and Screenshot Service are in the Americas,
// so you can omit the following settings if you are in the Americas.
.withSessionReplayEnabled.withSensitivity(true)
.withBlobServiceURL(<Session Replay URL>)
.build());
...
}
感度
プロジェクト内の各要素に対して感度を設定できます。アプリケーションの構築方法に基づいて、次のいずれかを選択します。
ビュー感度
View インスタンスの感度を設定します。
Instrumentation.setViewSensitivity(<VIEW>, true);
View インスタンスの感度を読み取ります。
Boolean editTextSensitivity = Instrumentation.getViewSensitivity(<VIEW>);
クラス感度
View に感度を設定するのではなく、View を拡張する Class のすべてのインスタンスに感度を設定します。
Instrumentation.setClassSensitivity(<CLASS>.class, true);
View を拡張する Class のすべてのインスタンスの感度を読み取ります。
Instrumentation.getClassSensitivity(<CLASS>.class)
録音マスク
録音マスクの例
録画対象から除外したいアプリケーションのエリアがあり、viewで定義できない場合は、RecordingMask を使用できます。
セッションリプレイでは、機密データを覆い隠すか消去することでマスクします。録音マスクを設定するには、次の設定を使用します。
Instrumentation.setRecordingMask(<Map of Masks>);
一度に設定できる Recording mask は 1 つだけですが、録音マスクに MaskType のリストを含めることで、複数のエリアをまとめてカバーできます。機密データを保護するには、次のマスクタイプを使用します。
| マスクタイプ | 機能の仕組み |
|---|---|
MaskType.MASK_TYPE_COVERING |
要素 Rect で定義されたエリアは録音の対象外です |
MaskType.MASK_TYPE_ERASING |
要素 Rect で定義されたエリアは、リスト内の以前の MaskType によってそのエリアが覆われていた場合でも録音されます。 |
Map<Rect, Integer> maskMap = new HashMap<>();
// Large covering mask for entire toolbar area
Rect toolbarArea = new Rect(0, 0, 1080, 400);
maskMap.put(toolbarArea, MaskType.MASK_TYPE_COVERING);
// Erasing mask to reveal specific button area
Rect buttonRevealArea = new Rect(800, 50, 1000, 200);
maskMap.put(buttonRevealArea, MaskType.MASK_TYPE_ERASING);
// Another covering mask for sensitive content area
Rect sensitiveArea = new Rect(100, 500, 900, 700);
maskMap.put(sensitiveArea, MaskType.MASK_TYPE_COVERING);
Instrumentation.setRecordingMask(maskMap);
Map<Rect, Integer> currentMasks = Instrumentation.getRecordingMask();