V dnešnom Obráťte sa na správcu, Ja vám ukážem, ako dočasne pridať užívateľa do skupiny Active Directory.
Model správy Just-in-time (JIT) bola zavedená v systéme Windows Server 2016 a umožňuje systémovým administrátorom udeliť používateľom práva na obmedzenú dobu. Pridávanie do PowerShell Just-Enough-Administration (JEA), which restricts users to a pre-defined list of cmdlets, parameters, and modules in a PowerShell session, the JIT model has two objectives. The first is to prevent privilege creep where users are granted elevated privileges for much longer than necessary or indefinitely. And secondly, to avoid permanently assigning privileges that might only be required for short periods of time.
The ability to add users to groups with a time-to-live (TTL) value is a feature of the JIT model. This can be useful in scenarios where you do not have the resources to set up Microsoft’s recommended infrastructure for JIT administration but would still like to benefit from short-lived Active Directory (AD) group membership.
For more information on PAM in Windows Server 2016 and Microsoft’s recommendations for implementing JIT administration, Pozrite si Windows Server vNext Privileged Access Management na Petri IT znalostí.
Use Short-Lived Active Directory Group Membership
I am not going to show you how to set up a Privileged Identity Management (PIM) trust or how to configure Shadow Principals but just how to add users to AD groups and have them automatically removed after some time.
Add an Account to an Active Directory Group with a Time-to-Live Value (Image Credit: Russell Smith)
Before you can use short-lived AD groups, you need to enable Privileged Access Management, which is an optional AD feature. The changes made to your domain when you add the PAM feature are irreversible. The PAM feature is designed to be used in bastion domains and not production domains, so you should decide whether you want to add it to your production domain.
Log in to a domain controller using an account that has permission to change the AD schema. Nahradiť ad.contoso.com with the name of the domain you want to update.
Enable-ADOptionalFeature ‘Privileged Access Management Feature’ -Scope ForestOrConfigurationSet -Target ad.contoso.com
Now let’s add an account to the Account Operators group with a TTL of 15 minút. Nahradiť russells with the name of the AD account you want to add to the group.
$Time = New-TimeSpan -Minutes 15 Add-ADGroupMember -Identity ‘Account Operators’ -Members russells -MemberTimeToLive $Time
To see whether the account was added, we can use Get-ADGroup to show the group members and their associated TTL values:
Get-ADGroup ‘Account Operators’ -Property member –ShowMemberTimeToLive
Všimnite si, že member property of the returned object shows the group members and their TTL values. In my domain, Account Operators only has one member. The TTL value is shown in seconds. If you run Get-ADGroup again after 15 minút, you will see that the user account you added to Account Operators will have been removed.
Be aware that adding an account to special AD groups, like Account Operators, might cause the adminCount attribute for the user account to be changed to 1 if the account is in the group long enough for the AdminSDHolder mechanism to make the account a protected object. When the account is removed from the group, na adminCount attribute remains set to 1.
Post Windows Server 2016: Krátkotrvajúci Active Directory Group Členstvo sa objavil najprv na Petri.