Creating Aliases in host file(Single- Sign On)

Hi,

I am testing Single-Sign-On.
I created two different applications : One as a the Identity Provider and the Other as the Service Provider.
I am following this example: https://doc.cuba-platform.com/manual-6.7/sso_example.html

My question is where do I create aliases in the host file, so both my applications can run at the same time?

Regards

Hi,

Several tomcats can run on one host on different ports (HTTP, AJP, shutdown ports must differ). Please pay attention to the second step in the manual.

Which OS do you have? Location of the hosts file depends upon the operating system.

It is not necessary to add aliases. “Localhost” and “127.0.0.1” work for me. For clarity, I have changed module prefix of my applications.

web-app.properties of the IDP application:

cuba.idp.serviceProviderUrls = http://localhost:8081/foo/,http://127.0.0.1:8082/bar/
cuba.idp.serviceProviderLogoutUrls = http://localhost:8081/foo/dispatch/idpc/logout,http://127.0.0.1:8082/bar/dispatch/idpc/logout
cuba.idp.trustedServicePassword = mdgh12SSX_pic2

cuba.webAppUrl = http://localhost:8081/foo/

cuba.web.externalAuthentication = true
cuba.web.externalAuthenticationProviderClass = com.haulmont.cuba.web.auth.IdpAuthProvider

cuba.web.idp.baseUrl = http://localhost:8081/foo/idp/
cuba.web.idp.trustedServicePassword = mdgh12SSX_pic2

Service provider:

cuba.webAppUrl = http://127.0.0.1:8082/bar/

cuba.web.externalAuthentication = true
cuba.web.externalAuthenticationProviderClass = com.haulmont.cuba.web.auth.IdpAuthProvider

cuba.web.idp.baseUrl = http://localhost:8081/foo/idp/
cuba.web.idp.trustedServicePassword = mdgh12SSX_pic2

Regards.

Hi,
This worked, changing the module prefixes and the ports worked, and I could run two applications at the same time.
Thank you

Regards