Skip to content

Commit 2b2c406

Browse files
authored
Merge pull request #2 from PowerShell/staging
sync with master
2 parents 36b82e0 + 1941e11 commit 2b2c406

File tree

8 files changed

+70
-86
lines changed

8 files changed

+70
-86
lines changed

dsc/configDataCredentials.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ configuration unencryptedPasswordDemo
8080
Ensure = "Present"
8181
MembersToInclude = "User1"
8282
}
83-
8483
}
8584
86-
8785
Node "TestMachine2"
8886
{
8987
# Now we'll use a node-specific password to this machine
@@ -110,7 +108,6 @@ configuration unencryptedPasswordDemo
110108
Ensure = "Present"
111109
MembersToInclude = "User2"
112110
}
113-
114111
}
115112
116113
}
@@ -158,7 +155,8 @@ This example uses a [Group](https://msdn.microsoft.com/en-us/powershell/dsc/grou
158155
It can create local groups and add or remove members.
159156
It accepts both the `Credential` property and the automatic `PsDscRunAsCredential` property.
160157
However, the resource only uses the `Credential` property.
161-
Read more about `PsDscRunAsCredential` in the [WMF Release Notes](https://msdn.microsoft.com/en-us/powershell/wmf/dsc_runas).
158+
159+
For more information about the `PsDscRunAsCredential` property, see [Running DSC with user credentials](runAsUser.md).
162160

163161
## Example: The Group resource Credential property
164162

dsc/pullServer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ In order to make setting up, validating and managing the pull server easier, the
183183
Publish-DSCModuleAndMof -Source C:\LocalDepot -Force
184184
```
185185

186-
1. A script that validates the Pull Server is configured correctly. [PullServerSetupTests.ps1](https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/Examples/PullServerDeploymentVerificationTest/PullServerSetupTests.ps1).
186+
1. A script that validates the Pull Server is configured correctly. [PullServerSetupTests.ps1](https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCPullServerSetup/PullServerDeploymentVerificationTest/PullServerSetupTests.ps1).
187187

188188

189189
## Pull client configuration

jea/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
manager: carmonm
3+
ms.topic: article
4+
author: rpsqrd
5+
ms.author: ryanpu
6+
ms.prod: powershell
7+
keywords: powershell,cmdlet,jea
8+
ms.date: 2017-03-06
9+
title: Just Enough Administration
10+
ms.technology: powershell
11+
redirect_url: https://msdn.microsoft.com/powershell/jea/overview
12+
---

jea/overview.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
2-
description:
3-
manager: dongill
2+
manager: carmonm
43
ms.topic: article
54
author: rpsqrd
65
ms.author: ryanpu
76
ms.prod: powershell
87
keywords: powershell,cmdlet,jea
9-
ms.date: 2016-12-05
8+
ms.date: 2017-03-07
109
title: Overview of Just Enough Administration
1110
ms.technology: powershell
1211
---
@@ -16,7 +15,7 @@ ms.technology: powershell
1615
Just Enough Administration (JEA) is a security technology that enables delegated administration for anything that can be managed with PowerShell.
1716
With JEA, you can:
1817

19-
- **Reduce the number of administrators on your machines** by leveraging virtual accounts that perform privileged actions on behalf of regular users.
18+
- **Reduce the number of administrators on your machines** by leveraging virtual accounts or group managed service accounts that perform privileged actions on behalf of regular users.
2019
- **Limit what users can do** by specifying which cmdlets, functions, and external commands they can run.
2120
- **Better understand what your users are doing** with transcripts and logs that show you exactly which commands a user executed during their session.
2221

@@ -49,4 +48,8 @@ To learn more about the requirements to use JEA and to learn how to create, use,
4948
- [Registering JEA](register-jea.md) - create a JEA endpoint and make it available for users to connect to.
5049
- [Using JEA](using-jea.md) - learn the various ways you can use JEA.
5150
- [Security Considerations](security-considerations.md) - review security best practices and implications of JEA configuration options.
52-
- [Audit and Report on JEA](audit-and-report.md) - learn how to audit and report on JEA endpoints.
51+
- [Audit and Report on JEA](audit-and-report.md) - learn how to audit and report on JEA endpoints.
52+
53+
## Samples and DSC resource
54+
55+
Sample JEA configurations and the JEA DSC resource can be found in the [JEA GitHub repository](https://github.com/PowerShell/JEA).

jea/prerequisites.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: rpsqrd
55
ms.author: ryanpu
66
ms.prod: powershell
77
keywords: powershell,cmdlet,jea
8-
ms.date: 2016-12-05
8+
ms.date: 2017-03-07
99
title: JEA Prerequisites
1010
ms.technology: powershell
1111
---
@@ -18,6 +18,7 @@ Just Enough Administration is a feature included with Windows PowerShell 5.0 and
1818
This topic describes the prerequisites that must be satisfied in order to start using JEA.
1919

2020
## Install JEA
21+
2122
JEA is available with Windows PowerShell 5.0 and higher, but for full functionality it is recommended that you install the latest version of PowerShell available for your system.
2223
The following table describes JEA's availability on Windows Server:
2324

@@ -44,6 +45,7 @@ To get support for these features, update Windows to version 1607 (Anniversary U
4445
<sup>2</sup> JEA cannot be configured to use virtual accounts on Windows 7.
4546

4647
### Check which version of PowerShell is installed
48+
4749
To check which version of PowerShell is installed on your system, check the `$PSVersionTable` variable in a Windows PowerShell prompt.
4850

4951
```powershell
@@ -58,6 +60,7 @@ You are ready to use JEA if the *Major* version is equal to or greater than **5*
5860
For the best experience, and to have access to all the latest features, it is recommended that you upgrade to PowerShell version **5.1** when possible.
5961

6062
### Install Windows Management Framework
63+
6164
If you are running an older version of PowerShell, you will need to update your system with the latest Windows Management Framework (WMF) update.
6265
Update packages and a link to the latest WMF release notes are available in the [Download Center](https://aka.ms/WMF5).
6366

@@ -66,6 +69,7 @@ It is strongly recommended that you test your workload's compatibility with WMF
6669
Windows 10 users should install the latest feature updates to obtain the current version of Windows PowerShell.
6770

6871
## Enable PowerShell Remoting
72+
6973
PowerShell Remoting provides the foundation on which JEA is built.
7074
It is therefore necessary to ensure PowerShell Remoting is enabled and [properly secured](https://msdn.microsoft.com/en-us/powershell/scripting/setup/winrmsecurity) on your system before you can use JEA.
7175

@@ -77,6 +81,7 @@ Enable-PSRemoting
7781
```
7882

7983
## Enable PowerShell module and script block logging (optional)
84+
8085
The following steps enable logging for all PowerShell actions on your system.
8186
PowerShell Module Logging is not required for JEA, however it is strongly recommended that you turn it on to ensure the commands users run are logged in a central location.
8287

@@ -102,5 +107,6 @@ You can also enable system-wide PowerShell transcription through Group Policy.
102107
- [Create a session configuration file](session-configurations.md)
103108

104109
## See also
110+
105111
- [Additional information about PowerShell Remoting and WinRM security](https://msdn.microsoft.com/en-us/powershell/scripting/setup/winrmsecurity)
106112
- [*PowerShell ♥ the Blue Team* blog post on security](https://blogs.msdn.microsoft.com/powershell/2015/06/09/powershell-the-blue-team/)

jea/role-capabilities.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: rpsqrd
55
ms.author: ryanpu
66
ms.prod: powershell
77
keywords: powershell,cmdlet,jea
8-
ms.date: 2016-12-05
8+
ms.date: 2017-03-07
99
title: JEA Role Capabilities
1010
ms.technology: powershell
1111
---
@@ -234,7 +234,6 @@ The most complex merge logic affects cmdlets and functions, which can have their
234234

235235
The rules are as follows:
236236

237-
238237
1. If a cmdlet is only made visible in one role, it will be visible to the user with any applicable parameter constraints.
239238
2. If a cmdlet is made visible in more than one role, and each role has the same constraints on the cmdlet, the cmdlet will be visible to the user with those constraints.
240239
3. If a cmdlet is made visible in more than one role, and each role allows a different set of parameters, the cmdlet and all of the parameters defined across every role will be visible to the user. If one role doesn't have constraints on the parameters, all parameters will be allowed.
@@ -243,19 +242,29 @@ The rules are as follows:
243242
6. If a validate pattern is defined for the same cmdlet parameter in more than one role, any values that match any of the patterns will be allowed.
244243
7. If a validate set is defined in one or more roles, and a validate pattern is defined in another role for the same cmdlet parameter, the validate set is ignored and rule (6) applies to the remaining validate patterns.
245244

246-
The table below shows some examples of this logic in practice using two roles, A and B, which are both assigned to a user in a JEA session.
247-
248-
Rule | Role A VisibleCmdlets | Role B VisibleCmdlets | Effective user permissions
249-
-----|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|----------------------------
250-
1 | `Get-Service` | N/A | `Get-Service`
251-
1 | N/A | `Get-Service` | `Get-Service`
252-
2 | `Get-Service` | `Get-Service` | `Get-Service`
253-
3 | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName' }}` | `Get-Service` | `Get-Service`
254-
3 | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'Name' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName' }, @{ Name = 'Name' }}`
255-
4 | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DNS Client' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName' }}`
256-
5 | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DNS Client' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DHCP Client' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DNS Client', 'DHCP Client' }}`
257-
6 | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidatePattern = 'DNS.*' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidatePattern = 'contoso.*' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidatePattern = '(DNS.*)\|(contoso.*)' }}`
258-
7 | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DNS Client' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidatePattern = 'contoso.*' }}` | `@{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidatePattern = '(DNS.*)\|(contoso.*)' }}`
245+
Below is an example of how roles are merged according to these rules:
246+
247+
```powershell
248+
# Role A Visible Cmdlets
249+
$roleA = @{
250+
VisibleCmdlets = 'Get-Service',
251+
@{ Name = 'Restart-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DNS Client' } }
252+
}
253+
254+
# Role B Visible Cmdlets
255+
$roleB = @{
256+
VisibleCmdlets = @{ Name = 'Get-Service'; Parameters = @{ Name = 'DisplayName'; ValidatePattern = 'DNS.*' } },
257+
@{ Name = 'Restart-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DNS Server' } }
258+
}
259+
260+
# Resulting permisisons for a user who belongs to both role A and B
261+
# - The constraint in role B for the DisplayName parameter on Get-Service is ignored becuase of rule #4
262+
# - The ValidateSets for Restart-Service are merged because both roles use ValidateSet on the same parameter per rule #5
263+
$mergedAandB = @{
264+
VisibleCmdlets = 'Get-Service',
265+
@{ Name = 'Restart-Service'; Parameters = @{ Name = 'DisplayName'; ValidateSet = 'DNS Client', 'DNS Server' } }
266+
}
267+
```
259268

260269

261270

jea/security-considerations.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: rpsqrd
55
ms.author: ryanpu
66
ms.prod: powershell
77
keywords: powershell,cmdlet,jea
8-
ms.date: 2016-12-05
8+
ms.date: 2017-03-07
99
title: JEA Security Considerations
1010
ms.technology: powershell
1111
---
@@ -33,12 +33,11 @@ The connecting user does not know the credentials for the virtual account and ca
3333

3434
By default, virtual accounts belong to the local administrators group on the machine.
3535
This gives them full rights to manage anything on the system, but no rights to manage resources on the network.
36-
When authenticating with other machines, the user context will be the local computer account, not the virtual account.
36+
When authenticating with other machines, the user context will be that of the local computer account, not the virtual account.
3737

38-
On an Active Directory Domain Controller, virtual accounts get *domain admin* privileges by default.
39-
This is due to the fact that there is no group for local administrators on a domain controller.
40-
Accordingly, virtual accounts on domain controllers are domain accounts and can be used on other machines.
41-
When configuring JEA sessions on a domain controller, you must be careful to avoid exposing commands which could be used to manage other computers on the network.
38+
Domain controllers are a special case since there is no concept of a local administrators group.
39+
Instead, virtual accounts belong to Domain Admins instead and can manage the directory services on the domain controller.
40+
The domain identity is still restricted to use on the domain controller where the JEA session was instantiated, and any network access will appear to come from the domain controller computer object instead.
4241

4342
In both cases, you can also explicitly define which security groups the virtual account should belong to.
4443
This is a good practice when the task you are performing can be done without local/domain admin privileges.
@@ -50,8 +49,8 @@ The table below summarizes the possible configuration options and resulting perm
5049

5150
Computer type | Virtual account group configuration | Local user context | Network user context
5251
-----------------------------|-------------------------------------|---------------------------------------------------------|--------------------------------------------------
53-
Domain controller | Default | Domain user, member of '*DOMAIN*\Domain Admins' | Domain user, member of '*DOMAIN*\Domain Admins'
54-
Domain controller | Domain groups A and B | Domain user, member of '*DOMAIN*\A', '*DOMAIN*\B' | Domain user, member of '*DOMAIN*\A', '*DOMAIN*\B'
52+
Domain controller | Default | Domain user, member of '*DOMAIN*\Domain Admins' | Computer account
53+
Domain controller | Domain groups A and B | Domain user, member of '*DOMAIN*\A', '*DOMAIN*\B' | Computer account
5554
Member server or workstation | Default | Local user, member of '*BUILTIN*\Administrators' | Computer account
5655
Member server or workstation | Local groups C and D | Local user, member of '*COMPUTER*\C' and '*COMPUTER*\D' | Computer account
5756

@@ -70,9 +69,8 @@ The effective permissions of the gMSA are defined by the security groups (local
7069
When a JEA endpoint is configured to use a gMSA account, the actions of all JEA users will appear to come from the same group managed service account.
7170
The only way you can trace actions back to a specific user is to identify the set of commands run in a PowerShell session transcript.
7271

73-
**Pass-thru credentials**
74-
If you do not specify a run as account, PowerShell will use the connecting user's credential to run commands on the remote server.
75-
This configuration is not recommended for JEA as it would require you to grant the connecting user direct access to privileged management groups.
72+
**Pass-thru credentials** are used when you do not speicfy a run as account and want PowerShell to use the connecting user's credential to run commands on the remote server.
73+
This configuration is *not* recommended for JEA as it would require you to grant the connecting user direct access to privileged management groups.
7674
If the connecting user already has admin privileges, they can avoid JEA altogether and manage the system via other, unconstrained means.
7775
See the section below on how [JEA does not protect against admins](#jea-does-not-protect-against-admins) for more information.
7876

0 commit comments

Comments
 (0)