IIS aufsetzen und konfigurieren

Prev Next

Führen Sie zum Einrichten und Konfigurieren der Internet Information Services (IIS) die folgenden Schritte aus:

  1. Erstellen Sie im IIS-Manager einen Anwendungspool.

  2. Kopieren Sie den OIDC-Webservice-Ordner nach Webservices.

  3. Kopieren Sie die Datei user.config von einem anderen Webservice in den OIDC-Ordner. Wenn mehrere OIDC-Login-Installationen vorhanden sind, müssen Sie den Typ appSettings anpassen. Wir empfehlen, dem Typ denselben Namen wie dem OIDC-Ordner zu geben. Beispiel der Datei user.config:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <appSettings>
      <add key="MasterConfigType" value="GenericOidcLogin" />
      <add key="MasterConfigDir" value="\\<path to master.config>\master.config"/>
    </appSettings>
  4. Konvertieren Sie den Anwendungspool in eine Anwendung.

  5. Geben Sie die URL zum Rückrufendpunkt an den Identitätsanbieter weiter, der diese URL zur registrierten Anwendung hinzufügen muss (Umleitungs-URIs).

    Beispiel: https://<IXM-Platform-URL>/gv2/webservices/GenericOidcLogin/callback

OIDC-Anwendung konfigurieren

Führen Sie die folgenden Schritte aus, um die OIDC-Anwendung zu konfigurieren:

  1. Aktualisieren Sie die Datei master.config. Erfahren Sie mehr über OIDC-Konfigurationsparameter.

    <appSettings type="GenericOidcLogin">
        <add key="MaxLogLevel_File" value="5"/>
    
        <!-- Update with Customer Code. -->
        <add key="CustomerCode" value="<CustomerCode>"/>
    
        <!-- If the outcome of the "Get started" was that the User should be created if it does not exist then the value is "true", otherwise "false". -->
        <add key="CreateUserIfNotExists" value="true"/>
    
    	<!-- Update these URLs. -->
        <add key="Applications:CMS:LoginSuccessRedirectUrl" value="https://<IXM-Platform-URL>/gv2/gf/GFWebHtml/cms/index.html#/external?lang=en&amp;cid=@@customerId@@&amp;autologin=bysession&amp;sh=@@sh@@&amp;userID=@@userId@@&amp;customerName=@@customerName@@"/>
        <add key="Applications:CMS:LoginFailedRedirectUrl" value="https://<IXM-Platform-URL>/gv2/webservices/GenericOidcLogin/LoginFailed"/>
    	
        <!-- True for analyzing the OIDC communication. After the setup works set this config to false. -->
        <add key="LogOpenIdProviderCommunication" value="true"/>
    
        <!-- Either Claims.PermissionGroup or DefaultPermissionGroup must be set when CreateUserIfNotExists is true. -->
        <add key="UpdatePermissionGroupForExistingUsers" value="false"/>
        <add key="DefaultPermissionGroup" value="Default"/>
        <!-- Claims.PermissionGroup is only required if the Identity Provider provides the Permission Group via claims. -->
        <!-- <add key="Claims.PermissionGroup" value="<PermissionGroupClaim>"/> -->
    
        <!-- Either Claims.UserGroups or DefaultUserGroup must be set when CreateUserIfNotExists is true. -->
        <add key="UpdateUserGroupsForExistingUsers" value="false"/>
        <add key="DefaultUserGroup" value="Default"/>
        <!-- Claims.UserGroups is only required if the Identity Provider provides the User Groups via claims. -->
        <!-- <add key="Claims.UserGroups" value="<UserGroupsClaim>"/> -->
    
    <!-- Will be provided from the Identity provider --> 
        <!-- In Azure the endpoint is for example "https://<subdomain>.b2clogin.com/<something>/<policy>/v2.0/.well-known/openid-configuration" -->
        <add key="OpenId:ConfigurationEndpoint" value="https://<url>/.well-known/openid-configuration"/>
        <!-- The ID of the application. In Azure it's the "Application (client) ID" of the "App registration" -->
        <add key="OpenId:ClientId" value="<XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>"/>
        <!-- The value of the Client secret. In Azure it can be created under the "App registrations" Application -> "Certificates & secrets". -->
        <add key="OpenId:ClientSecret" value="<Client-Secret-Value>"/>
        <add key="OpenId:Scope" value="openid profile email"/>
        <add key="OpenId:UseUserInfoEndpoint" value="false"/>
        <!-- The ID of the application. In Azure it's the "Application (client) ID" of the "App registration". -->
        <add key="Validation:ValidAudience" value="<XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX>"/>
    
    	<!-- Setting up using user claims. -->
    	<!-- You can find the specific values in the OIDC response while first login. -->
    	<!-- Must be unique because it will be used as username for the login, for example email address. -->
        <add key="Claims:ExternalUserId" value="emails"/>
        <add key="Claims:FirstName" value="given_name"/>
        <add key="Claims:LastName" value="family_name"/>
        <add key="Claims:Email" value="email"/>
    </appSettings>
  2. Gehen Sie zur Datei config.json im Ordner 00000 customer unter: www\gv2\gf\GfWebHtmlCustomer\00000

  3. Aktualisieren Sie die folgenden Einstellungen:

    • common > login > mode > sessionID: geben Sie die Session ID ein. Diese Eingabe ist erforderlich.

    • common > applicationPath > redirectOnLogoutToUrlByUserOrigin > Saml: geben Sie optional die URL der Anwendung ein. Diese Einstellung gilt für mehrere externe Anmeldungen, nicht nur für SAML.

{
	"cms": {
		....
	},
	"common": {
		/* If a logout to a portal where specific apps from the customer are available 
		is required then setup this redirect url */
		"applicationPath": {
			"redirectOnLogoutToUrlByUserOrigin": {
				"Saml": "https://path.to.portal"
			}
		},
		"login": {
			"mode": "sessionID"
		}
	}
}

Konfigurationen vom Kunden anfordern

Nachdem der Kunde (Identitätsanbieter) die Anwendung erstellt hat, kann er die folgenden erforderlichen Konfigurationen für die Datei master.config bereitstellen:

  1. OpenId:ConfigurationEndpoint: der Endpunkt zur .well-known/openid-Konfiguration. Die URL von Azure sieht beispielsweise so aus: https://<subdomain>.b2clogin.com/<something>/<policy>/v2.0/.well-known/openid-configuration

  2. OpenId:ClientId: die ID der Anwendung. In Azure ist dies die Application (client) ID der App registration.

  3. Validation:ValidAudience: die ID der Anwendung. In Azure ist dies die Application (client) ID der App registration.

  4. OpenId:ClientSecret: der Wert des Client Secret. In Azure kann dies unter App registrations > Application > Certificates & secrets erstellt werden.

Hinweis

Sie müssen den Anwendungspool nach jeder Aktualisierung der Datei master.config erneut starten.