Skip to content

Commit

Permalink
AdfsDsc: Update Help and Example Files (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Guardian authored Apr 21, 2023
1 parent 9266584 commit e4f22cf
Show file tree
Hide file tree
Showing 15 changed files with 124 additions and 30 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- AdfsDsc
- Updated the Help and Example files.

## [1.3.1] - 2023-04-19

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

.EXAMPLE 1

This configuration will grant application permission in Active Directory Federation Services (AD FS).
This configuration will grant an application permission in Active Directory Federation Services (AD FS).

Configuration AdfsApplicationPermission_Config
{
Expand All @@ -42,8 +42,8 @@ Configuration AdfsApplicationPermission_Config
{
AdfsApplicationPermission AppPermission1
{
ClientRoleIdentifier = 'e7bfb303-c5f6-4028-a360-b6293d41338c'
ServerRoleIdentifier = 'e7bfb303-c5f6-4028-a360-b6293d41338c'
ClientRoleIdentifier = '168f3ee4-63fc-4723-a61a-6473f6cb515c'
ServerRoleIdentifier = 'http://schemas.microsoft.com/ws/2009/12/identityserver/selfscope'
Description = "This is the AppPermission1 Description"
ScopeNames = 'openid'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

.EXAMPLE 1

This configuration will ...
This configuration will set the global authentication policy for the ADFS service.

Configuration AdfsGlobalAuthenticationPolicy_Config
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

.EXAMPLE 1

This configuration will the company name of the global web content for the invariant locale. If there is no
This configuration will set the company name of the global web content for the invariant locale. If there is no
logo, the sign-in page displays the company name Contoso.

Configuration AdfsGlobalWebContent_CompanyName_Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@

.EXAMPLE 1

This configuration will ...
This configuration will set the Extranet Lockout properties on the ADFS service.

Configuration AdfsProperties_Config
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

.EXAMPLE 1

This configuration will add a Web API application role to an application in Active Directory Federation
This configuration will add a Web API application to an application group in Active Directory Federation
Services (AD FS).

Configuration AdfsWebApiApplication_Config
Expand All @@ -105,6 +105,12 @@ Configuration AdfsWebApiApplication_Config

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand All @@ -125,8 +131,8 @@ Configuration AdfsWebApiApplication_Config

.EXAMPLE 2

This configuration will add a Web API application role to an application in Active Directory Federation
Services (AD FS).
This configuration will add a Web API application with an LDAP Claims Issuance Transform rule to an application group
in Active Directory Federation Services (AD FS).

Configuration AdfsWebApiApplication_LdapClaims_IssuanceTransformRules_Config
{
Expand All @@ -136,6 +142,12 @@ Configuration AdfsWebApiApplication_LdapClaims_IssuanceTransformRules_Config

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand Down Expand Up @@ -176,8 +188,8 @@ Configuration AdfsWebApiApplication_LdapClaims_IssuanceTransformRules_Config

.EXAMPLE 3

This configuration will add a Web API application role to an application in Active Directory Federation
Services (AD FS).
This configuration will add a Web API application with an Emit Group Claims Issuance Transform rule to an application
group in Active Directory Federation Services (AD FS).

Configuration AdfsWebApiApplication_EmitGroupClaims_IssuanceTransformRules_Config
{
Expand All @@ -187,6 +199,12 @@ Configuration AdfsWebApiApplication_EmitGroupClaims_IssuanceTransformRules_Confi

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand Down Expand Up @@ -217,8 +235,8 @@ Configuration AdfsWebApiApplication_EmitGroupClaims_IssuanceTransformRules_Confi

.EXAMPLE 4

This configuration will add a Web API application role to an application in Active Directory Federation
Services (AD FS).
This configuration will add a Web API application with a Custom Claims Issuance Transform rule to an application group
in Active Directory Federation Services (AD FS).

Configuration AdfsWebApiApplication_CustomClaims_IssuanceTransformRules_Config
{
Expand All @@ -228,6 +246,12 @@ Configuration AdfsWebApiApplication_CustomClaims_IssuanceTransformRules_Config

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand All @@ -247,11 +271,46 @@ Configuration AdfsWebApiApplication_CustomClaims_IssuanceTransformRules_Config
{
TemplateName = 'CustomClaims'
Name = 'App1 Custom Claim'
CustomRule = 'TBC'
CustomRule = 'c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"), query = ";givenName;{0}", param = c.Value);'
}
)
}
}
}

.EXAMPLE 5

This configuration will add a Web API application with an access control policy parameters to an application group in
Active Directory Federation Services (AD FS).

Configuration AdfsWebApiApplication_AccessControlPolicyParameters_Config
{
param()

Import-DscResource -ModuleName AdfsDsc

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
ApplicationGroupIdentifier = 'AppGroup1'
Identifier = 'e7bfb303-c5f6-4028-a360-b6293d41338c'
Description = 'App1 Web Api'
AccessControlPolicyName = 'Permit specific group'
AccessControlPolicyParameters = MSFT_AdfsAccessControlPolicyParameters
{
GroupParameter = @(
'CONTOSO\AppGroup1 Users'
'CONTOSO\AppGroup1 Admins'
)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<#
.DESCRIPTION
This configuration will grant application permission in Active Directory Federation Services (AD FS).
This configuration will grant an application permission in Active Directory Federation Services (AD FS).
#>

Configuration AdfsApplicationPermission_Config
Expand All @@ -30,8 +30,8 @@ Configuration AdfsApplicationPermission_Config
{
AdfsApplicationPermission AppPermission1
{
ClientRoleIdentifier = 'e7bfb303-c5f6-4028-a360-b6293d41338c'
ServerRoleIdentifier = 'e7bfb303-c5f6-4028-a360-b6293d41338c'
ClientRoleIdentifier = '168f3ee4-63fc-4723-a61a-6473f6cb515c'
ServerRoleIdentifier = 'http://schemas.microsoft.com/ws/2009/12/identityserver/selfscope'
Description = "This is the AppPermission1 Description"
ScopeNames = 'openid'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<#
.DESCRIPTION
This configuration will ...
This configuration will set the global authentication policy for the ADFS service.
#>

Configuration AdfsGlobalAuthenticationPolicy_Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<#
.DESCRIPTION
This configuration will the company name of the global web content for the invariant locale. If there is no
This configuration will set the company name of the global web content for the invariant locale. If there is no
logo, the sign-in page displays the company name Contoso.
#>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<#
.DESCRIPTION
This configuration will ...
This configuration will set the Extranet Lockout properties on the ADFS service.
#>

Configuration AdfsProperties_Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<#
.DESCRIPTION
This configuration will add a Web API application role to an application in Active Directory Federation
This configuration will add a Web API application to an application group in Active Directory Federation
Services (AD FS).
#>

Expand All @@ -31,6 +31,12 @@ Configuration AdfsWebApiApplication_Config

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

<#
.DESCRIPTION
This configuration will add a Web API application role to an application in Active Directory Federation
Services (AD FS).
This configuration will add a Web API application with an LDAP Claims Issuance Transform rule to an application
group in Active Directory Federation Services (AD FS).
#>

Configuration AdfsWebApiApplication_LdapClaims_IssuanceTransformRules_Config
Expand All @@ -31,6 +31,12 @@ Configuration AdfsWebApiApplication_LdapClaims_IssuanceTransformRules_Config

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

<#
.DESCRIPTION
This configuration will add a Web API application role to an application in Active Directory Federation
Services (AD FS).
This configuration will add a Web API application with an Emit Group Claims Issuance Transform rule to an
application group in Active Directory Federation Services (AD FS).
#>

Configuration AdfsWebApiApplication_EmitGroupClaims_IssuanceTransformRules_Config
Expand All @@ -31,6 +31,12 @@ Configuration AdfsWebApiApplication_EmitGroupClaims_IssuanceTransformRules_Confi

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

<#
.DESCRIPTION
This configuration will add a Web API application role to an application in Active Directory Federation
Services (AD FS).
This configuration will add a Web API application with a Custom Claims Issuance Transform rule to an
application group in Active Directory Federation Services (AD FS).
#>

Configuration AdfsWebApiApplication_CustomClaims_IssuanceTransformRules_Config
Expand All @@ -31,6 +31,12 @@ Configuration AdfsWebApiApplication_CustomClaims_IssuanceTransformRules_Config

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand All @@ -50,7 +56,7 @@ Configuration AdfsWebApiApplication_CustomClaims_IssuanceTransformRules_Config
{
TemplateName = 'CustomClaims'
Name = 'App1 Custom Claim'
CustomRule = 'TBC'
CustomRule = 'c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"), query = ";givenName;{0}", param = c.Value);'
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

<#
.DESCRIPTION
This configuration will add a Web API application role with access control policy parameters to an application
in Active Directory Federation Services (AD FS).
This configuration will add a Web API application with an access control policy parameters to an application
group in Active Directory Federation Services (AD FS).
#>

Configuration AdfsWebApiApplication_AccessControlPolicyParameters_Config
Expand All @@ -31,6 +31,12 @@ Configuration AdfsWebApiApplication_AccessControlPolicyParameters_Config

Node localhost
{
AdfsApplicationGroup AppGroup1
{
Name = 'AppGroup1'
Description = "This is the AppGroup1 Description"
}

AdfsWebApiApplication WebApiApp1
{
Name = 'AppGroup1 - Web API'
Expand Down

0 comments on commit e4f22cf

Please sign in to comment.