This class provides an interface for all policy handler functions on a file.
More...
#include <src/api/mip/upe/policy_handler.h>
|
static MIP_API bool __CDECL | IsLabeled (const std::vector< MetadataEntry > &metadata, const std::shared_ptr< MipContext > &mipContext) |
| Checks whether metadata contains label artifacts.
|
|
static MIP_API bool __CDECL | IsLabeled (const std::vector< MetadataEntry > &metadata, const std::shared_ptr< MipContext > &mipContext, const std::shared_ptr< void > &loggerContext) |
| Checks whether metadata contains label artifacts.
|
|
This class provides an interface for all policy handler functions on a file.
Definition at line 53 of file policy_handler.h.
◆ ComputeActions()
virtual std::vector< std::shared_ptr< Action > > PolicyHandler::ComputeActions |
( |
const ExecutionState & | state | ) |
|
|
pure virtual |
Executes the rules in the handler based on the provided state and returns the list of actions to be executed.
- Parameters
-
state | the current execution state of the content the rules are running on. |
- Returns
- list of actions that should be applied on the content.
◆ GetSensitivityLabel()
Get the sensitivity label from existing content.
- Parameters
-
state | Current state of the content. |
- Returns
- the label currently applied to the content. If not labeled, returns empty.
◆ IsLabeled() [1/2]
static MIP_API bool __CDECL PolicyHandler::IsLabeled |
( |
const std::vector< MetadataEntry > & | metadata, |
|
|
const std::shared_ptr< MipContext > & | mipContext ) |
|
static |
Checks whether metadata contains label artifacts.
- Parameters
-
metadata | Metadata of file to check |
mipContext | Global MIP context |
- Returns
- True if metadata contains active label artifacts, else false
- Note
- This will only detect Microsoft labels. It will not detect 3rd-party labels, even if a tenant is configured to translate 3rd-party label metadata to Microsoft labels. The primary purpose of this API is to allow an application to quickly detect labeled content without any HTTP calls, and ths limitation is caused by the fact that retrieving tenant-specific label mapping would require an HTTP call.
◆ IsLabeled() [2/2]
static MIP_API bool __CDECL PolicyHandler::IsLabeled |
( |
const std::vector< MetadataEntry > & | metadata, |
|
|
const std::shared_ptr< MipContext > & | mipContext, |
|
|
const std::shared_ptr< void > & | loggerContext ) |
|
static |
Checks whether metadata contains label artifacts.
- Parameters
-
metadata | Metadata of file to check |
mipContext | Global MIP context |
loggerContext | Logger context that will be opaquely passed to the logger delegate |
- Returns
- True if metadata contains active label artifacts, else false
- Note
- This will only detect Microsoft labels. It will not detect 3rd-party labels, even if a tenant is configured to translate 3rd-party label metadata to Microsoft labels. The primary purpose of this API is to allow an application to quickly detect labeled content without any HTTP calls, and ths limitation is caused by the fact that retrieving tenant-specific label mapping would require an HTTP call.
◆ NotifyCommittedActions()
virtual void PolicyHandler::NotifyCommittedActions |
( |
const ExecutionState & | state | ) |
|
|
pure virtual |
Called once the computed actions have been applied, and the data committed to disk.
- Parameters
-
state | the current execution state of the content after the actions have been committed. |
- Note
- : This call sends an audit event.
The documentation for this class was generated from the following file: