Interface ISoDEvaluator
- Namespace
- Excalibur.A3.Governance.SeparationOfDuties
- Assembly
- Excalibur.A3.Governance.Abstractions.dll
Evaluates a user's grants against Separation of Duties policies to detect conflicts.
public interface ISoDEvaluator
Remarks
Supports two modes: current evaluation (check existing grants) and hypothetical evaluation (check whether adding a proposed grant would create a conflict).
Methods
EvaluateCurrentAsync(string, CancellationToken)
Evaluates a user's current grants against all SoD policies.
Task<IReadOnlyList<SoDConflict>> EvaluateCurrentAsync(string userId, CancellationToken cancellationToken)
Parameters
userIdstringThe user to evaluate.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IReadOnlyList<SoDConflict>>
A list of detected SoD conflicts. Empty if no conflicts found.
EvaluateHypotheticalAsync(string, string, string, CancellationToken)
Evaluates whether adding a proposed grant would create any SoD conflicts.
Task<IReadOnlyList<SoDConflict>> EvaluateHypotheticalAsync(string userId, string proposedScope, string proposedGrantType, CancellationToken cancellationToken)
Parameters
userIdstringThe user to evaluate.
proposedScopestringThe proposed grant scope (role name or activity name).
proposedGrantTypestringThe proposed grant type (e.g., Activity, ActivityGroup, Role) used to determine which policy scope the proposed scope should be checked against.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IReadOnlyList<SoDConflict>>
A list of SoD conflicts that would result from the proposed grant. Empty if no conflicts.
GetService(Type)
Gets a sub-interface or service from this evaluator.
object? GetService(Type serviceType)
Parameters
serviceTypeTypeThe type of service to retrieve.