Skip to content

ogar-ad v7: groupType and security-enabled groups; dir-sim plan V19 - #347

Merged
AdaWorldAPI merged 3 commits into
mainfrom
ccr-0455e606-wmtsor
Oct 10, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
ccr-0455e606-wmtsor

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

A group has two independent properties: whether it is security-enabled (it can hold permissions) and whether it is mail-enabled. That gives three kinds in practice: a security group, a mail-enabled security group, and a distribution group. This PR records the first property, which nothing read before, and plans how nested groups expand.

Code: ogar-ad schema v7

  • groupType is read into the last free numeric slot (NUM_SLOTS is 4; slot 3), bit-cast like the other signed LDAP integers. -2147483646 is stored as 0x80000002.
  • New GROUP_TYPE_SECURITY_ENABLED and is_security_enabled(group_type), which read the high bit.
  • A record from an older schema did not read groupType; that is not the same as a cleared bit.
  • Test group_type_is_read_and_says_security:
    • a global security group, a universal distribution group and a universal security group;
    • a record without the attribute;
    • an out-of-range value, which is refused.
  • Disable run: testing the wrong bit turns the test red.

Plan: docs/DIRECTORY-SIMULATION-POC.md

  • V19 (new): security-enabled and mail-enabled are two separate properties. Nested groups are expanded once, in lance-graph, as two closures:

    • delivery walks mail-enabled groups;
    • security walks only groups known to be security-enabled, as an AD token does. A security group nested inside a distribution group gives the distribution group's members no permission.

    An unread security flag, or a group created in a simulated version, is excluded, so it fails closed.

  • V17: a trustee must be a user or a security-enabled group. A grant to a distribution group confers nothing. Exchange Online additionally needs a group trustee to be mail-enabled.

This also carries the V19 plan commit (b331226), which was pushed after #344 had already merged and so never reached main.

Order

The lance-graph side (dir-sim ObservedNode::security, View::members_transitive) reads ogar_ad::is_security_enabled. Its CI checks out OGAR main, so this PR merges first.

Checks

  • cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings pass.
  • cargo test --workspace passes except ogar-from-schema, whose tests need an AdaWorldAPI/OGIT sibling checkout this container does not have. They don't touch ogar-ad.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg


Generated by Claude Code

…ed closures

A group is security-enabled or not and mail-enabled or not, read from
groupType / securityEnabled and mailEnabled / the recipient attributes.
Nested groups are expanded once in lance-graph, as two closures: delivery
walks mail-enabled groups, security walks only security-enabled ones, as
AD's token does. Permissions (V17, V18, RBAC roles) use the security
closure; an unread security flag is excluded and fails closed. V17's
trustee must be a security-enabled group; a grant to a distribution group
confers nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
groupType is read into the last numeric slot, bit-cast like the other
signed LDAP integers. is_security_enabled reads its high bit
(ADS_GROUP_TYPE_SECURITY_ENABLED); mail-enabled stays a separate
question. A record of an older schema did not read it. V19 now matches
the implementation: mail-enabled is a primary SMTP address, and a group
created in a simulated version carries no security flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 67 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 58df2da5-4ce5-43b3-86f8-be513f606e6a

📥 Commits

Reviewing files that changed from the base of the PR and between c7031e7 and 076ca61.


📒 Files selected for processing (3)
  • crates/ogar-ad/src/lib.rs
  • crates/ogar-ad/tests/main.rs
  • docs/DIRECTORY-SIMULATION-POC.md

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 10, 2026 16:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T16:13:14.822833Z 55ac61d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…Behalf source, link scope and expiry

Review findings left open when #344 merged:
- FullAccess and SendAs need a user or a security-enabled group;
  SendOnBehalf also accepts mail-enabled distribution groups and is
  reached through the delivery closure.
- Denies follow Windows canonical ACE order with IsInherited kept; an
  explicit allow outranks an inherited deny; an unreported level is
  treated as explicit.
- SendOnBehalf is read from the GrantSendOnBehalfTo property via
  Get-Mailbox / Get-DistributionGroup / Get-DynamicDistributionGroup.
- SendAs on a distribution group has no impersonation target; the
  consumer refuses it until a group-sending path exists.
- existingAccess links grant nothing; expired grants are refused;
  caller-scoped Graph permission reads never decide others' access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@AdaWorldAPI
AdaWorldAPI merged commit c38ee65 into main Oct 10, 2026
4 checks passed
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.

2 participants