I am developing an application on Google App Engine in java using spring boot to test IDP SSO.
I am using saml2 with spring security. Google App Engine will act as an service provider and for IDP we will use another provider.
I have a working demo on my localhost.
https://localhost:8443/
takes to index.html.
It has text (Hello world, guys!) and "launch SSO" button.
When you click the button it redirects to IDP select page - https://localhost:8443/saml/discovery/alais/{keystore.key}?entityID={entityId}; where we can select the IDP and click login.
When I deployed the app in Google App Engine flexible, the application loads correctly at https://{appTest}.appspot.com/
But when I click "launch SSO" button on the page, it is not redirecting to IDP select page - https://{appTest}.appspot.com/saml/discovery/alais/{keystore.key}?entityID={entityId}
Instead it is redirecting to http://ip Address/saml/discovery/alais/{keystore.key}?entityID={entityId}.
In logs, I see that it is getting redirected to http and port 80.
Are there any properties I need to set for redirect to work properly on cloud?
Please let me know if you have any suggestions.