Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
policy_engine_cc.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) Microsoft Corporation.
4 * All rights reserved.
5 *
6 * This code is licensed under the MIT License.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files(the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions :
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27
28/**
29 * @brief Contains C API definitions for policy engine
30 *
31 * @file policy_engine_cc.h
32 */
33
34#ifndef API_MIP_UPE_POLICY_ENGINE_CC_H_
35#define API_MIP_UPE_POLICY_ENGINE_CC_H_
36
40#include "mip_cc/error_cc.h"
41#include "mip_cc/identity_cc.h"
43#include "mip_cc/result_cc.h"
46
49
50/**
51 * @brief Release resources associated with a policy engine
52 *
53 * @param engine Policy engine to release
54 */
55MIP_CC_API(void) MIP_CC_ReleasePolicyEngine(mip_cc_policy_engine engine);
56
57/**
58 * @brief Gets size of buffer required to engine ID
59 *
60 * @param engine Policy engine
61 * @param idSize [Output] Size of buffer to hold engine ID (in number of chars)
62 * @param errorInfo [Output] (Optional) Failure info if operation result is error
63 *
64 * @return Result code indicating success or failure
65 */
66MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetEngineIdSize(
68 int64_t* idSize,
70
71/**
72 * @brief Gets engine ID
73 *
74 * @param engine Policy engine
75 * @param idBuffer [Output] Buffer the id will be copied into.
76 * @param idBufferSize Size (in number of chars) of the idBuffer.
77 * @param actualIdSize [Output] Number of chars written to the buffer
78 * @param errorInfo [Output] (Optional) Failure info if operation result is error
79 *
80 * @return Result code indicating success or failure
81 *
82 * @note If idBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
83 * actualIdSize will be set to the minimum required buffer size.
84 */
85MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetEngineId(
87 char* idBuffer,
88 const int64_t idBufferSize,
89 int64_t* actualIdSize,
91
92/**
93 * @brief Gets the size of client data associated with a policy engine
94 *
95 * @param engine Policy engine
96 * @param moreInfoUrlSize [Output] Size of client data (in number of chars)
97 * @param errorInfo [Output] (Optional) Failure info if operation result is error
98 *
99 * @return Result code indicating success or failure
100 */
101MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetMoreInfoUrlSize(
105
106/**
107 * @brief Get client data associated with a policy engine
108 *
109 * @param engine Policy engine
110 * @param moreInfoUrlBuffer [Output] Buffer the client data will be copied into
111 * @param moreInfoUrlBufferSize Size (in number of chars) of moreInfoUrlBuffer.
112 * @param actualMoreInfoUrlSize [Output] Number of chars written to the buffer
113 * @param errorInfo [Output] (Optional) Failure info if operation result is error
114 *
115 * @return Result code indicating success or failure
116 *
117 * @note If moreInfoUrlBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
118 * actualMoreInfoUrlSize will be set to the minimum required buffer size.
119 */
120MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetMoreInfoUrl(
126
127/**
128 * @brief Gets whether or not the policy dictates that a document must be labeled.
129 *
130 * @param engine Policy engine
131 * @param isLabelingRequired [Output] Whether or not policy dictates that a document must be labeled
132 * @param errorInfo [Output] (Optional) Failure info if operation result is error
133 *
134 * @return Result code indicating success or failure
135 */
136MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_IsLabelingRequired(
140
141/**
142 * @brief Gets whether or not the policy dictates a justification for downgrade operations is required.
143 *
144 * @param engine Policy engine
145 * @param isDowngradeJustificationRequired [Output] Whether or a justification for downgrade operations is required.
146 * @param errorInfo [Output] (Optional) Failure info if operation result is error
147 *
148 * @return Result code indicating success or failure
149 */
150MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_IsDowngradeJustificationRequired(
154
155/**
156 * @brief Gets the size of client data associated with a policy engine
157 *
158 * @param engine Policy engine
159 * @param policyFileIdSize [Output] Size of client data (in number of chars)
160 * @param errorInfo [Output] (Optional) Failure info if operation result is error
161 *
162 * @return Result code indicating success or failure
163 */
164MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetPolicyFileIdSize(
168
169/**
170 * @brief Get client data associated with a policy engine
171 *
172 * @param engine Policy engine
173 * @param policyFileIdBuffer [Output] Buffer the client data will be copied into
174 * @param policyFileIdBufferSize Size (in number of chars) of policyFileIdBuffer.
175 * @param actualPolicyFileIdSize [Output] Number of chars written to the buffer
176 * @param errorInfo [Output] (Optional) Failure info if operation result is error
177 *
178 * @return Result code indicating success or failure
179 *
180 * @note If policyFileIdBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
181 * actualPolicyFileIdSize will be set to the minimum required buffer size.
182 */
183MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetPolicyFileId(
189
190/**
191 * @brief Gets the size of client data associated with a policy engine
192 *
193 * @param engine Policy engine
194 * @param sensitivityFileIdSize [Output] Size of client data (in number of chars)
195 * @param errorInfo [Output] (Optional) Failure info if operation result is error
196 *
197 * @return Result code indicating success or failure
198 */
199MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityFileIdSize(
203
204/**
205 * @brief Get client data associated with a policy engine
206 *
207 * @param engine Policy engine
208 * @param sensitivityFileIdBuffer [Output] Buffer the client data will be copied into
209 * @param sensitivityFileIdBufferSize Size (in number of chars) of sensitivityFileIdBuffer.
210 * @param actualSensitivityFileIdSize [Output] Number of chars written to the buffer
211 * @param errorInfo [Output] (Optional) Failure info if operation result is error
212 *
213 * @return Result code indicating success or failure
214 *
215 * @note If sensitivityFileIdBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
216 * actualSensitivityFileIdSize will be set to the minimum required buffer size.
217 */
218MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityFileId(
224
225/**
226 * @brief Gets whether or not the policy has automatic or recommendation rules
227 *
228 * @param engine Policy engine
229 * @param hasClassificationRules [Output] Whether or not policy has automatic or recommendation rules
230 * @param errorInfo [Output] (Optional) Failure info if operation result is error
231 *
232 * @return Result code indicating success or failure
233 */
234MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_HasClassificationRules(
238
239/**
240 * @brief Gets the time when the policy was last fetched
241 *
242 * @param engine Policy engine
243 * @param lastPolicyFetchTime [Output] Time when the policy was last fetched (in seconds since epoch)
244 * @param errorInfo [Output] (Optional) Failure info if operation result is error
245 *
246 * @return Result code indicating success or failure
247 */
248MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetLastPolicyFetchTime(
252
253/**
254 * @brief Gets the number of sensitivity labels associated with the policy engine
255 *
256 * @param engine Policy engine
257 * @param labelsSize [Output] Number of labels
258 * @param errorInfo [Output] (Optional) Failure info if operation result is error
259 *
260 * @return Result code indicating success or failure
261 */
262MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityLabelsSize(
264 int64_t* labelsSize,
266
267/**
268 * @brief Gets the sensitivity labels associated with the policy engine
269 *
270 * @param engine Policy engine
271 * @param labelBuffer [Output] Buffer the labels will be copied into. Labels are owned by the client
272 * application and must be released with MIP_CC_ReleaseLabel.
273 * @param labelBufferSize Size (in number of labels) of the labelBuffer.
274 * @param actualLabelsSize [Output] Number of labels written to the buffer
275 * @param errorInfo [Output] (Optional) Failure info if operation result is error
276 *
277 * @return Result code indicating success or failure
278 *
279 * @note If labelBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
280 * actualLabelsSize will be set to the minimum required buffer size
281 */
282MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityLabels(
285 const int64_t labelBufferSize,
288
289/**
290 * @brief Gets sensitivity label by ID
291 *
292 * @param engine Policy engine
293 * @param labelId Label ID
294 * @param label [Output] Sensitivity label. This value is owned by the caller and must be released with MIP_CC_ReleaseLabel.
295 * @param errorInfo [Output] (Optional) Failure info if operation result is error
296 *
297 * @return Result code indicating success or failure
298 */
299MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetLabelById(
301 const char* labelId,
304
305/**
306 * @brief Gets the number of sensitivity types associated with the policy engine
307 *
308 * @param engine Policy engine
309 * @param sensitivityTypesSize [Output] Number of sensitivity types
310 * @param errorInfo [Output] (Optional) Failure info if operation result is error
311 *
312 * @return Result code indicating success or failure
313 */
314MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityTypesSize(
318
319/**
320 * @brief Gets the sensitivity types associated with the policy engine
321 *
322 * @param engine Policy engine
323 * @param sensitivityTypeBuffer [Output] Buffer the sensitivity types will be copied into. Sensitivity
324 * types are owned by the caller and must be released with MIP_CC_ReleaseSensitivityType.
325 * @param sensitivityTypeBufferSize Size (in number of sensitivity types) of the sensitivityTypeBuffer.
326 * @param actualSensitivityTypesSize [Output] Number of sensitivity types written to the buffer
327 * @param errorInfo [Output] (Optional) Failure info if operation result is error
328 *
329 * @return Result code indicating success or failure
330 *
331 * @note If sensitivityTypeBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
332 * actualSensitivityTypesSize will be set to the minimum required buffer size
333 */
334MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityTypes(
340
341/**
342 * @brief Create a Policy Handler to execute policy-related functions
343 *
344 * @param engine Policy engine
345 * @param isAuditDiscoveryEnabled Whether or not audit discovery is enabled
346 * @param handler [Output] Newly-created Policy Handler instance
347 * @param errorInfo [Output] (Optional) Failure info if operation result is error
348 *
349 * @return Result code indicating success or failure
350 */
351MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_CreatePolicyHandler(
356
357/**
358 * @brief Logs an application specific event to the audit pipeline
359 *
360 * @param level Level of the event: Info/Error/Warning
361 * @param eventType A description of the type of event
362 * @param eventData The data associated with the event
363 * @param errorInfo [Output] (Optional) Failure info if operation result is error
364 *
365 * @return Result code indicating success or failure
366 */
367MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_SendApplicationAuditEvent(
369 const char* level,
370 const char* eventType,
371 const char* eventData,
373
374/**
375 * @brief Gets size of tenant ID
376 *
377 * @param engine Policy engine
378 * @param tenantIdSize [Output] Size of tenant ID (in number of chars)
379 * @param errorInfo [Output] (Optional) Failure info if operation result is error
380 *
381 * @return Result code indicating success or failure
382 */
383MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetTenantIdSize(
385 int64_t* tenantIdSize,
387
388/**
389 * @brief Gets tenant ID
390 *
391 * @param engine Policy engine
392 * @param tenantIdBuffer [Output] Buffer the tenant ID will be copied into.
393 * @param tenantIdBufferSize Size (in number of chars) of the tenantIdBuffer.
394 * @param actualTenantIdSize [Output] Number of chars written to the buffer
395 * @param errorInfo [Output] (Optional) Failure info if operation result is error
396 *
397 * @return Result code indicating success or failure
398 *
399 * @note If tenantIdBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
400 * actualTenantIdSize will be set to the minimum required buffer size.
401 */
402MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetTenantId(
405 const int64_t tenantIdBufferSize,
408
409
410/**
411 * @brief Gets size of policy data xml
412 *
413 * @param engine Policy engine
414 * @param xmlSize [Output] Size of policy data xml (in number of chars)
415 * @param errorInfo [Output] (Optional) Failure info if operation result is error
416 *
417 * @return Result code indicating success or failure
418 */
419MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetPolicyDataXmlSize(
421 int64_t* xmlSize,
423
424/**
425 * @brief Gets policy data xml
426 *
427 * @param engine Policy engine
428 * @param xmlBuffer [Output] Buffer the xml will be copied into.
429 * @param xmlBufferSize Size (in number of chars) of the xmlBuffer.
430 * @param actualXmlSize [Output] Number of chars written to the buffer
431 * @param errorInfo [Output] (Optional) Failure info if operation result is error
432 *
433 * @return Result code indicating success or failure
434 *
435 * @note If xmlBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
436 * actualXmlSize will be set to the minimum required buffer size.
437 */
438MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetPolicyDataXml(
441 const int64_t xmlBufferSize,
444
445/**
446 * @brief Gets size of sensitivity types data xml
447 *
448 * @param engine Policy engine
449 * @param xmlSize [Output] Size of policy data xml (in number of chars)
450 * @param errorInfo [Output] (Optional) Failure info if operation result is error
451 *
452 * @return Result code indicating success or failure
453 */
454MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityTypesDataXmlSize(
456 int64_t* xmlSize,
458
459/**
460 * @brief Gets sensitivity types data xml
461 *
462 * @param engine Policy engine
463 * @param xmlBuffer [Output] Buffer the xml will be copied into.
464 * @param xmlBufferSize Size (in number of chars) of the xmlBuffer.
465 * @param actualXmlSize [Output] Number of chars written to the buffer
466 * @param errorInfo [Output] (Optional) Failure info if operation result is error
467 *
468 * @return Result code indicating success or failure
469 *
470 * @note If xmlBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
471 * actualXmlSize will be set to the minimum required buffer size.
472 */
473MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetSensitivityTypesDataXml(
475 char* xmlBuffer,
476 const int64_t xmlBufferSize,
477 int64_t* actualXmlSize,
479
480/**
481 * @brief Gets the size of client data associated with a policy engine
482 *
483 * @param engine Policy engine
484 * @param clientDataSize [Output] Size of client data (in number of chars)
485 * @param errorInfo [Output] (Optional) Failure info if operation result is error
486 *
487 * @return Result code indicating success or failure
488 */
489MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetClientDataSize(
493
494/**
495 * @brief Get client data associated with a policy engine
496 *
497 * @param engine Policy engine
498 * @param clientDataBuffer [Output] Buffer the client data will be copied into
499 * @param clientDataBufferSize Size (in number of chars) of clientDataBuffer.
500 * @param actualClientDataSize [Output] Number of chars written to the buffer
501 * @param errorInfo [Output] (Optional) Failure info if operation result is error
502 *
503 * @return Result code indicating success or failure
504 *
505 * @note If clientDataBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and
506 * actualClientDataSize will be set to the minimum required buffer size.
507 */
508MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetClientData(
511 const int64_t clientDataBufferSize,
514
515/**
516 * @deprecated See the replacement MIP_CC_CreatePolicyEngineSettingsWithIdentityAndAuthCallback
517 * @brief Create a settings object used to create a brand new policy engine
518 *
519 * @param identity Identity that will be associated with PolicyEngine
520 * @param clientData Customizable client data that is stored alongside the engine
521 * @param locale Locale in which text results will output
522 * @param loadSensitivityTypes Whether or not sensitivity types data (for classification) should also be loaded
523 * @param settings [Output] Newly-created settings instance
524 * @param errorInfo [Output] (Optional) Failure info if operation result is error
525 *
526 * @return Result code indicating success or failure
527 *
528 * @note 'loadSensitivityTypes' should be 'true' only if application expects to later call
529 * MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
530 */
531MIP_CC_DEPRECATED_API(mip_cc_result) MIP_CC_CreatePolicyEngineSettingsWithIdentity(
533 const char* clientData,
534 const char* locale,
538
539/**
540 * @deprecated See the replacement MIP_CC_CreatePolicyEngineSettingsWithEngineIdAndAuthCallback
541 * @brief Create a settings object used to load an existing policy engine by engine ID if it
542 * already exists, else create a new engine
543 *
544 * @param engineId ID of existing cached engine
545 * @param identity (Optional) Identity that will be associated with PolicyEngine
546 * @param clientData Customizable client data that is stored alongside the engine
547 * @param locale Locale in which text results will output
548 * @param loadSensitivityTypes Whether or not sensitivity types data (for classification) should also be loaded
549 * @param settings [Output] Newly-created settings instance
550 * @param errorInfo [Output] (Optional) Failure info if operation result is error
551 *
552 * @return Result code indicating success or failure
553 *
554 * @note 'loadSensitivityTypes' should be 'true' only if application expects to later call
555 * MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
556 *
557 * @note 'identity' will only be used for new engines. If an engine with the specified engine id already exists in
558 * the local cache, the identity from the cached engine will be used instead.
559 */
560MIP_CC_DEPRECATED_API(mip_cc_result) MIP_CC_CreatePolicyEngineSettingsWithEngineId(
561 const char* engineId,
563 const char* clientData,
564 const char* locale,
568
569/**
570 * @brief Create a settings object used to create a brand new policy engine
571 *
572 * @param identity Identity that will be associated with PolicyEngine
573 * @param authCallback Callback object to be used for authentication, implemented by client application
574 * @param clientData Customizable client data that is stored alongside the engine
575 * @param locale Locale in which text results will output
576 * @param loadSensitivityTypes Whether or not sensitivity types data (for classification) should also be loaded
577 * @param settings [Output] Newly-created settings instance
578 * @param errorInfo [Output] (Optional) Failure info if operation result is error
579 *
580 * @return Result code indicating success or failure
581 *
582 * @note 'loadSensitivityTypes' should be 'true' only if application expects to later call
583 * MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
584 */
585MIP_CC_API(mip_cc_result) MIP_CC_CreatePolicyEngineSettingsWithIdentityAndAuthCallback(
587 const mip_cc_auth_callback authCallback,
588 const char* clientData,
589 const char* locale,
593
594/**
595 * @brief Create a settings object used to load an existing policy engine by engine ID if it
596 * already exists, else create a new engine
597 *
598 * @param engineId ID of existing cached engine
599 * @param identity (Optional) Identity that will be associated with PolicyEngine
600 * @param authCallback Callback object to be used for authentication, implemented by client application
601 * @param clientData Customizable client data that is stored alongside the engine
602 * @param locale Locale in which text results will output
603 * @param loadSensitivityTypes Whether or not sensitivity types data (for classification) should also be loaded
604 * @param settings [Output] Newly-created settings instance
605 * @param errorInfo [Output] (Optional) Failure info if operation result is error
606 *
607 * @return Result code indicating success or failure
608 *
609 * @note 'loadSensitivityTypes' should be 'true' only if application expects to later call
610 * MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
611 *
612 * @note 'identity' will only be used for new engines. If an engine with the specified engine id already exists in
613 * the local cache, the identity from the cached engine will be used instead.
614 */
615MIP_CC_API(mip_cc_result) MIP_CC_CreatePolicyEngineSettingsWithEngineIdAndAuthCallback(
616 const char* engineId,
618 const mip_cc_auth_callback authCallback,
619 const char* clientData,
620 const char* locale,
624
625/**
626 * @brief Sets the client data that will be stored opaquely alongside this engine and persist across sessions
627 *
628 * @param settings Engine settings
629 * @param clientData Client data
630 * @param errorInfo [Output] (Optional) Failure info if operation result is error
631 *
632 * @return Result code indicating success or failure
633 */
634MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngineSettings_SetClientData(
636 const char* clientData,
638
639/**
640 * @brief Configures custom settings, used for feature gating and testing.
641 *
642 * @param settings Engine settings
643 * @param customSettings Key/value pairs of custom settings
644 * @param errorInfo [Output] (Optional) Failure info if operation result is error
645 *
646 * @return Result code indicating success or failure
647 */
648MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngineSettings_SetCustomSettings(
652
653/**
654 * @brief Sets the session ID that can be used to correlate logs and telemetry
655 *
656 * @param settings Engine settings
657 * @param sessionId Session ID that represents the lifetime of a policy engine
658 * @param errorInfo [Output] (Optional) Failure info if operation result is error
659 *
660 * @return Result code indicating success or failure
661 */
662MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngineSettings_SetSessionId(
664 const char* sessionId,
666
667/**
668 * @brief Sets cloud which affects endpoint URLs for all service requests
669 *
670 * @param settings Engine settings
671 * @param cloud Cloud identifier (default = Unknown)
672 * @param errorInfo [Output] (Optional) Failure info if operation result is error
673 *
674 * @return Result code indicating success or failure
675 *
676 * @note If cloud is not specified, then it will default to global cloud.
677 */
678MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngineSettings_SetCloud(
682
683/**
684 * @brief Sets base URL for all service requests
685 *
686 * @param settings Engine settings
687 * @param cloudEndpointBaseUrl Base URL (e.g. 'https://dataservice.protection.outlook.com')
688 * @param errorInfo [Output] (Optional) Failure info if operation result is error
689 *
690 * @return Result code indicating success or failure
691 *
692 * @note This value will only be read and must be set for Cloud = MIP_CLOUD_CUSTOM
693 */
694MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngineSettings_SetCloudEndpointBaseUrl(
698
699/**
700 * @brief Sets delegated user
701 *
702 * @param settings Engine settings
703 * @param delegatedUserEmail Email address of delegated user
704 * @param errorInfo [Output] (Optional) Failure info if operation result is error
705 *
706 * @return Result code indicating success or failure
707 *
708 * @note A delegated user is specified when the authenticating user/application is acting on behalf of another user
709 */
710MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngineSettings_SetDelegatedUserEmail(
714
715/**
716 * @deprecated See the replacement MIP_CC_PolicyEngineSettings_ConfigureFunctionality
717 * @brief Sets label filter
718 *
719 * @param settings Engine settings
720 * @param labelFilter enum representing label filter, if not set default is hyok, doublekeyencryption
721 * @param errorInfo [Output] (Optional) Failure info if operation result is error
722 *
723 * @return Result code indicating success or failure
724 *
725 */
726MIP_CC_DEPRECATED_API(mip_cc_result) MIP_CC_PolicyEngineSettings_SetLabelFilter(
730
731/**
732 * @brief Enables or disables functionality
733 *
734 * @param settings Engine settings
735 * @param labelFilter enum representing type to configure
736 * @param enabled True to enable, False to disable
737 * @param errorInfo [Output] (Optional) Failure info if operation result is error
738 *
739 * @return Result code indicating success or failure
740 *
741 */
742MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngineSettings_ConfigureFunctionality(
747
748/**
749 * @brief Release resources associated with a policy engine settings
750 *
751 * @param settings Policy engine settings to be released
752 */
753MIP_CC_API(void) MIP_CC_ReleasePolicyEngineSettings(mip_cc_policy_engine_settings settings);
754
755/**
756 * @brief Gets the recommended WXP (Windows, Excel, Powerpoint) metadata version, currently 0 for old verion
757 * 1 for co-authoring enabled version.
758 *
759 * @param engine Policy engine
760 * @param metadataVersion [Output] WXP metadata version.
761 * @param errorInfo [Output] (Optional) Failure info if operation result is error
762 *
763 * @return Result code indicating success or failure
764 */
765MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_GetWxpMetadataVersion(
769
770/**
771 * @brief Checks consent for a specific workload
772 *
773 * @param engine Policy engine
774 * @param metadataVersion [Output] WXP metadata version.
775 * @param errorInfo [Output] (Optional) Failure info if operation result is error
776 *
777 * @return Result code indicating success or failure
778 */
779MIP_CC_API(mip_cc_result) MIP_CC_PolicyEngine_HasWorkloadConsent(
783#endif // API_MIP_PROTECTION_PROTECTION_ENGINE_CC_H_
Defines auth callback functions.
A file Containing the common types used by the upe, file and protection modules.
mip_cc_workload
mip_cc_label_filter
mip_cc_cloud
Contains C API definitions for common string dictionary.
Error definition and functions.
Identity definition.
Export/import and other macros for C API.
char * sensitivityFileIdBuffer
int64_t * policyFileIdSize
char const int64_t moreInfoUrlBufferSize
mip_cc_sensitivity_type const int64_t int64_t * actualSensitivityTypesSize
int64_t * xmlSize
int64_t mip_cc_error * errorInfo
bool * isDowngradeJustificationRequired
char const int64_t tenantIdBufferSize
const char const char bool mip_cc_policy_engine_settings * settings
const mip_cc_auth_callback authCallback
const mip_cc_label_filter bool enabled
int64_t * labelsSize
char * xmlBuffer
char const int64_t policyFileIdBufferSize
mip_cc_sensitivity_type * sensitivityTypeBuffer
const char * level
const char * sessionId
int64_t * moreInfoUrlSize
char const int64_t int64_t * actualClientDataSize
char const int64_t int64_t * actualMoreInfoUrlSize
int64_t * tenantIdSize
mip_cc_handle * mip_cc_policy_engine_settings
const bool mip_cc_policy_handler * handler
MIP_CC_API(void) MIP_CC_ReleasePolicyEngine(mip_cc_policy_engine engine)
Release resources associated with a policy engine.
const char mip_cc_label * label
char const int64_t int64_t * actualSensitivityFileIdSize
char * clientDataBuffer
char const int64_t xmlBufferSize
const char const char const char * eventData
const mip_cc_cloud cloud
const mip_cc_label_filter labelFilter
char const int64_t clientDataBufferSize
int64_t * clientDataSize
int64_t * idSize
char const int64_t int64_t * actualPolicyFileIdSize
const char const char * eventType
mip_cc_sensitivity_type const int64_t sensitivityTypeBufferSize
const mip_cc_dictionary customSettings
char * policyFileIdBuffer
const char * delegatedUserEmail
bool * isLabelingRequired
const bool isAuditDiscoveryEnabled
char * tenantIdBuffer
const char * cloudEndpointBaseUrl
const char const char bool loadSensitivityTypes
int64_t * sensitivityFileIdSize
bool * hasClassificationRules
int64_t * lastPolicyFetchTime
const mip_cc_identity * identity
const char * labelId
mip_cc_label const int64_t labelBufferSize
int64_t * metadataVersion
const char const char * locale
char const int64_t idBufferSize
char * moreInfoUrlBuffer
mip_cc_label * labelBuffer
char const int64_t int64_t * actualXmlSize
char const int64_t int64_t * actualIdSize
const char * clientData
mip_cc_workload workload
char const int64_t int64_t * actualTenantIdSize
char const int64_t sensitivityFileIdBufferSize
mip_cc_label const int64_t int64_t * actualLabelsSize
int64_t * sensitivityTypesSize
MIP_CC_DEPRECATED_API(mip_cc_result) MIP_CC_CreatePolicyEngineSettingsWithIdentity(const mip_cc_identity *identity
Create a settings object used to create a brand new policy engine.
char * idBuffer
mip_cc_handle * mip_cc_policy_engine
Contains C API definitions for policy handler.
const mip_cc_protection_engine_settings mip_cc_protection_engine * engine
Defines success/error result codes.
mip_cc_result
API success/failure result.
Definition result_cc.h:44
Contains C API definitions for sensitivity type.
Error information.
Definition error_cc.h:79
Opaque handle to MIP object.
A struct that contains user identification info.
Definition identity_cc.h:42