Skip to content

Commit d3a10e3

Browse files
more improvements
1 parent d0b674e commit d3a10e3

File tree

3 files changed

+597
-186
lines changed

3 files changed

+597
-186
lines changed

src/components/CippStandards/CippStandardsSideBar.jsx

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ const CippStandardsSideBar = ({
107107
// Helper function to expand groups to their member tenants
108108
const expandGroupsToTenants = (tenants, groups) => {
109109
const expandedTenants = [];
110-
110+
111111
tenants.forEach((tenant) => {
112112
const tenantValue = typeof tenant === "object" ? tenant.value : tenant;
113113
const tenantType = typeof tenant === "object" ? tenant.type : null;
114-
114+
115115
if (tenantType === "Group") {
116116
// Find the group and add all its members
117-
const group = groups?.find(g => g.Id === tenantValue);
117+
const group = groups?.find((g) => g.Id === tenantValue);
118118
if (group && group.Members) {
119-
group.Members.forEach(member => {
119+
group.Members.forEach((member) => {
120120
expandedTenants.push(member.defaultDomainName);
121121
});
122122
}
@@ -125,7 +125,7 @@ const CippStandardsSideBar = ({
125125
expandedTenants.push(tenantValue);
126126
}
127127
});
128-
128+
129129
return expandedTenants;
130130
};
131131

@@ -271,6 +271,70 @@ const CippStandardsSideBar = ({
271271
<CardHeader title={title} />
272272
<Divider />
273273
<CardContent>
274+
<Typography variant="h6" gutterBottom>
275+
{isDriftMode ? "About Drift Templates" : "About Standard Templates"}
276+
</Typography>
277+
{isDriftMode ? (
278+
<Stack spacing={2} sx={{ mb: 3 }}>
279+
<Typography variant="body2" color="text.secondary">
280+
Drift templates provide continuous monitoring of tenant configurations to detect
281+
unauthorized changes. Each tenant can only have one drift template applied at a time.
282+
</Typography>
283+
<Typography variant="body2" color="text.secondary">
284+
<strong>Remediation Options:</strong>
285+
</Typography>
286+
<Typography variant="body2" color="text.secondary" sx={{ ml: 2 }}>
287+
<strong>Automatic Remediation:</strong> Immediately reverts unauthorized changes
288+
back to the template configuration
289+
<br /><strong>Manual Remediation:</strong> Sends email notifications for review,
290+
allowing you to accept or deny detected changes
291+
</Typography>
292+
<Typography variant="body2" color="text.secondary">
293+
<strong>Key Features:</strong>
294+
</Typography>
295+
<Typography variant="body2" color="text.secondary" sx={{ ml: 2 }}>
296+
• Monitors all security standards, Conditional Access policies, and Intune policies
297+
<br />
298+
• Detects changes made outside of CIPP
299+
<br />
300+
• Configurable webhook and email notifications
301+
<br />• Granular control over deviation acceptance
302+
</Typography>
303+
</Stack>
304+
) : (
305+
<Stack spacing={2} sx={{ mb: 3 }}>
306+
<Typography variant="body2" color="text.secondary">
307+
Standard templates can be applied to multiple tenants and allow overlapping
308+
configurations with intelligent merging based on specificity and timing.
309+
</Typography>
310+
311+
<Typography variant="body2" color="text.secondary">
312+
<strong>Merge Priority (Specificity):</strong>
313+
</Typography>
314+
<Typography variant="body2" color="text.secondary" sx={{ ml: 2 }}>
315+
1. <strong>Individual Tenant</strong> - Highest priority, overrides all others
316+
<br />
317+
2. <strong>Tenant Group</strong> - Overrides "All Tenants" settings
318+
<br />
319+
3. <strong>All Tenants</strong> - Lowest priority, default baseline
320+
</Typography>
321+
322+
<Typography variant="body2" color="text.secondary">
323+
<strong>Conflict Resolution:</strong>
324+
</Typography>
325+
<Typography variant="body2" color="text.secondary" sx={{ ml: 2 }}>
326+
When multiple standards target the same scope (e.g., two tenant-specific templates),
327+
the most recently created template takes precedence.
328+
</Typography>
329+
330+
<Typography variant="body2" color="text.secondary">
331+
<strong>Example:</strong> An "All Tenants" template enables audit log retention for 90
332+
days, but you need 365 days for one specific tenant. Create a tenant-specific template
333+
with 365-day retention - it will override the global setting for that tenant only.
334+
</Typography>
335+
</Stack>
336+
)}
337+
<Divider />
274338
<Stack spacing={2}>
275339
{/* Hidden field to mark drift templates */}
276340
{isDriftMode && (
@@ -333,15 +397,15 @@ const CippStandardsSideBar = ({
333397
name="driftAlertWebhook"
334398
label="Drift Alert Webhook"
335399
formControl={formControl}
336-
placeholder="Enter webhook URL for drift alerts"
400+
placeholder="Enter webhook URL for drift alerts. Leave blank to use the default webhook URL."
337401
fullWidth
338402
/>
339403
<CippFormComponent
340404
type="textField"
341405
name="driftAlertEmail"
342406
label="Drift Alert Email"
343407
formControl={formControl}
344-
placeholder="Enter email address for drift alerts"
408+
placeholder="Enter email address for drift alerts. Leave blank to use the default email address."
345409
fullWidth
346410
/>
347411
</>
@@ -431,7 +495,7 @@ const CippStandardsSideBar = ({
431495
title="Add Standard"
432496
api={{
433497
confirmText: isDriftMode
434-
? "This template will only run after assigning it through the Drift Template setup wizard"
498+
? "This template will automatically run every 3 hours to detect drift. Are you sure you want to apply this Drift Template?"
435499
: watchForm.runManually
436500
? "Are you sure you want to apply this standard? This template has been set to never run on a schedule. After saving the template you will have to run it manually."
437501
: "Are you sure you want to apply this standard? This will apply the template and run every 3 hours.",

0 commit comments

Comments
 (0)