Skip to content

Commit

Permalink
Merge pull request #41 from PlagueHO/Issue-38
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename module to ActiveDirectoryCSDsc - Fixes #38
  • Loading branch information
PlagueHO authored Mar 23, 2018
2 parents 065e383 + ccd0917 commit bbfc02f
Show file tree
Hide file tree
Showing 26 changed files with 98 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
Your feedback and support is greatly appreciated, thanks for contributing!
Please prefix the issue title with the resource name, i.e. 'xAdcsCertificateAuthority: Short description of my issue'
Please prefix the issue title with the resource name, i.e. 'AdcsCertificateAuthority: Short description of my issue'
Please provide the following information regarding your issue (place N/A if the fields that don't apply to your issue):
-->
**Details of the scenario you tried and the problem that is occurring:**
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!--
Thanks for submitting a Pull Request (PR) to this project. Your contribution to this project is greatly appreciated!
Please prefix the PR title with the resource name, i.e. 'xAdcsCertificateAuthority: My short description'
If this is a breaking change, then also prefix the PR title with 'BREAKING CHANGE:', i.e. 'BREAKING CHANGE: xAdcsCertificateAuthority: My short description'
Please prefix the PR title with the resource name, i.e. 'AdcsCertificateAuthority: My short description'
If this is a breaking change, then also prefix the PR title with 'BREAKING CHANGE:', i.e. 'BREAKING CHANGE: AdcsCertificateAuthority: My short description'
To aid community reviewers in reviewing and merging your PR, please take the time to run through the below checklist.
Change to [x] for each task in the task list that applies to this PR.
Expand Down
4 changes: 2 additions & 2 deletions xAdcsDeployment.psd1 → ActiveDirectoryCSDsc.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource')

# A URL to the license for this module.
LicenseUri = 'https://github.com/PowerShell/xAdcsDeployment/blob/master/LICENSE'
LicenseUri = 'https://github.com/PowerShell/ActiveDirectoryCSDsc/blob/master/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/PowerShell/xAdcsDeployment'
ProjectUri = 'https://github.com/PowerShell/ActiveDirectoryCSDsc'

# A URL to an icon representing this module.
# IconUri = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ $modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot

# Import the ADCS Deployment Resource Helper Module.
Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'AdcsDeploymentDsc.ResourceHelper' `
-ChildPath 'AdcsDeploymentDsc.ResourceHelper.psm1'))
-ChildPath (Join-Path -Path 'ActiveDirectoryCSDsc.ResourceHelper' `
-ChildPath 'ActiveDirectoryCSDsc.ResourceHelper.psm1'))

# Import Localization Strings.
$LocalizedData = Get-LocalizedData `
-ResourceName 'MSFT_xAdcsCertificationAuthority' `
-ResourceName 'MSFT_AdcsCertificationAuthority' `
-ResourcePath (Split-Path -Parent $script:MyInvocation.MyCommand.Path)

<#
Expand Down Expand Up @@ -201,12 +201,12 @@ Function Get-TargetResource
$null = $adcsParameters.Remove('Ensure')
$null = $adcsParameters.Remove('Debug')
$null = $adcsParameters.Remove('ErrorAction')

if ($CertFilePassword)
{
$adcsParameters['CertFilePassword'] = $CertFilePassword.Password
}

try
{
$null = Install-AdcsCertificationAuthority @adcsParameters -WhatIf
Expand Down Expand Up @@ -421,12 +421,12 @@ Function Set-TargetResource
$null = $adcsParameters.Remove('ErrorAction')

$errorMessage = ''

if ($CertFilePassword)
{
$adcsParameters['CertFilePassword'] = $CertFilePassword.Password
}

switch ($Ensure)
{
'Present'
Expand Down Expand Up @@ -647,12 +647,12 @@ Function Test-TargetResource
$null = $adcsParameters.Remove('Ensure')
$null = $adcsParameters.Remove('Debug')
$null = $adcsParameters.Remove('ErrorAction')

if ($CertFilePassword)
{
$adcsParameters['CertFilePassword'] = $CertFilePassword.Password
}

try
{
$null = Install-AdcsCertificationAuthority @adcsParameters -WhatIf
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ClassVersion("0.1.0.0"), FriendlyName("xAdcsCertificationAuthority")]
class MSFT_xAdcsCertificationAuthority : OMI_BaseResource
[ClassVersion("0.1.0.0"), FriendlyName("AdcsCertificationAuthority")]
class MSFT_AdcsCertificationAuthority : OMI_BaseResource
{
[key, Description("Specifies the type of certification authority to install. The possible values are EnterpriseRootCA, EnterpriseSubordinateCA, StandaloneRootCA, or StandaloneSubordinateCA."), ValueMap{"EnterpriseRootCA","EnterpriseSubordinateCA","StandaloneRootCA","StandaloneSubordinateCA"}, Values{"EnterpriseRootCA","EnterpriseSubordinateCA","StandaloneRootCA","StandaloneSubordinateCA"}] String CAType;
[Required, Description("To install an enterprise certification authority, the computer must be joined to an Active Directory Domain Services domain and a user account that is a member of the Enterprise Admin group is required. To install a standalone certification authority, the computer can be in a workgroup or AD DS domain. If the computer is in a workgroup, a user account that is a member of Administrators is required. If the computer is in an AD DS domain, a user account that is a member of Domain Admins is required."), EmbeddedInstance("MSFT_Credential")] String Credential;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Localized resources for MSFT_xAdcsCertificationAuthority
# Localized resources for MSFT_AdcsCertificationAuthority

ConvertFrom-StringData @'
GettingAdcsCAStatusMessage = Getting ADCS {0} Status.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ $modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot

# Import the ADCS Deployment Resource Helper Module.
Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'AdcsDeploymentDsc.ResourceHelper' `
-ChildPath 'AdcsDeploymentDsc.ResourceHelper.psm1'))
-ChildPath (Join-Path -Path 'ActiveDirectoryCSDsc.ResourceHelper' `
-ChildPath 'ActiveDirectoryCSDsc.ResourceHelper.psm1'))

# Import Localization Strings.
$LocalizedData = Get-LocalizedData `
-ResourceName 'MSFT_xAdcsOnlineResponder' `
-ResourceName 'MSFT_AdcsOnlineResponder' `
-ResourcePath (Split-Path -Parent $script:MyInvocation.MyCommand.Path)

<#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[ClassVersion("0.1.0.0"), FriendlyName("xAdcsOnlineResponder")]
class MSFT_xAdcsOnlineResponder : OMI_BaseResource
{
[Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance;
[Required, Description("If the Online Responder service is configured to use Standalone certification authority, then an account that is a member of the local Administrators on the CA is required. If the Online Responder service is configured to use an Enterprise CA, then an account that is a member of Domain Admins is required."), EmbeddedInstance("MSFT_Credential")] String Credential;
[Write, Description("Specifies whether the Online Responder feature should be installed or uninstalled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
};
[ClassVersion("0.1.0.0"), FriendlyName("AdcsOnlineResponder")]
class MSFT_AdcsOnlineResponder : OMI_BaseResource
{
[Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance;
[Required, Description("If the Online Responder service is configured to use Standalone certification authority, then an account that is a member of the local Administrators on the CA is required. If the Online Responder service is configured to use an Enterprise CA, then an account that is a member of Domain Admins is required."), EmbeddedInstance("MSFT_Credential")] String Credential;
[Write, Description("Specifies whether the Online Responder feature should be installed or uninstalled."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Localized resources for MSFT_xAdcsOnlineResponder
# Localized resources for MSFT_AdcsOnlineResponder

ConvertFrom-StringData @'
GettingAdcsOnlineResponderStatusMessage = Getting ADCS Online Responder Status.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ $modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot

# Import the ADCS Deployment Resource Helper Module.
Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'AdcsDeploymentDsc.ResourceHelper' `
-ChildPath 'AdcsDeploymentDsc.ResourceHelper.psm1'))
-ChildPath (Join-Path -Path 'ActiveDirectoryCSDsc.ResourceHelper' `
-ChildPath 'ActiveDirectoryCSDsc.ResourceHelper.psm1'))

# Import Localization Strings.
$LocalizedData = Get-LocalizedData `
-ResourceName 'MSFT_xAdcsWebEnrollment' `
-ResourceName 'MSFT_AdcsWebEnrollment' `
-ResourcePath (Split-Path -Parent $script:MyInvocation.MyCommand.Path)

<#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ClassVersion("0.1.0.0"), FriendlyName("xAdcsWebEnrollment")]
class MSFT_xAdcsWebEnrollment : OMI_BaseResource
[ClassVersion("0.1.0.0"), FriendlyName("AdcsWebEnrollment")]
class MSFT_AdcsWebEnrollment : OMI_BaseResource
{
[Key, Description("Specifies the resource is a single instance, the value must be 'Yes'"), ValueMap{"Yes"}, Values{"Yes"}] String IsSingleInstance;
[Write, Description("CAConfig parameter string. Do not specify this if there is a local CA installed.")] String CAConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Localized resources for MSFT_xAdcsWebEnrollment
# Localized resources for MSFT_AdcsWebEnrollment

ConvertFrom-StringData @'
GettingAdcsWebEnrollmentStatusMessage = Getting ADCS Web Enrollment Status.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Configuration Example
$Credential
)

Import-DscResource -Module xAdcsDeployment
Import-DscResource -Module ActiveDirectoryCSDsc

Node $AllNodes.NodeName
{
Expand All @@ -27,7 +27,7 @@ Configuration Example
Name = 'ADCS-Cert-Authority'
}

xAdcsCertificationAuthority CertificateAuthority
AdcsCertificationAuthority CertificateAuthority
{
Ensure = 'Present'
Credential = $Credential
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Configuration Example
$Credential
)

Import-DscResource -Module xAdcsDeployment
Import-DscResource -Module ActiveDirectoryCSDsc

Node $AllNodes.NodeName
{
xAdcsCertificationAuthority CertificateAuthority
AdcsCertificationAuthority CertificateAuthority
{
Ensure = 'Absent'
Credential = $Credential
Expand All @@ -40,7 +40,7 @@ Configuration Example
{
Ensure = 'Absent'
Name = 'ADCS-Cert-Authority'
DependsOn = '[xADCSCertificationAuthority]CertificateAuthority'
DependsOn = '[AdcsCertificationAuthority]CertificateAuthority'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Configuration Example
$Credential
)

Import-DscResource -Module xAdcsDeployment
Import-DscResource -Module ActiveDirectoryCSDsc

Node $AllNodes.NodeName
{
Expand All @@ -28,7 +28,7 @@ Configuration Example
Name = 'ADCS-Online-Cert'
}

xAdcsOnlineResponder OnlineResponder
AdcsOnlineResponder OnlineResponder
{
Ensure = 'Present'
IsSingleInstance = 'Yes'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Configuration Example
$Credential
)

Import-DscResource -Module xAdcsDeployment
Import-DscResource -Module ActiveDirectoryCSDsc

Node $AllNodes.NodeName
{
Expand All @@ -28,7 +28,7 @@ Configuration Example
Name = 'ADCS-Web-Enrollment'
}

xAdcsWebEnrollment WebEnrollment
AdcsWebEnrollment WebEnrollment
{
Ensure = 'Present'
IsSingleInstance = 'Yes'
Expand Down
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# xAdcsDeployment
# ActiveDirectoryCSDsc

The **xAdcsDeployment** DSC resources have been specifically tested as a method
The **ActiveDirectoryCSDsc** DSC resources have been specifically tested as a method
to populate a Certificate Services server role on Windows Server 2012 R2 and above
after the Certificate Services role and the Web Enrollment feature have been enabled.
Active Directory Certificate Services (AD CS) is used to create certification
Expand All @@ -25,16 +25,16 @@ additional questions or comments.

### master

[![Build status](https://ci.appveyor.com/api/projects/status/2uua9s0qgmfmqqrh/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/xAdcsDeployment/branch/master)
[![codecov](https://codecov.io/gh/PowerShell/xAdcsDeployment/branch/master/graph/badge.svg)](https://codecov.io/gh/PowerShell/xAdcsDeployment/branch/master)
[![Build status](https://ci.appveyor.com/api/projects/status/2uua9s0qgmfmqqrh/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/ActiveDirectoryCSDsc/branch/master)
[![codecov](https://codecov.io/gh/PowerShell/ActiveDirectoryCSDsc/branch/master/graph/badge.svg)](https://codecov.io/gh/PowerShell/ActiveDirectoryCSDsc/branch/master)

This is the branch containing the latest release - no contributions should be made
directly to this branch.

### dev

[![Build status](https://ci.appveyor.com/api/projects/status/2uua9s0qgmfmqqrh/branch/dev?svg=true)](https://ci.appveyor.com/project/PowerShell/xAdcsDeployment/branch/dev)
[![codecov](https://codecov.io/gh/PowerShell/xAdcsDeployment/branch/dev/graph/badge.svg)](https://codecov.io/gh/PowerShell/xAdcsDeployment/branch/dev)
[![Build status](https://ci.appveyor.com/api/projects/status/2uua9s0qgmfmqqrh/branch/dev?svg=true)](https://ci.appveyor.com/project/PowerShell/ActiveDirectoryCSDsc/branch/dev)
[![codecov](https://codecov.io/gh/PowerShell/ActiveDirectoryCSDsc/branch/dev/graph/badge.svg)](https://codecov.io/gh/PowerShell/ActiveDirectoryCSDsc/branch/dev)

This is the development branch to which contributions should be proposed by contributors
as pull requests. This development branch will periodically be merged to the master
Expand All @@ -46,14 +46,14 @@ Please check out common DSC Resources [contributing guidelines](https://github.c

## Resources

- **xAdcsCertificationAuthority**: This resource can be used to install the ADCS
- **AdcsCertificationAuthority**: This resource can be used to install the ADCS
Certificate Authority after the feature has been installed on the server.
- **xAdcsOnlineResponder**: This resource can be used to install an ADCS Online
- **AdcsOnlineResponder**: This resource can be used to install an ADCS Online
Responder after the feature has been installed on the server.
- **xAdcsWebEnrollment**: This resource can be used to install the ADCS Web
- **AdcsWebEnrollment**: This resource can be used to install the ADCS Web
Enrollment service after the feature has been installed on the server.

### xAdcsCertificationAuthority
### AdcsCertificationAuthority

This resource can be used to install the ADCS Certificate Authority after the
feature has been installed on the server.
Expand Down Expand Up @@ -117,12 +117,12 @@ the `ADCS-Cert-Authority` feature has already been installed.
authority certificate. If this is a subordinate CA, do not specify this parameter
because the validity period is determined by the parent CA.

#### xAdcsCertificationAuthority Examples
#### AdcsCertificationAuthority Examples

- [Install enterprise root certificate authority](/Examples/Resources/xAdcsCertificationAuthority/1-InstallCertificationAthority.ps1)
- [Retire certificate authority](/Examples/Resources/xAdcsCertificationAuthority/2-RetireCertificationAthority.ps1)
- [Install enterprise root certificate authority](/Examples/Resources/AdcsCertificationAuthority/1-InstallCertificationAthority.ps1)
- [Retire certificate authority](/Examples/Resources/AdcsCertificationAuthority/2-RetireCertificationAthority.ps1)

### xAdcsOnlineResponder
### AdcsOnlineResponder

This resource can be used to install an ADCS Online Responder after the feature
has been installed on the server.
Expand All @@ -142,11 +142,11 @@ For more information on ADCS Online Responders, see [this article on TechNet](ht
- **`[String]` Ensure** (_Write_): Specifies whether the Online Responder feature
should be installed or uninstalled. { *Present* | Absent }

#### xAdcsOnlineResponder Examples
#### AdcsOnlineResponder Examples

- [Install Online Certificate Status Protocol (OCSP) server](/Examples/Resources/xAdcsWebEnrollment/1-InstallOnlineResponder.ps1)
- [Install Online Certificate Status Protocol (OCSP) server](/Examples/Resources/AdcsWebEnrollment/1-InstallOnlineResponder.ps1)

### xAdcsWebEnrollment
### AdcsWebEnrollment

This resource can be used to install the ADCS Web Enrollment service after the
feature has been installed on the server.
Expand All @@ -166,14 +166,17 @@ For more information on Web Enrollment services, see [this article on TechNet](h
- **`[String]` Ensure** (_Write_): Specifies whether the Web Enrollment feature
should be installed or uninstalled. { *Present* | Absent }

#### xAdcsWebEnrollment Examples
#### AdcsWebEnrollment Examples

- [Install web enrollment server](/Examples/Resources/xAdcsWebEnrollment/1-InstallWebEnrollment.ps1)
- [Install web enrollment server](/Examples/Resources/AdcsWebEnrollment/1-InstallWebEnrollment.ps1)

## Versions

### Unreleased

- BREAKING CHANGE: Renamed module to ActiveDirectoryCSDsc - see
[issue #38](https://github.com/PowerShell/xAdcsDeployment/issues/38)

### 1.4.0.0

- xAdcsCertificateAuthority: CertFilePassword invalid type - fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ param ()
#>
$script:adminUsername = 'AdcsAdmin'
$script:adminPassword = 'NotPass12!'
$script:DSCModuleName = 'xAdcsDeployment'
$script:DSCResourceName = 'MSFT_xAdcsCertificationAuthority'
$script:DSCModuleName = 'ActiveDirectoryCSDsc'
$script:DSCResourceName = 'MSFT_AdcsCertificationAuthority'

Import-Module -Name (Join-Path -Path (Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath 'TestHelpers') -ChildPath 'CommonTestHelper.psm1') -Global

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
configuration MSFT_AdcsCertificationAuthority_Install_Config {
Import-DscResource -ModuleName ActiveDirectoryCSDsc

node localhost {
AdcsCertificationAuthority Integration_Test {
CAType = 'StandaloneRootCA'
Credential = $Node.AdminCred
Ensure = 'Present'
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
configuration MSFT_AdcsCertificationAuthority_Uninstall_Config {
Import-DscResource -ModuleName ActiveDirectoryCSDsc

node localhost {
AdcsCertificationAuthority Integration_Test {
CAType = 'StandaloneRootCA'
Credential = $Node.AdminCred
Ensure = 'Absent'
}
}
}

This file was deleted.

Loading

0 comments on commit bbfc02f

Please sign in to comment.