zettelkasten/OneNoteExport/Kommunikationstechnologie/Sharepoint/Infrastruktur/15_ADFS Konfiguration.md
Ralf Koop 5a108aa2b4 .
2023-08-25 23:29:11 +02:00

20 KiB

ADFS Konfiguration

Montag, 22. Oktober 2018

14:35

 

Relaying Party Trusts auf dem ADFS Server :

 

(Die Reiter die hier nicht aufgeführt sind, haben keine Einstellungen !)

 

SPT-Portal

 

Computergenerierter Alternativtext: SPT-PotaI Properties Organization Endpoints Proxy Endpoints Notes Advanced Identifiers Encryption Signature Accepted Claims Monit oring Specify the display name and denttfiem for this relying Party trust Display name EPT-portaI Relying Party denttfier aample https:/ffscontoso com/adfs/services/trust Relying Party denttfiem https://portakpt bkkqobiloilde/ trust/ {width="4.208333333333333in" height="3.15625in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:36

 

 

Computergenerierter Alternativtext: SPT-PotaI Properties Monitoring Identifiem Encryption Signature Accepted Claims Organization Endpoints Proxy Endpoints Notes Advanced Specify the endpoints to use for SAM L and WS-Federation Passive protocols Index Binding C)efauh Re WS-Federation Passive Endpoints https //portal-spt bkkqlobiloil {width="4.208333333333333in" height="2.1770833333333335in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:37

 

 

Computergenerierter Alternativtext: Edit Claim Issuance Policy for SPT-PotaI Issuance Transform Rules The following transform rules specify the claims that will be sent to the relying Party Order Rule Name Issued Claims E-Mail Address, UPN .RoIe„ {width="5.083333333333333in" height="1.7083333333333333in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:38

 

 

 

Computergenerierter Alternativtext: Edit Rule - Email You can conflgure this rule to send the Values of LDAP atthbutes as claimy Select an atthbute Store from which to effact LDAP attribute& Specify how the attributes will map to the outgoing Claim types that will be issued from the rule Claim rule name Email Rule template: Send LDAP ktributes as Claims ktribute storæ Active Directory Mapping of LDAP attributes to outgoing Claim types L DAP kthbute (Select or type to add more) E-Mail-Addresses User-PhncipaI-Name TokenGroups - Unqualtfied Names SAM-Account-Name Outgoing Claim Type (Select or type to add more) E-Mail Address UPN Role Windows account name {width="5.708333333333333in" height="4.072916666666667in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:38

 

SPT-Mysite

 

 

 

Computergenerierter Alternativtext: SPT-Mysites Properties Organization Endpoints Proxy Endpoints Notes Advan ced Identifiers Encryption Signature Accepted Claims Mond onng Specify the display name and denttfiem for this relying Party trust Display name EPT-Mysites Relying Party Identifier aample https:/ffscontoso com/adfs/services/trust Relying Party denttfiem https://mysites-spt bkkqobiloil de/ trust {width="4.052083333333333in" height="3.15625in"}

 

Erfasster Bildschirmausschnitt: 24.10.2018 16:17

 

 

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:58

 

 

Computergenerierter Alternativtext: SPT-Mysites Properties Monitoring Identifiem Encryption Signature Accepted Claims Organization Endpoints Proxy Endpoints Notes Advanced Specify the endpoints to use for SAM L and WS-Federation Passive protocols Index Binding Defai- WS-Federation Passive Endpoints https://mysites-spt bkkqlobiloil de/ tust/ {width="4.229166666666667in" height="2.1875in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:58

 

 

Computergenerierter Alternativtext: Edit Claim Issuance Policy for SPT-Mysites Issuance Transform Rules The following transform rules specify the claims that will be sent to the relying Party Order Rule Name Issued Claims E-Mail Address, UPN .RoIe„ {width="5.125in" height="1.7395833333333333in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:58

 

 

Computergenerierter Alternativtext: Edit Rule - Email You can conflgure this rule to send the Values of LDAP attributes as claimy Select an attribute Store from which to effact LDAP attribute& Specify how the attributes will map to the outgoing Claim types that will be issued from the rule Claim rule name Email Rule template: Send LDAP ktributes as Claims ktribute storæ Active Directory Mapping of LDAP attributes to outgoing Claim types LDAP kthbute (Select ortypeto add more) E-Mail-Addresses User-PhncipaI-Name TokenGroups - Unqualtfied Names SAM-Account-Name Outgoing Claim Type (Select or type to add more) E-Mail Address UPN Role Windows account name {width="5.6875in" height="4.0in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:59

 

SPT-Search

SPT-Mobilnet

 

Computergenerierter Alternativtext: SPT-Search Properties Organization Endpoints Proxy Endpoints Notes Advan ced Identifiers Encryption Signature Accepted Claims Mond onng Specify the display name and denttfiem for this relying Party trust Display name EPT-Search Reb\'ing Party Identifier aample https:/ffscontoso com/adfs/services/trust Relying Party denttfiem https://search-spt bkkqobiloil de/ trust/ {width="4.1875in" height="2.9791666666666665in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 14:59

 

 

 

Computergenerierter Alternativtext: SPT-Search Properties Monitoring Identifiem Encryption Signature Accepted Claims Organization Endpoints Proxy Endpoints Notes Advanced Specify the endpoints to use for SAML and WS-Federation Passive protocols I Binding Defauh WS-Federation Passive Endpoints https://search-spt bkkqlobiloil de/ tust/ {width="4.239583333333333in" height="2.1145833333333335in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 15:00

 

 

 

Computergenerierter Alternativtext: Edit Claim Issuance Policy for SPT-Search Issuance Transform Rules The following transform rules specify the claims that will be sent to the relying Party Order Rule Name Issued Claims E-Mail Address. UPN .RoIe„ {width="5.15625in" height="1.71875in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 15:00

 

 

 

Computergenerierter Alternativtext: Edit Rule - Email You can conflgure this rule to send the Values of LDAP atthbutes as claimy Select an atthbute Store from which to effact LDAP attribute& Specify how the attributes will map to the outgoing Claim types that will be issued from the rule Claim rule name Email Rule template: Send LDAP ktributes as Claims ktribute storæ Active Directory Mapping of LDAP attributes to outgoing Claim types L DAP kthbute (Select or type to add more) E-Mail-Addresses User-PhncipaI-Name TokenGroups - Unqualtfied Names SAM-Account-Name Outgoing Claim Type (Select or type to add more) E-Mail Address UPN Role Windows account name {width="5.71875in" height="4.114583333333333in"}

 

Erfasster Bildschirmausschnitt: 22.10.2018 15:00

 

 

Computergenerierter Alternativtext: dentfø Ercr,ption SV-Aure AxotedCIaims the fcrthis rebe•-s p aty tmst Dsday narre: dentf--- https:J,fs ccriosc Rey-ing dentf---• apt {width="3.5625in" height="2.3333333333333335in"}

 

Erfasster Bildschirmausschnitt: 13.11.2018 15:35

 

 

Computergenerierter Alternativtext: Montortr,g Gsentfä SO---Aure Erbte-ts Proxy Endpoints M\*es Mvanced the ----0Di-ts to use for SANL prctocols. hdex \*Ong WS-Federaticn Passive Endpcintc W \_ Tun/ {width="3.5in" height="1.5416666666666667in"}

 

Erfasster Bildschirmausschnitt: 13.11.2018 15:36

 

 

Computergenerierter Alternativtext: Edit Claim Issuance Polig for SPT-MobiInet Ssuarce Transfoml Rules folbwing tr\"arrn rües specfy thä w\" Ee to e•ve p aty \"dress.lJPN.RoIe\... {width="3.90625in" height="1.3541666666666667in"}

 

Erfasster Bildschirmausschnitt: 13.11.2018 15:36

 

 

Computergenerierter Alternativtext: 04 LDAP attributes to Clan types LOAF kthbute (Sdect ortype to add rrcre) -Name Tcke-HSrct-ps - Llnquaffed N---mes SAM ame Type (Se--- to add more) v BSe v Windows accc•A {width="5.010416666666667in" height="3.1875in"}

 

Erfasster Bildschirmausschnitt: 13.11.2018 15:36

 

 

Auf dem Sharepoint Server ausgeführt : Ich habe die Konfig nochmal gelöscht !!!!

 

 

Installation LDAPCP :

 

Add-SPSolution -LiteralPath "D:\SP\03_Tools\LDAPCP-master\LDAPCP.wsp"

Install-SPSolution -Identity "LDAPCP.wsp" -GACDeployment

 

System.Reflection.Assembly

$publish = New-Object System.EnterpriseServices.Internal.Publish

# Adds assembly to the GAC

$publish.GacInstall("D:\SP\03_Tools\LDAPCP-master\ldapcp.dll")

 

Danach ein neustart beider Server durchgeführt.

 

Folgende Änderungen in der LDAPCP Configuration müssen gemacht WERDEN .

 

 

Computergenerierter Alternativtext: Augmentation Enable augmentation to let LDAPCP get group membership of federated userS. If not enabled, permissions granted on federated groups may not Work. Enable augmentation Select what cle@gpgype LDAPCP will use to create claimswith the rou membership of users: For Active Directory servers, the preferred Way to get groups is using UserPrincipal.GetAuthorizationGroupsO Othewise LDAPCP reads LDAP attribute memberOf/uniquememberof of the user. LDAP Server \"Connect to Sharepo•nt domain\": Query this Server D This is an Active Directory server, use UserPrincipalGetAuthorizationGroups {width="15.322916666666666in" height="2.8541666666666665in"}

 

LDAP Server "Connect to SharePoint domain": geändert von This is an Active Directory server, auf Query this server

 

und unter Claim types configuration

 

 

 

Computergenerierter Alternativtext: Delete Edit Delete Map LDAP attribute With a PickerEntity metadata http://schemas.microsoft.com/ws/2008/06/identity/cIaims/roIe User Group group telephoneNumber sAMAccountName Work\" hone Email {width="16.75in" height="0.5625in"}

 

Der Claim value prefix von Gruppe wurde von {fqdn}\ auf \ geändert

 

 

 

 

 

 

 

 

 

 

 

Remove-SPTrustedIdentityTokenIssuer adfs4

remove-SPTrustedRootAuthority "ADFS Token Signing"

 

 

 

AB hier alles neu gemacht :

 

 

$adfscertPath = "d:\ADFS-Signing-fs-bkk-mobil-oil-de.cer"

$realm = "urn:spt-portal:sp2016"

$signInURL = "https://fs.bkk-mobil-oil.de/adfs/ls"

 

$adfscert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($adfsCertPath)

 

New-SPTrustedRootAuthority -Name "ADFS Signing " -Certificate $adfscert

 

Computergenerierter Alternativtext: PS C: XUsersXcfg-sptAdmin» New-SPTrustedRootAuthority - Name \"ADFS Signing -Certificate \$adfscert ertificate Name TypeName DisplayName ld Status ersion DeploymentLocked Properties Farm UpgradedPersistedProperties . (Subject) CN:ADFS Signing - fs.bkk-mobil-oil.de (Issuer) CN:ADFS Signing - fs. bkk-mobil -Oil. de (Serial Number) 7ce6SBF6BAF90A4QC8BCF49e963666 (Not Before) 19.e7.2e18 (Not After) 19.e7.2e19 (Thumbprint) 683412ES78936371C61ace2A484FE19E37ASEDF • ADFS Signing Mi croso+t. SharePoi nt. Admi ni stration. SPTrustedRootAuthority • ADFS Signing 9dS6cb35-e27e-483c-a48a-8335adS11997 Online SPTrustedRootAuthorityManager 225789 False SPFarm {width="10.03125in" height="7.65625in"}

 

Erfasster Bildschirmausschnitt: 30.10.2018 08:12

 

 

$emailClaimMap = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming

$roleClaimMap = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" -IncomingClaimTypeDisplayName "Role" -SameAsIncoming

$upnClaimMap = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" -IncomingClaimTypeDisplayName "UPN" -SameAsIncoming

$sidClaimMap = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid" -IncomingClaimTypeDisplayName "SID" -SameAsIncoming

 

 

$ap = New-SPTrustedIdentityTokenIssuer -Name "ADFS4.0" -Description "ADFS provider4.0" -realm $realm -ImportTrustCertificate $adfscert -ClaimsMappings $emailClaimMap,$roleClaimMap,$upnClaimMap,$sidClaimMap -SignInUrl $signInURL -IdentifierClaim $emailClaimmap.InputClaimType

 

 

 

Computergenerierter Alternativtext: PS C: XIJsersXcfg-sptAdmin» Get-SPTrustedIdentityTokenIssuer ProviderUri ProviderSignOutUri DefaultProviderRealm ProviderRea1ms ClaimTypes HasC1aimTypeInformation ClaimTypeInformation ClaimProviderName UseWRep1yParameter UseWomeRea1mParameter GroupC1aimType RegisteredIssuerName IdentityC1aimTypeInformation Description SigningCertificate https : / /fs. bkk-rnobil-oil . de/adfs/ls urn: spt - portal : sp2B16 (http://schemas.xmlsoap.org/ws/2e€5/B5/identity/claims/emailaddress , http://schemas.mic rosoft.com/ws/208/e6/identity/claims/role, http://schemas.xmlsoap.org/ws/2&5/95/identity/claims/upn, http://schemas.mic rosoft.com/ws/ identity/claims / primarysid) True (EmailAddress, Role, UPN, SID) False False Microsoft . SharePoint . Administration. Claims. SPT rustedC1aimTypeInformation ADFS provider4.e (Subject) CN:ADFS Signing - fs. bkk-mbil-oil. de CN:ADFS Signing - fs. bkk-mbil-oil. de (Serial Number) 7Ce65BF6BAF9e8A44eC8BCF49C63666 (Not Before) 19.e7.2e18 (Not After 19.e7.2e19 {width="10.791666666666666in" height="7.90625in"}

Computergenerierter Alternativtext: ditiona1SigningCertificates . tadataEndPoint IsAutomatica11yUpdated Name TypeName DisplayName Status Parent ersion DeploymentLocked Properties Farm UpgradedPersistedProperties C Thumbprint) 683412E578936371C616BCQA484FE19E37A5EDF False ADFS4.e Mi crosoft . SharePoint . Admini stration. Claims. SPT rustedLogi nProvider ADFS4.e 8c137d84-f4aa-42ca-9fbc-ec7edc6397ee Online SPSecurityTokenServiceManager Name:SecurityTokenServiceManager 225815 False SPFarm Name:SPT_Config {width="10.083333333333334in" height="4.260416666666667in"}

 

Erfasster Bildschirmausschnitt: 30.10.2018 08:16

 

 

UPS eingerichtet :

Syncconnection eingerichtet, Benutzer\IT und Gruppen

User Profil Properties auf Mail geändert

Synchronisations Job gestartet

Profile wurden geladen.

 

 

$issuer = Get-SPTrustedIdentityTokenIssuer

$issuer.GroupClaimType = [Microsoft.IdentityModel.Claims.ClaimTypes]::Role

$issuer.Update()

 

 

$ap = Get-SPTrustedIdentityTokenIssuer "adfs4.0"
$ap.ClaimProviderName = "LDAPCP"
$ap.Update()

 

 

Auf beiden Servern einzelnt ausgeführt :

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish

$publish.GacInstall("A:\Sources\SPS\LDAPCP\Extract\ldapcp.dll")

 

 

Wichtig ist :

Die AD Gruppen dürfen keine Email eingetragen haben, wenn eine Email vergeben ist, werden die Mitglieder nicht mehr aufgelöst.

 

 

 

Computergenerierter Alternativtext: PS C: NIJsersXcfg-sptAdmirD Get-SPTrustedIdentityTokenIssuer ProviderlJri ProviderSignOutUri DefaultProviderRea1m ProviderRea1ms ClaimTypes HasC1aimTypeInformation ClaimTypeInformation ClaimProviderName UseWRep1yParameter UsebHomeRea1mParameter roupC1aimType RegisteredIssuerName IdentityC1aimTypeInformation Description SigningCertificate https : / /fs. bkk-mobil -Oil. de/ adfs/ls . urn:spt-portal : sp2e16 (http://schemas.xmlsoap.org/ws/2&5/es/identity/claims/emailaddress, http : / / schemas . mi crosoft . com/ws/ 2&8/B6/ identity/ claims/ role , http://schemas.xmlsoap.org/ws/2&5/es/identity/claims/upn, http://schemas.microsoft.com/ws/2&8/B6/identity/claims/primarysid\...) True • (EmailAddress, IJPN, SID, Role) • LDAPCP False False http://schemas.microsoft.com/ws/ identity/ claims/ role Mic rosoft. SharePoint. Administration. Claims. SPTrustedC1aimTypeInformation ADFS provider4.e (Subject) CN:ADFS Signing - fs.bkk-mobil -Oil .de (Issuer) CN:ADFS Signing - fs.bkk-mobil-oil . de (Serial Number) 7CØ6SBF6BAF9e8A44ØC8BCF49B963666 t Not Before 19.e7.2e18 (Not After) 19.e7.2e19 11:4e:22 {width="10.979166666666666in" height="8.010416666666666in"}

Computergenerierter Alternativtext: dditiona1SigningCertificates tadataEndPoint IsAutomatica11yUpdated Name TypeName Di splayName ld Status ersion DeploymentLocked Properties Farm UpgradedPersistedProperties PS C: XUsersXcfg-sptAdmin» (Thumbprint) 683412ES78936371C616Bce2A484FE19E37ASEDF False • ADFS4.e Mic rosoft. SharePoint. Administration. Claims. SPTrustedLoginProvider • ADFS4.e 8c137d84-f4aa-42ca-9fbc-ec7edc6397ee Online SPSecurityTokenServiceManager Name---SecurityTokenServiceManager 22898e False SPFarm Name---SPT Config {width="10.375in" height="4.916666666666667in"}

 

Erfasster Bildschirmausschnitt: 30.10.2018 15:12

 

 

 

 

SuppressModernAuthForOfficeClients

$a = get-spsecuritytokenserviceconfig

$a.SuppressModernAuthForOfficeClients = $true

$a.Update()

 

 

 

Realms für Mysites hinzufügen:

$uri = "https://mysites-spt.bkk-mobiloil.de/"

$realm = "urn:spt-mysites:sp2016"

$ap = Get-SPTrustedIdentityTokenIssuer "adfs4.0"

$ap.ProviderRealms.Add($uri, $realm)

$ap.update()

 

 

 

Realms für Search hinzufügen:

$uri = "https://search-spt.bkk-mobiloil.de/"

$realm = "urn:spt-search:sp2016"

$ap = Get-SPTrustedIdentityTokenIssuer "adfs4.0"

$ap.ProviderRealms.Add($uri, $realm)

$ap.update()

 

 

Realms für Mobilnet hinzufügen:

$uri = "https://mobilnet-spt.bkk-mobiloil.de/"

$realm = "urn:spt-mobilnet:sp2016"

$ap = Get-SPTrustedIdentityTokenIssuer "adfs4.0"

$ap.ProviderRealms.Add($uri, $realm)

$ap.update()

 

Auf der Mysite und auf der Search :

 

Login Abfrage übergehen :

 

In der Default Zone eine Customer URL ("Custum Sign In Page") setzen auf /_trust/default.aspx

 

 

 

 

WICHTIG = Nur TEMPORÄR ändern, sonst geht die Serach und Mysite nicht mehr.!!!!!!

 

Temporär geändert :

 

Token Dauer von 1 Tag auf 1 Minute

 

// STEP#2

// SHAREPOINT 2016 MANAGEMENT SHELL

// Checking Values

// $mysts.WindowsTokenLifetime must be 10 hours

// $mysts.LogonTokenCacheExpirationWindow must be 10 minutess

// $$TT.TokenTimeout must be 1 day / 24 hours

Add-PSSnapin microsoft.sharepoint.powershell

$mysts = Get-SPSecurityTokenServiceConfig

$mysts.WindowsTokenLifetime

$mysts.LogonTokenCacheExpirationWindow

$TT = [Microsoft.SharePoint.Administration.SPWebService]::ContentService

$TT.TokenTimeout

// IF NOT, change timers

$mysts = Get-SPSecurityTokenServiceConfig

$mysts.WindowsTokenLifetime =(New-TimeSpan -Hours 10)

$mysts.LogonTokenCacheExpirationWindow = (New-TimeSpan -Minutes 10)

$mysts.Update()

$TT = [Microsoft.SharePoint.Administration.SPWebService]::ContentService

$TT.TokenTimeout=(New-TimeSpan -Days 1)

$TT.Update()

 

Aus <https://social.technet.microsoft.com/Forums/en-US/71eb72c4-a82e-40ca-9bcf-6e6c74f007a3/activating-sharepoint-server-publishing-infrastructure-gives-an-unrepresentable-datetime-issue?forum=SP2016>

 

Token Lifetime setzen

 

Computergenerierter Alternativtext: Days Hours Mi nutes Seconds Milliseconds Ticks TotalDays TotalHours TotalMinutes TotalSeconds TotalMi11iseconds . PS C: AusersXcfg-spqAdmin» \$cs : LMicrosoft. SharePoint.Administration.SPk1ebService): :ContentService PS C: XUsersXcfg-spqAdmin» \$cs. TokenTimeout --- New-TimeSpan -Minutes 1 1 864eeeeeeeee 1 24 144e 864eø 864eeeee \$cs . TokenTimeout \$cs Update() \$cs . TokenTimeout PS C: XUsersXcfg-spqAdmin) PS C: XUsersXcfg-spqAdmin) PS C: ILIsersXcfg-spqAdmin) Days Hours Mi nutes Seconds Milli seconds Ticks TotalDays TotalHours TotalMinutes TotalSeconds TotalMi11iseconds . 1 seeeeeeeø e , 8&694444444444444 e, e166666666666667 1 se seeee {width="10.083333333333334in" height="8.604166666666666in"}

$cs =