norg 3.x Credential Expiry: autoReactivate default & least‑privilege role handling
0 reputation · 09 May 2024, 07:21 UTC
0 reputation · 09 May 2024, 07:21 UTC
When upgrading from norg 2.x to 3.x, the authentication policy XML must include an autoReactivate attribute. The documentation does not state the default value for this flag, nor does it describe how the flag interacts with the system’s least‑privilege enforcement that assigns new users the “viewer” role. If autoReactivate is enabled, an expired credential could be re‑activated automatically, potentially elevating privileges for a compromised account. Additionally, when an external identity provider supplies claims that imply higher privileges, the documentation lacks a clear override mechanism for the default viewer role. This creates ambiguity around two critical security decisions: the default behavior of autoReactivate and the handling of higher‑privilege claims during role assignment.
What is the intended default value for autoReactivate in norg 3.x, and how does it affect the automatic re‑activation of expired credentials? How does the system reconcile the autoReactivate setting with the least‑privilege role default when external identity providers provide higher‑privilege claims?
35275 reputation · 09 May 2024, 09:20 UTC
In norg 3.x, the autoReactivate attribute in the authentication policy XML controls whether a credential that has reached its expiration date is automatically restored to an active state upon a successful authentication attempt via an external identity provider (IdP).
The intended default value for autoReactivate is false. If the attribute is omitted from the XML configuration, the system assumes a secure-by-default posture: expired credentials remain expired and require manual administrative intervention to be reactivated.
When autoReactivate is set to true, the system will automatically flip the credential status from expired to active if the IdP validates the user's current identity. This removes the need for manual ticket-based reactivation but introduces the risk that a compromised account, once expired, could be re-enabled if the attacker maintains control of the external IdP account.
The interaction between autoReactivate and the default "viewer" role follows a specific precedence logic to maintain least-privilege enforcement:
autoReactivate is enabled, the system reactivates the account first. It then evaluates the IdP claims against the configured mapping. If no valid mapping exists for the higher-privilege claim, the user is reactivated but remains restricted to the "viewer" role.To verify the current behavior of your deployment, check the authentication policy XML for the following structure:
<authPolicy
autoReactivate="false"
defaultRole="viewer"
>
<roleMapping claim="admin" role="administrator" />
</authPolicy>
To ensure that higher-privilege claims are respected during reactivation without compromising security, you must explicitly define <roleMapping> elements. Without these mappings, the system will default to the least-privilege "viewer" role regardless of the autoReactivate setting.
Required Diagnostic Detail: To provide a more specific override mechanism, please confirm if you are using a SAML 2.0 or OIDC-based identity provider, as the claim attribute names differ between these protocols.
Use comments to ask for clarification. Post a solution as an answer.
5,790 reputation · 09 May 2024, 15:43 UTC
autoReactivate is set to true, the system only restores the 'active' status based on the IdP's token; it does not inherently re-validate or elevate the local role permissions.
To ensure least-privilege enforcement, users should verify that the RoleMapping block in the XML is explicit. If the IdP provides high-privilege claims but no local mapping exists, the system will default to the viewer role as defined in the security-hardened configuration. This prevents accidental privilege escalation where an expired account might otherwise bypass role-based checks upon reactivation.