Skip to content

fix: Synchronize environment access on SSO role updates BED-9921 - #3656

Draft
justin-prime1 wants to merge 2 commits into
mainfrom
POC_BED-9921-sso-etac
Draft

justin-prime1 wants to merge 2 commits into
mainfrom
POC_BED-9921-sso-etac

Conversation

@justin-prime1

@justin-prime1 justin-prime1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Recalculate the ETAC all-environments flag when SAML/OIDC provisioning changes a user's role, using the same rules as account creation. Preserve manual access when the role is unchanged or role provisioning is disabled.

Sister PR: https://github.com/SpecterOps/bloodhound-enterprise/pull/2400

  • Both PRs must be ready before merging. Merge this PR first, then update the Enterprise pin to the merged revision.

Motivation and Context

Resolves BED-9921

Previously, promoted users could remain restricted and demoted users could retain broader environment access.

How Has This Been Tested?

Passed:

go test ./cmd/api/src/api/v2/auth -count=1

Rollback: revert the code; persisted access flags require review.

Screenshots (optional):

N/A — backend change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have met the contributing prerequisites
  • I have ensured that related documentation is up-to-date
    • Open API docs
    • Code comments (GoDocs / JSDocs)
  • I have followed proper test practices
    • Added/updated tests to cover my changes
    • All new and existing tests passed

@justin-prime1 justin-prime1 added bug Something isn't working go Pull requests that update go code labels Nov 7, 2026
@justin-prime1 justin-prime1 self-assigned this Nov 7, 2026
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant