mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* Move Purview integration logic into middleware * Improve error handling and user id management * Rename purview package * Handle 402s more explicitly; add Middleware generation methods; don't ignore exceptions * Use DI container; pass scope id to PC * Add protection scope caching * Wrap more exceptions in PurviewClient * Remove block check dedup; add tests * Refactor PurviewWrapper intialization; Add unit tests * Use different .Use method and add IDisposable stub * Add background job processing for Purview * Misc comment cleanup * Apply copilot comments * Fix formatting * Formatting other files to fix pipeline * Small updates to settings and exceptions * Add README * Move Purview sample * Address review comments and update XML comments * Newline after namespace * Move public Purview classes to single namespace; Clean up csproj and slnx * Commit the renames * Remove unused openAI dependency --------- Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
70 lines
1.7 KiB
C#
70 lines
1.7 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Microsoft.Agents.AI.Purview.Models.Common;
|
|
|
|
/// <summary>
|
|
/// Defines all the actions for DLP.
|
|
/// </summary>
|
|
[JsonConverter(typeof(JsonStringEnumConverter<DlpAction>))]
|
|
internal enum DlpAction
|
|
{
|
|
/// <summary>
|
|
/// The DLP action to notify user.
|
|
/// </summary>
|
|
NotifyUser,
|
|
|
|
/// <summary>
|
|
/// The DLP action is block.
|
|
/// </summary>
|
|
BlockAccess,
|
|
|
|
/// <summary>
|
|
/// The DLP action to apply restrictions on device.
|
|
/// </summary>
|
|
DeviceRestriction,
|
|
|
|
/// <summary>
|
|
/// The DLP action to apply restrictions on browsers.
|
|
/// </summary>
|
|
BrowserRestriction,
|
|
|
|
/// <summary>
|
|
/// The DLP action to generate an alert
|
|
/// </summary>
|
|
GenerateAlert,
|
|
|
|
/// <summary>
|
|
/// The DLP action to generate an incident report
|
|
/// </summary>
|
|
GenerateIncidentReportAction,
|
|
|
|
/// <summary>
|
|
/// The DLP action to block anonymous link access in SPO
|
|
/// </summary>
|
|
SPBlockAnonymousAccess,
|
|
|
|
/// <summary>
|
|
/// DLP Action to disallow guest access in SPO
|
|
/// </summary>
|
|
SPRuntimeAccessControl,
|
|
|
|
/// <summary>
|
|
/// DLP No Op action for NotifyUser. Used in Block Access V2 rule
|
|
/// </summary>
|
|
SPSharingNotifyUser,
|
|
|
|
/// <summary>
|
|
/// DLP No Op action for GIR. Used in Block Access V2 rule
|
|
/// </summary>
|
|
SPSharingGenerateIncidentReport,
|
|
|
|
/// <summary>
|
|
/// Restrict access action for data in motion scenarios.
|
|
/// Advanced version of BlockAccess which can take both enforced restriction mode (Audit, Block, etc.)
|
|
/// and action triggers (Print, SaveToLocal, etc.) as parameters.
|
|
/// </summary>
|
|
RestrictAccess,
|
|
}
|