For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

eddyk99's avatar
eddyk99
Icon for Nimbostratus rankNimbostratus
May 03, 2024

rewrite Azure AD response for portal access via web portal

Hi All,

I have a web portal where access to it is done via SAML authentication with AzureAD.

I have a portal access called VIP_Maintenance configured on this we portal, the APP VIP_Maintenance is a web site on this web server (mywebserver.xyz.com) which also configured for SAML authentication. This web server hosts multiple web sites, so the one for VIP_Maintenance is (mywebserver.xyz.intra/azure). Other resource is /signin-wsfederation, this is where I should land after the successful authentication with Microsoft.

So when I try to access to the web portal using my user name and password, F5 sends the request to AzureAD and I receive a code on my cell phone which I enter and access is granted.

Now when I click on the portal access icon (VIP_maintenance), the web portal rewrites the request to this:

https://web-portal-azuread.viarail.ca/f5-w-68747470733a2f2f7669706d6e74632e746573742e696e747261$$/azure

then I see my browser communicating with Microsoftonline for authentication and I see the reply from AzureAD like this:

      https://login.microsoftonline.com/007eae9f-b0c2-4137-a710-16d67a6568a1/wsfed?wtrealm=https%3A%2F%2Fvipmntc.test.intra%2F&wctx=WsFedOwinState%3DaQm7wom_iiDcspTp4F75-SNiAH6ulYFzgGdxezLukSK9-twIS0gTcgMY7dprTnf7OmROGo1XmkiLAbaVs4L8ISgubrF5FaUtbeIdn7ywnn0JvUYlwclAR1V3GwiWN9VkfNE5hThiW2bzM1tV1arZ6IahGZgjBiVVLSCn2BzTdFdu73Ck709An2sk1IVDfV-26FbvGHbUJyYjK-fnc5iiCw&wa=wsignin1.0&wreply=https%3A%2F%2Fvipmntc.test.intra%2Fsignin-wsfederation

right after, the url changes to this : https:// mywebserver.xyz.intra/signin-wsfederation, and I get an error this this page cannot be reached which is understood as mywebserver.xyz.intra is not exposed to internet.

Now, what I need to do is to make F5 rewrite the response from Microsoft in to this url:

https://web-portal-azuread.viarail.ca/f5-w-68747470733a2f2f7669706d6e74632e746573742e696e747261$$/ signin-wsfederation , instead of https:// mywebserver.xyz.intra/signin-wsfederation.

Any Idea how I can achieve that?

Your help is highly appreciated.

 

regards, 

 

 

 

1 Reply

  • Portal Access Rewrite cannot be used this way. When using Portal, SAML must occur in BIG-IP instead of the backend app.

    If the app must perform SAML itself, publish it using its own virtual server and DNS hostname and allow access to it using APM's multi-domain mode.

    For a lot more information about this, read this doc:

    https://clouddocs.f5.com/portalaccess-alternative/main/