Skip to content

Commit

Permalink
Implementing [SCSensitityLabel] Auto Labeling missing in export micro…
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Sep 18, 2024
1 parent 6eaed67 commit cbd9c35
Show file tree
Hide file tree
Showing 6 changed files with 1,010 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
* Fixes an issue with creation without specifying Displayname
* Fixes an issue with Drifts because of returned Role format
FIXES [#5036](https://github.com/microsoft/Microsoft365DSC/issues/5036)
* SCSensitivityLabel
* Added support for Auto Labeling settings
FIXES [#3784](https://github.com/microsoft/Microsoft365DSC/issues/3784)
* SentinelSetting
* Initial release.
* SPOAccessControlSettings
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
[ClassVersion("1.0.0")]
class MSFT_SCSLSensitiveInformationType
{
[Required, Description("Name of the Sensitive Information Type")] String name;
[Write, Description("Confidence level value for the Sensitive Information"),ValueMap{"Low","Medium","High"}, Values{"Low","Medium","High"}] String confidencelevel;
[Write, Description("Type of Classifier value for the Sensitive Information")] String classifiertype;
[Write, Description("Minimum Count value for the Sensitive Information")] String mincount;
[Write, Description("Maximum Count value for the Sensitive Information")] String maxcount;
};
[ClassVersion("1.0.0")]
class MSFT_SCSLTrainableClassifiers
{
[Required, Description("Name of the Trainable Classifier")] String name;
[Write, Description("Id of the Trainable Classifier")] String id;
};
[ClassVersion("1.0.0")]
class MSFT_SCSLSensitiveInformationGroup
{
[Write, Description("Sensitive Information Content Types"),EmbeddedInstance("MSFT_SCSLSensitiveInformationType")] String SensitiveInformationType[];
[Write, Description("Trainable Classifiers"),EmbeddedInstance("MSFT_SCSLTrainableClassifiers")] String TrainableClassifier[];
[Required, Description("Name of the group")] String Name;
[Required, Description("How to process the Sensitive Information Types and Trainable Classifiers"),ValueMap{"And","Or"}, Values{"And","Or"}] String Operator;
};
[ClassVersion("1.0.0")]
class MSFT_SCSLAutoLabelingSettings
{
[Required, Description("Groups of sensitive information types."),EmbeddedInstance("MSFT_SCSLSensitiveInformationGroup")] String Groups[];
[Required, Description("How to process the various groups"),ValueMap{"And","Or"}, Values{"And","Or"}] String Operator;
[Write, Description("Display this message to users when the label is applied")] String PolicyTip;
[Required, Description("Specifies what to do when content matches the conditions"),ValueMap{"Automatic","Recommend"}, Values{"Automatic","Recommend"}] String AutoApplyType;
};
[ClassVersion("1.0.0")]
class MSFT_SCLabelSetting
{
[Write, Description("Advanced settings key.")] String Key;
Expand Down Expand Up @@ -57,6 +88,7 @@ class MSFT_SCSensitivityLabel : OMI_BaseResource
[Write, Description("The SiteAndGroupProtectionEnabled parameter enables or disables the Site and Group Protection action for the labels.")] Boolean SiteAndGroupProtectionEnabled;
[Write, Description("The SiteAndGroupProtectionPrivacy parameter specifies the privacy level for the label."), ValueMap{"Public","Private","Unspecified"}, Values{"Public","Private","Unspecified"}] String SiteAndGroupProtectionPrivacy;
[Write, Description("The SiteAndGroupExternalSharingControlType parameter specifies the external user sharing setting for the label."), ValueMap{"ExternalUserAndGuestSharing","ExternalUserSharingOnly","ExistingExternalUserSharingOnly","Disabled"}, Values{"ExternalUserAndGuestSharing","ExternalUserSharingOnly","ExistingExternalUserSharingOnly","Disabled"}] String SiteAndGroupExternalSharingControlType;
[Write, Description("The AutoLabelingSettings parameter specifies the conditions for label to be automatically applied to files and emails."), EmbeddedInstance("MSFT_SCSLAutoLabelingSettings")] String AutoLabelingSettings;
[Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<#
This example is used to test new resources and showcase the usage of new resources being worked on.
It is not meant to use as a production baseline.
#>

Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$Credscredential
)
Import-DscResource -ModuleName Microsoft365DSC

node localhost
{
SCSensitivityLabel 'ConfigureSensitivityLabel'
{
Name = 'DemoLabel'
Comment = 'Demo Label comment'
ToolTip = 'Demo tool tip'
DisplayName = 'Demo Label'
ApplyContentMarkingFooterAlignment = 'Center'
ApplyContentMarkingFooterEnabled = $true
ApplyContentMarkingFooterFontColor = '#FF0000'
ApplyContentMarkingFooterFontSize = 10
ApplyContentMarkingFooterMargin = 5
ApplyContentMarkingFooterText = 'Demo footer text'
ApplyContentMarkingHeaderAlignment = 'Center'
ApplyContentMarkingHeaderEnabled = $true
ApplyContentMarkingHeaderFontColor = '#FF0000'
ApplyContentMarkingHeaderFontSize = 10
ApplyContentMarkingHeaderMargin = 5
ApplyContentMarkingHeaderText = 'demo header text'
ApplyWaterMarkingEnabled = $true
ApplyWaterMarkingFontColor = '#FF0000'
ApplyWaterMarkingFontSize = 10
ApplyWaterMarkingLayout = 'Diagonal'
ApplyWaterMarkingText = 'demo watermark'
SiteAndGroupProtectionAllowAccessToGuestUsers = $true
SiteAndGroupProtectionAllowEmailFromGuestUsers = $true
SiteAndGroupProtectionAllowFullAccess = $true
SiteAndGroupProtectionAllowLimitedAccess = $true
SiteAndGroupProtectionBlockAccess = $true
SiteAndGroupProtectionEnabled = $true
SiteAndGroupProtectionPrivacy = 'Private'
LocaleSettings = @(
MSFT_SCLabelLocaleSettings
{
LocaleKey = 'DisplayName'
LabelSettings = @(
MSFT_SCLabelSetting
{
Key = 'en-us'
Value = 'English Display Names'
}
MSFT_SCLabelSetting
{
Key = 'fr-fr'
Value = "Nom da'ffichage francais"
}
)
}
MSFT_SCLabelLocaleSettings
{
LocaleKey = 'StopColor'
LabelSettings = @(
MSFT_SCLabelSetting
{
Key = 'en-us'
Value = 'RedGreen'
}
MSFT_SCLabelSetting
{
Key = 'fr-fr'
Value = 'Rouge'
}
)
}
)
AdvancedSettings = @(
MSFT_SCLabelSetting
{
Key = 'AllowedLevel'
Value = @('Sensitive', 'Classified')
}
MSFT_SCLabelSetting
{
Key = 'LabelStatus'
Value = 'Enabled'
}
)
AutoLabelingSettings = MSFT_SCSLAutoLabelingSettings
{
Operator = 'And'
AutoApplyType = 'Recommend'
PolicyTip = 'My Perfect Test Tip!'
Groups = @(
MSFT_SCSLSensitiveInformationGroup
{
Name = 'Group1'
Operator = 'Or'
SensitiveInformationType = @(
MSFT_SCSLSensitiveInformationType
{
name = 'ABA Routing Number'
confidencelevel = 'High'
maxcount = -1
mincount = 1
}
)
TrainableClassifier = @(
MSFT_SCSLTrainableClassifiers
{
name = 'Legal Affairs'
}
)
}
MSFT_SCSLSensitiveInformationGroup
{
Name = 'Group2'
Operator = 'And'
SensitiveInformationType = @(
MSFT_SCSLSensitiveInformationType
{
name = 'All Full Names'
confidencelevel = 'High'
maxcount = 100
mincount = 10
}
)
TrainableClassifier = @(
MSFT_SCSLTrainableClassifiers
{
name = 'Threat'
}
)
}
)
}
ParentId = 'Personal'
Ensure = 'Present'
Credential = $Credscredential
}
}
}
Loading

0 comments on commit cbd9c35

Please sign in to comment.