-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Logging sensitive data | ||
====================== | ||
|
||
Jupyter Telemetry offers flexibility when logging and handling sensitive data. | ||
|
||
Since events may include data with varying degrees of sensitivity, Jupyter Telemetry uses a multi-level security approach. It exposed four levels of sensitivity: | ||
|
||
+ ``'unclassified'`` | ||
+ ``'confidential'`` | ||
+ ``'secret'`` | ||
+ ``'top_secret'`` | ||
|
||
Each event property can be given one of these four levels. This is reflected in the event JSON schema using the ``level`` attribute (if this property is missing from the schema, an error will be thrown): | ||
|
||
.. code-block:: yaml | ||
$id: example.schema | ||
... | ||
properties: | ||
name: | ||
title: Name | ||
level: confidential | ||
description: | | ||
Name of event | ||
type: string | ||
Jupyter Telemetry uses the ``level`` attribute to drop sensitive data when emitting events. By default, properties greater than "unclassifed" are dropped from recorded event data. | ||
|
||
Each logging handler increase the level of sensitive data it emots. This can be configured by changing its ``.event_level`` attribute. | ||
|
||
.. code-block:: python | ||
import logging | ||
handler = logging.FileHandler('events.log') | ||
handler.event_level = 'secret' | ||