From b0c0e7e49ca6dffcae4974aeafb2976060fae0ac Mon Sep 17 00:00:00 2001 From: kkunzer Date: Tue, 6 May 2025 08:52:15 -0500 Subject: [PATCH 1/2] Update oidc-provider.md Refer to Mendix Support ticket #247694 for the issue that led to this discovery. --- .../platform-supported-content/services/oidc-provider.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md b/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md index 7faf8bc0b32..88412506829 100644 --- a/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md +++ b/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md @@ -576,6 +576,10 @@ In versions of the OIDC Provider above 2.0.0, the sub value was changed from an The OIDC Provider service sets a cookie as a means to persist the session in the user’s browser. If the cookie is not properly set, this may lead to problems. For example, when the OIDC Provider service is used to build an IAM Broker, no session is established and the broker may initiate a new session at the upstream IdP, which results in an ‘infinite loop’ of redirects via the user’s browser. To ensure the cookie is properly set, the runtime setting com.mendix.core.SameSiteCookies must have value None. See [Environment Details](/developerportal/deploy/environments-details/#samesite) for more information how to set the correct value for SameSite runtime setting. Note that the default value for this setting changed in [Mendix 8.11](/releasenotes/studio-pro/8.11/). +### On-premise Deployment and IIS + +When implementing the OIDC Provider service in an on-premise deployment scenario and allowing users to navigate freely between applications, there is an additional setting in IIS that must be configured that is not normally changed for a regular on-premise deployment. Without making this update, when users are already logged in (have the cookie) and they navigate to one of the applications that would need to authenticate with the Provider service, a redirect for authentication will fail because IIS will rewrite the host in the response header resulting in request attempting to authenticate on itself for authentication instead of the Provider service. This is because of a default setting on the Application Request Routing proxy server that is set up in IIS for on-premise deployments. You must disable the "Reverse rewrite host in response header" checkbox under IIS > Server > Application Request Routing > Proxy Settings to prevent this from happening. + ## Authorization{#authorization} When you are building Mendix apps you need to make two architectural decisions in the area of end-user access: From 9f6a79b8e0c622ec4d91ae84ec761e0b64f13dfe Mon Sep 17 00:00:00 2001 From: katarzyna-koltun-mx <108737161+katarzyna-koltun-mx@users.noreply.github.com> Date: Fri, 9 May 2025 19:37:40 +0200 Subject: [PATCH 2/2] Update oidc-provider.md --- .../platform-supported-content/services/oidc-provider.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md b/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md index 88412506829..439da4954ce 100644 --- a/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md +++ b/content/en/docs/appstore/use-content/platform-supported-content/services/oidc-provider.md @@ -573,12 +573,12 @@ In versions of the OIDC Provider above 2.0.0, the sub value was changed from an ### Infinite Loop of Redirects -The OIDC Provider service sets a cookie as a means to persist the session in the user’s browser. If the cookie is not properly set, this may lead to problems. For example, when the OIDC Provider service is used to build an IAM Broker, no session is established and the broker may initiate a new session at the upstream IdP, which results in an ‘infinite loop’ of redirects via the user’s browser. +The OIDC Provider service sets a cookie as a means to persist the session in the user’s browser. If the cookie is not properly set, this may lead to problems. For example, when the OIDC Provider service is used to build an IAM Broker, no session is established and the broker may initiate a new session at the upstream IdP, which results in an ‘infinite loop’ of redirects via the user's browser. To ensure the cookie is properly set, the runtime setting com.mendix.core.SameSiteCookies must have value None. See [Environment Details](/developerportal/deploy/environments-details/#samesite) for more information how to set the correct value for SameSite runtime setting. Note that the default value for this setting changed in [Mendix 8.11](/releasenotes/studio-pro/8.11/). ### On-premise Deployment and IIS -When implementing the OIDC Provider service in an on-premise deployment scenario and allowing users to navigate freely between applications, there is an additional setting in IIS that must be configured that is not normally changed for a regular on-premise deployment. Without making this update, when users are already logged in (have the cookie) and they navigate to one of the applications that would need to authenticate with the Provider service, a redirect for authentication will fail because IIS will rewrite the host in the response header resulting in request attempting to authenticate on itself for authentication instead of the Provider service. This is because of a default setting on the Application Request Routing proxy server that is set up in IIS for on-premise deployments. You must disable the "Reverse rewrite host in response header" checkbox under IIS > Server > Application Request Routing > Proxy Settings to prevent this from happening. +In an on-premise deployment scenario, if you want to allow users to navigate freely between applications, you must unselect the **Reverse rewrite host in response header** check box in IIS, under **IIS** > **Server** > **Application Request Routing** > **Proxy Settings**. If you leave this option enabled, redirects for authentication fail for users who are already logged in (have the cookie) if they navigate to one of the applications that would need to authenticate with the Provider service. This issue happens because IIS rewrites the host in the response header, resulting the in request attempting to authenticate on itself for authentication instead of the Provider service. ## Authorization{#authorization}