feat(auth): 0.5.0 passwordless group lookup ILdapGroupLookup (ScadaBridge#46)
ILdapGroupLookup.GetUserGroupsAsync(username, ct) re-reads a known user's groups with the service account: same extraction, canonicalisation, endpoint walk (FallbackServers), timeouts and TLS policy as AuthenticateAsync, via one shared WalkEndpoints<T>. Explicit statuses: Found, UserNotFound, UserDisabled (AD userAccountControl), AmbiguousUser, DirectoryUnavailable, NotSupported (BindMode=User / no service account / foreign ILdapAuthService), ProviderDisabled. AddZbLdapAuth registers it as the same singleton. 0.5.0 is the first published version carrying 0.4.2-0.4.4; scadaproj#51 was live-verified against the NAM AD (24/24, identity check mutation-proven). Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
This commit is contained in:
@@ -70,6 +70,13 @@ public interface ILdapAuthService { // §2
|
||||
Task<LdapAuthResult> AuthenticateAsync(string username, string password, CancellationToken ct);
|
||||
}
|
||||
|
||||
// 0.5.0 — passwordless re-read of a known user's groups (service account; NotSupported in BindMode=User).
|
||||
public interface ILdapGroupLookup {
|
||||
Task<LdapGroupLookupResult> GetUserGroupsAsync(string username, CancellationToken ct);
|
||||
}
|
||||
public sealed record LdapGroupLookupResult(LdapGroupLookupStatus Status, string Username, string DisplayName, IReadOnlyList<string> Groups);
|
||||
public enum LdapGroupLookupStatus { Found, UserNotFound, UserDisabled, AmbiguousUser, DirectoryUnavailable, NotSupported, ProviderDisabled }
|
||||
|
||||
public enum CanonicalRole { Viewer, Operator, Engineer, Designer, Deployer, Administrator } // ../spec/CANONICAL-ROLES.md
|
||||
|
||||
public interface IGroupRoleMapper<TRole> { // §3 — TRole defaults to CanonicalRole; backing store stays per-project
|
||||
|
||||
Reference in New Issue
Block a user