none
Getting 502 on my signin-oidc callback path under app gateway V2

    Dotaz

  • Using:

    • .NETCORE2.1 application
    • Azure App Service
    • Azure Application Gateway V2

    Steps to reproduce:

    I am using Cookies as DefaultAuthenticateScheme, DefaultScheme and OpenIdConnect as DefaultChallengeScheme. My OpenIdConnect Client uses hybrid flow.
    After entering my deployed (.NETCORE2.1) application (running under application gateway), automatic challenge is being triggered, redirection to identity server (identity provider) happens, user is authenticating successfully, redirection back to my application to signin-oidc path happens.

    According to my application logs:

    1. OpenIdConnectHandler is entered
    2. Received id_token
    3. Received code
    4. Retrieving claims
    5. AuthenticationScheme: "Cookies" signed in
    6. Request finishes with 302 status and Location set correctly to base path

    Problem: Instead of redirecting to base path at the end, nginx returns 502 Bad Gateway
    I cannot see in my diagnostic logs from gateway any reason for 502 status code. I thought it might be connected with header size, but I did couple of tests and it is not.

    Do you have any clue what might be causing it?
    Are there any logs I can search for real reason of 502?

    P.S.: When I try the same without gateway, on original uri of application (app service uri), everything is fine

    Thank you

    úterý 14. května 2019 11:20

Všechny reakce

  • Using:

    • .NETCORE2.1 application
    • Azure App Service
    • Azure Application Gateway V2

    Steps to reproduce:

    I am using Cookies as DefaultAuthenticateScheme, DefaultScheme and OpenIdConnect as DefaultChallengeScheme. My OpenIdConnect Client uses hybrid flow.
    After entering my deployed (.NETCORE2.1) application (running under application gateway), automatic challenge is being triggered, redirection to identity server (identity provider) happens, user is authenticating successfully, redirection back to my application to signin-oidc path happens.

    According to my application logs:

    1. OpenIdConnectHandler is entered
    2. Received id_token
    3. Received code
    4. Retrieving claims
    5. AuthenticationScheme: "Cookies" signed in
    6. Request finishes with 302 status and Location set correctly to base path

    Problem: Instead of redirecting to base path at the end, nginx returns 502 Bad Gateway
    I cannot see in my diagnostic logs from gateway any reason for 502 status code. I thought it might be connected with header size, but I did couple of tests and it is not.

    Do you have any clue what might be causing it?
    Are there any logs I can search for real reason of 502?

    P.S.: When I try the same without gateway, on original uri of application (app service uri), everything is fine

    Thank you
    Jana

    úterý 14. května 2019 11:18