Limit reversible password storage to SGU accounts

This commit is contained in:
alexrg committed 2026-09-29 11:35:27 -06:00
1 parent 843a1956d6
commit 80baae1b54
13 files changed
+139 -34

No files matched your search

+8 -5
View File
@@ -68,15 +68,18 @@ that same password directly to ADSI `SetPassword`. This is an idempotent UPSERT
performed on every successful sign-in, so the next sign-in after an institutional
password change updates AD before Windows validates the interactive logon. If
SGU explicitly rejects the credential, the provider stops without trying AD.
If SGO accepts it but AD synchronization fails, the provider reports that
failure without trying a stale AD verifier. Only a genuine broker/SGO outage
If SGU accepts it but AD synchronization fails, the provider reports that
failure without trying a stale AD verifier. Only a genuine broker/SGU outage
uses the documented Windows cached-domain-credential fallback, for an existing
account. A matching username pattern alone never provisions an account.
The domain bootstrap creates a fine-grained password policy for the three SGU
role security groups. It allows the broker to record the exact password SGO
accepted, even when the normal domain complexity policy would reject it. It
does not relax password requirements for other domain accounts.
role security groups. It allows the broker to record the exact password SGU
accepted, including reversible storage, even when the normal domain complexity
policy would reject it. The domain default remains unchanged; per-user reversible
storage is enabled only for members of those three groups. AD rewrites an existing
password in reversible form only when the broker sets it after a successful SGU
sign-in. Do not apply the setting to unrelated domain accounts.
Before an account becomes usable, the broker applies explicit deny ACEs for the
Active Directory `Change Password` extended right to SELF and Everyone. Users
+6 -6
View File
@@ -1,19 +1,19 @@
# v0.6.19 — SGO password authority
# v0.6.19 — SGU password authority
- Add a fine-grained Active Directory password policy scoped to the three
`SGU-*` role groups. A password accepted by SGO is stored unchanged in AD,
`SGU-*` role groups. A password accepted by SGU is stored unchanged in AD,
including short passwords that the default domain complexity policy rejects.
Other domain accounts keep their existing policy.
- Apply and verify this policy during server bootstrap. Existing SGU accounts
receive it through their role-group membership.
- Stop institutional login immediately when SGO explicitly rejects a password.
When SGO accepts it but AD synchronization fails, show a distinct error
- Stop institutional login immediately when SGU explicitly rejects a password.
When SGU accepts it but AD synchronization fails, show a distinct error
instead of trying an older AD password.
- Preserve the documented cached-domain fallback only while the broker or SGO
- Preserve the documented cached-domain fallback only while the broker or SGU
is genuinely unavailable.
Operational validation: on the domain controller, disposable users in each of
`SGU-Alumnos`, `SGU-Administrativos`, and `SGU-Docentes` accepted a three-character
password and were removed after the test. The three originally reported
accounts still require a real SGO sign-in to finish AD provisioning; no student
accounts still require a real SGU sign-in to finish AD provisioning; no student
password was requested or stored for testing.
+20
View File
@@ -0,0 +1,20 @@
# v0.6.20 — SGU-scoped reversible password storage
- Enable reversible password storage only for members of the three SGU role
groups (`SGU-Alumnos`, `SGU-Administrativos`, and `SGU-Docentes`). The
domain-wide default password policy remains unchanged.
- Before synchronizing a valid Acceso SGU login, the broker enables the
per-account AD flag and then writes the exact SGU-accepted password. Existing
role-group members are repaired by server bootstrap and the password-policy
deployment script.
- Add structured broker event 1306 when the per-account setting is enabled.
- Document that reversible storage allows a privileged directory-data reader to
recover the original password, and that existing passwords are rewritten only
after their next successful SGU password synchronization.
- Correct references that called the institutional system “SGO”; the product is
SGU.
The setting is intentionally limited to the SGU-managed role groups. Do not
apply it to unrelated domain users. Existing SGU accounts need a successful
Acceso SGU sign-in (or another authorized password reset) before their currently
stored password is rewritten using reversible encryption.
+18 -10
View File
@@ -21,11 +21,19 @@ the same source list. RDP uses a separate allowlist. See
- The `SGU - Institutional password authority` fine-grained AD password policy
applies only to the global security groups `SGU-Alumnos`,
`SGU-Administrativos`, and `SGU-Docentes`. It disables AD complexity,
history, and password age requirements and permits passwords from one
character onward so a password accepted by SGO is never altered or rejected
by AD. The default domain password policy remains unchanged. The group is
assigned before `SetPassword` for newly created users. Bootstrap reapplies
the policy via `Set-SguInstitutionalPasswordPolicy.ps1`.
history, and password age requirements, permits passwords from one character
onward, and enables reversible password storage so passwords accepted by SGU
can be recorded unchanged by AD. The default domain password policy remains
unchanged for non-SGU accounts. The broker sets the per-user reversible-storage
flag before each `SetPassword`; bootstrap repairs existing role-group members
and reapplies the policy via `Set-SguInstitutionalPasswordPolicy.ps1`.
- Reversible password storage is a significant security reduction: a domain
controller stores a decryptable password representation. A privileged attacker
or administrator who obtains the relevant directory data can recover the
original password. This is limited to accounts in the three SGU role groups;
existing password values are converted only when SGU next resets them (normally
on a successful Acceso SGU sign-in). Do not enable this for unrelated domain
accounts.
- Managed `Usuarios-SGU` accounts deny the SELF and Everyone `Change Password`
extended right. Only an administrator or the broker through the separate
`Reset Password` right can replace the AD password.
@@ -98,21 +106,21 @@ Use an enterprise CA with revocation checking in production.
The provider distinguishes an SGU rejection from unavailable infrastructure:
- `400`/`401`: do not create or update the account and do not submit a Windows
credential. An explicit SGO rejection is authoritative, including when an
credential. An explicit SGU rejection is authoritative, including when an
older AD password still exists.
- `DIRECTORY_SYNCHRONIZATION_FAILED`: SGO accepted the password but AD did not
- `DIRECTORY_SYNCHRONIZATION_FAILED`: SGU accepted the password but AD did not
record it. Show a specific error and do not attempt Windows logon against a
potentially stale AD verifier.
- timeout, TLS/connectivity error, `429`, or `5xx`: submit the unchanged
credential to Windows only for a genuine broker/SGO outage. Windows must still
credential to Windows only for a genuine broker/SGU outage. Windows must still
validate it against AD or its cached domain verifier, so this does not grant
access without a domain credential. This continuity path can accept a
last-known AD password while SGO is unreachable; decide explicitly whether
last-known AD password while SGU is unreachable; decide explicitly whether
that availability trade-off is appropriate for each deployment.
- usernames that do not match the institutional key format go directly to
Windows and are never sent to SGU or provisioned by the broker.
Allowing an SGO-accepted three-character password also allows that short
Allowing an SGU-accepted three-character password also allows that short
password at the native AD logon surface. Broker rate limiting does not protect
direct AD authentication; domain network exposure and monitoring therefore
remain essential. The policy cannot make a weak upstream password strong.