Repository navigation
Description
What is true
During the #449 deliberate-weakness loop (run 2026-10-08, results comment), five of the six weaknesses enabled → verified-present → disabled → verified-absent cleanly. rbcd was the exception: its enable applied, but verify.yml -e weakness_rbcd_state=present failed its assertion:
fatal: [bahamut]: FAILED! => assertion: verify_failed | length == 0
msg: 'bahamut fails: rbcd matches its toggle'
It is a false negative, not a failed enable:
- The enable play reported
changed=2(svc-rbcd created + the trust written). - The subsequent disable reported
changed=2and then a plainverify.ymlpassed — i.e. the disable had a realtitantrust to clear. If the attribute had never been written, the disable would have had nothing to clear.
So the RBCD attribute was set on titan; only the present-check mis-read it.
Where
ansible/verify.yml:296-307 — the rbcd branch reads the computed property and compares DistinguishedNames:
$rp = Get-ADUser -Filter "SamAccountName -eq '$($Weak.rbcd_account)'" ...
$rc = Get-ADComputer -Identity $Weak.rbcd_resource -Properties PrincipalsAllowedToDelegateToAccount ...
$trusted = @($rc.PrincipalsAllowedToDelegateToAccount | ForEach-Object { $_.DistinguishedName })
$bHave = ($trusted -contains $rp.DistinguishedName)
$r['rbcd matches its toggle'] = ($bHave -eq ($Weak.rbcd_state -eq 'present'))Identifiers (ansible/inventory/group_vars/all.yaml:144-146): lab_weakness_rbcd_account: svc-rbcd (a user with an SPN, per the comment there — deliberately not a computer), lab_weakness_rbcd_resource: TITAN.
Likely cause
PrincipalsAllowedToDelegateToAccount is a synthetic property AD derives from the raw msDS-AllowedToActOnBehalfOfOtherIdentity security descriptor by resolving the SIDs in it back to principal objects. The role writes the SD (from svc-rbcd's SID); the check reads it back through this computed view and compares DNs. Two plausible reasons it comes back empty/non-matching here specifically:
- The principal is a user, not a computer.
PrincipalsAllowedToDelegateToAccount's round-trip / DN resolution is reliable for computer principals; a user-with-SPN principal can resolve differently (or not populate the computed list as expected), so the-contains $rp.DistinguishedNamecompare misses even though the SID is present in the SD. - Read timing / DC view immediately after the write under
--limit dc_primary.
The other five weaknesses pass, and the two that touch delegation differently — cd (reads allowedToDelegateTo, a plain attribute) and ucd (reads a UAC flag) — both verify cleanly, which fits a problem specific to the computed PrincipalsAllowedToDelegateToAccount/DN path.
Suggested fix
Verify rbcd the same way it is written: read the raw msDS-AllowedToActOnBehalfOfOtherIdentity SD on titan and test whether it grants svc-rbcd's SID, rather than DN-comparing the computed PrincipalsAllowedToDelegateToAccount. e.g.
$rp = Get-ADUser -Filter "SamAccountName -eq '$($Weak.rbcd_account)'" -Properties objectSid
$sd = (Get-ADComputer -Identity $Weak.rbcd_resource -Properties msDS-AllowedToActOnBehalfOfOtherIdentity).'msDS-AllowedToActOnBehalfOfOtherIdentity'
$bHave = [bool]$sd -and ($sd.Access.IdentityReference -contains $rp.SID) # or compare raw SD bytes / SIDsMatch the exact write the role performs so enable and verify agree.
Done when
- With rbcd enabled,
ansible-playbook verify.yml -e weakness_rbcd_state=presentpasses (rbcd matches its toggleholds) on the live domain. - A plain
verify.ymlstill passes with rbcd disabled (no regression to the absent check).
Refs #449, ADR-0083. Found during the 2026-10-08 weakness loop.
Activity
fix(ansible): count only Allow rules as RBCD trust (#1075)
fix(ansible): read titan's RBCD trust by SID from its security descri…