Skip to content

feat(jit-admin): exclude created user from all CA policies (AllTenants templates) - #581

Open
sfaxluke wants to merge 6 commits into
CyberDrain:devfrom
sfaxluke:claude/jit-vacation-mode-all-ca-policies
Open

sfaxluke wants to merge 6 commits into
CyberDrain:devfrom
sfaxluke:claude/jit-vacation-mode-all-ca-policies

Conversation

@sfaxluke

@sfaxluke sfaxluke commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #579 — this branch is built directly on top of claude/jit-vacation-mode-2f61a8, so this diff includes #579's commits until that one merges. Please review only the additional commits on top of #579; this PR should not be merged before #579.

  • Adds an opt-in "exclude from all CA policies in the tenant" option, usable only when creating a new user (userAction: 'create') — either directly on the JIT Admin apply form, or as a default on an AllTenants JIT Admin Template, where hand-picking specific policies isn't possible since the template isn't scoped to one tenant
  • This is a meaningfully broader action than the hand-picked CA policy exclusion in feat(jit-admin): add vacation mode to JIT admin and templates #579 (excludes from every policy in the resolved tenant, not a chosen subset), so it's proposed as a separate, independently rejectable follow-up

Fixes #580

Test plan

  • Create an AllTenants JIT Admin Template, enable Vacation Mode, confirm only the "Exclude from all CA policies" + audit-alert toggles are offered (no per-policy picker)
  • Apply that template on the JIT Admin form for a real tenant, confirm the created user is scheduled for exclusion from every CA policy in that tenant (not just a subset)
  • Confirm the warning Alert is shown wherever this option is exposed
  • Confirm the specific-policy picker (existing-user flow) is unaffected and still requires hand-picked policies
  • Confirm a non-AllTenants template does not expose this option

sfaxluke and others added 6 commits September 11, 2026 16:52
Adds an optional "Vacation Mode" toggle to the JIT Admin apply form
(existing users only) and JIT Admin Templates, which schedules the
existing CA policy / location-based audit alert exclusion for the
same window as the JIT admin access, plus a 1 hour buffer. Reuses the
existing ExecCAExclusion and ExecScheduleAuditExclusionVacation
endpoints; only the JIT admin template storage needed backend changes
to persist the new defaults.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…mode-2f61a8

# Conflicts:
#	frontend/src/pages/identity/administration/jit-admin/add.jsx
- Regenerate backend/Config/openapi.json (build/tools/build-openapi.ps1)
  to pick up the new JIT Admin Template vacation-mode fields; the
  "Validate and check for drift" check flagged it as stale.
- Invoke-AddUser.Tests.ps1 predates the single-tenant guard merged in
  from upstream dev (commit c8d3845), which calls Get-Tenants without
  a stub/mock in this test file, failing every test with
  CommandNotFoundException. Add the missing Get-Tenants stub and mock.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dev advanced again (Invoke-ListSignIns deprecation notice) while this
branch's CI fixes were in flight, so the committed spec drifted again
relative to the PR's merge preview. Re-ran build/tools/build-openapi.ps1
after merging upstream/dev.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…(AllTenants templates)

Stacked on top of the base vacation-mode feature (CyberDrain#579). Adds an
opt-in "exclude from all CA policies in the tenant" option, usable
only when creating a new user (userAction 'create') - either directly
on the JIT Admin apply form, or as a default on an AllTenants JIT
Admin Template, where hand-picking specific policies isn't possible
since the template isn't scoped to one tenant.

This is a meaningfully broader action than the existing hand-picked
CA policy exclusion (it excludes from every policy in the resolved
tenant, not a chosen subset), so it's being proposed as a separate,
independently rejectable follow-up rather than folded into the base
PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant