bwsw / cloudstack-ui

Modern UI for Apache Cloudstack User Self Service Portal
https://bitworks.software/
Apache License 2.0
163 stars 63 forks source link

Unable to login using docker image. #1673

Closed goaliejordan closed 4 years ago

goaliejordan commented 4 years ago

Running Cloudstack 4.11.2.0 on Ubuntu 16.04.5 with HTTPS. I followed the steps to run the docker image and can reach the login screen. docker run -d -p 8080:80 --name cloudstack-ui -e CLIENT_ENDPOINT=https://cloudstack-example.com:8443/client -e BASE_HREF=base_href bitworks.software:8443/cloudstack-ui:1.411.29.

When trying to login with any admin account both ldap and local I am unable to do so. Cloudstack apilog: [a.c.c.a.ApiServer] -- POST command=login domain= [a.c.c.a.ApiServer] -- GET command=listCapabilities&response=json&sessionKey=somekey 401 unable to verify user credentials and/or request signature [a.c.c.a.ApiServer] -- POST command=logout=== Logging out === The web inspection for chrome and edge show: HTTP401: DENIED - The requested resource requires user authentication.

Have you seen this before? I cannot find any examples of logins to see if I am missing a step or if something is wrong in Cloudstack settings. Any help would be greatly appreciated. Thanks

goaliejordan commented 4 years ago

I was able to login setting https=false on the cloudstack manager and using http instead for the endpoint.

bwsw commented 4 years ago

@goaliejordan well, it's a problem when you use HTTP Nginx (CSUI) behind HTTPS CS, you should either use HTTPS/HTTPS, HTTPS/HTTP or HTTP/HTTP, but not HTTP/HTTPS.

Take a look here:

https://github.com/bwsw/cloudstack-ui/blob/master/.build/nginx.conf#L13 I don't know why, but it should fix the problem automatically when HTTPS upstream is used.

bwsw commented 4 years ago

@goaliejordan in our deployments it works well.

bwsw commented 4 years ago

@goaliejordan The issue is found and fixed in recent update #1681 you can check it now.