Last active
December 8, 2021 06:01
Revisions
-
dsolovay revised this gist
Sep 16, 2021 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <SitecorePlugin PluginName="SitecoreIdentitySamlDemo" AssemblyName="SitecoreIdentitySamlDemo" Version="1.0.0"> <Dependencies> <Dependency name="Sitecore.Plugin.IdentityProviders">5.1.1</Dependency> </Dependencies> <Tags /> </SitecorePlugin> -
dsolovay revised this gist
Sep 16, 2021 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ Install-Package Sitecore.Plugin.IdentityProviders -Version 5.1.1 -Source https://sitecore.myget.org/F/sc-identity/api/v3/index.json Install-Package IdentityServer4 -Version 2.3.2 Install-Package Sustainsys.Saml2.AspNetCore2 -Version 2.8.0 -
dsolovay revised this gist
Sep 16, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public void ConfigureServices(IServiceCollection services) { options.SignInScheme = "idsrv.external"; options.SignOutScheme = IdentityServerConstants.DefaultCookieAuthenticationScheme; options.SPOptions.EntityId = new EntityId("https://xp0identityserver.dev.local/Saml2"); IdentityProvider provider = GetIdentityProvider(options.SPOptions); options.IdentityProviders.Add(provider); }); -
dsolovay revised this gist
Sep 15, 2021 . 1 changed file with 22 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,28 +8,28 @@ namespace SitecoreIdentitySamlDemo { public class ConfigureSitecore { public void ConfigureServices(IServiceCollection services) { var builder = new AuthenticationBuilder(services); builder.AddSaml2("Saml2", "SSO Button Text", options => { options.SignInScheme = "idsrv.external"; options.SignOutScheme = IdentityServerConstants.DefaultCookieAuthenticationScheme; options.SPOptions.EntityId = new EntityId("https://testidserver2/Saml2"); IdentityProvider provider = GetIdentityProvider(options.SPOptions); options.IdentityProviders.Add(provider); }); } private IdentityProvider GetIdentityProvider(SPOptions options) { var idp = new IdentityProvider(new EntityId("https://stubidp.sustainsys.com/Metadata"), options); idp.Binding = Saml2BindingType.HttpPost; idp.LoadMetadata = true; return idp; } } } -
dsolovay revised this gist
Sep 15, 2021 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,7 @@ <Saml2Configuration type="Sitecore.Plugin.IdentityProviders.IdentityProvider, Sitecore.Plugin.IdentityProviders"> <AuthenticationScheme>Saml2</AuthenticationScheme> <DisplayName>Saml2 SSO</DisplayName> <Enabled>true</Enabled> <ClaimsTransformations> <ClaimsTransformation1 type="Sitecore.Plugin.IdentityProviders.DefaultClaimsTransformation, Sitecore.Plugin.IdentityProviders"> <SourceClaims> -
dsolovay revised this gist
Sep 15, 2021 . 1 changed file with 49 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ <?xml version="1.0" encoding="utf-8"?> <Settings> <Sitecore> <ExternalIdentityProviders> <IdentityProviders> <Saml2Configuration type="Sitecore.Plugin.IdentityProviders.IdentityProvider, Sitecore.Plugin.IdentityProviders"> <AuthenticationScheme>Saml2</AuthenticationScheme> <DisplayName>Saml2 SSO</DisplayName> <Enabled>true</Enabled> <MetadataAddress></MetadataAddress> <ClaimsTransformations> <ClaimsTransformation1 type="Sitecore.Plugin.IdentityProviders.DefaultClaimsTransformation, Sitecore.Plugin.IdentityProviders"> <SourceClaims> <Claim1 type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" /> </SourceClaims> <NewClaims> <Claim1 type="email" /> </NewClaims> </ClaimsTransformation1 > <ClaimsTransformation2 type="Sitecore.Plugin.IdentityProviders.DefaultClaimsTransformation, Sitecore.Plugin.IdentityProviders"> <SourceClaims> <Claim1 type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" /> </SourceClaims> <NewClaims> <Claim1 type="email" /> </NewClaims> </ClaimsTransformation2> <AuthorRule type="Sitecore.Plugin.IdentityProviders.DefaultClaimsTransformation, Sitecore.Plugin.IdentityProviders"> <SourceClaims> <Claim1 type="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="Author" /> </SourceClaims> <NewClaims> <Claim1 type="role" value="sitecore\Author" /> </NewClaims> </AuthorRule> <AdminRule type="Sitecore.Plugin.IdentityProviders.DefaultClaimsTransformation, Sitecore.Plugin.IdentityProviders"> <SourceClaims> <Claim1 type="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" value="Administrator" /> </SourceClaims> <NewClaims> <Claim1 type="http://www.sitecore.net/identity/claims/isAdmin" value="true"/> </NewClaims> </AdminRule> </ClaimsTransformations> </Saml2Configuration> </IdentityProviders> </ExternalIdentityProviders> </Sitecore> </Settings> -
dsolovay created this gist
Sep 14, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ using IdentityServer4; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.DependencyInjection; using Sustainsys.Saml2; using Sustainsys.Saml2.Configuration; using Sustainsys.Saml2.Metadata; using Sustainsys.Saml2.WebSso; namespace SitecoreIdentitySamlDemo { public class ConfigureSitecore { public void ConfigureServices(IServiceCollection services) { var builder = new AuthenticationBuilder(services); builder.AddSaml2("Saml2", "SSO Button Text", options => { options.SignInScheme = "idsrv.external"; options.SignOutScheme = IdentityServerConstants.DefaultCookieAuthenticationScheme; options.SPOptions.EntityId = new EntityId("https://testidserver2/Saml2"); IdentityProvider provider = GetIdentityProvider(options.SPOptions); options.IdentityProviders.Add(provider); }); } private IdentityProvider GetIdentityProvider(SPOptions options) { var idp = new IdentityProvider(new EntityId("https://stubidp.sustainsys.com/Metadata"), options); idp.Binding = Saml2BindingType.HttpPost; idp.LoadMetadata = true; return idp; } } }