# Auth with REMOTE\_USER in Sunstone

**URL:** <https://forum.opennebula.io/t/auth-with-remote-user-in-sunstone/5938>\
**Category:** Product Support\
**Created:** [April 19, 2018, 4:54pm UTC](https://forum.opennebula.io/t/auth-with-remote-user-in-sunstone/5938 "2018-04-19T16:54:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbernardes](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@gbernardes](https://forum.opennebula.io/u/gbernardes)\
**Post date:** [April 19, 2018, 4:54pm UTC](https://forum.opennebula.io/t/auth-with-remote-user-in-sunstone/5938/1 "2018-04-19T16:54:38Z")

</div>

Hi,

I need help for understand remote auth in Sunstone, using nginx. I am using OpenNebula 5.4 OVA image for tests. I do this:

- In /etc/one/sunstone-server.conf:  
:auth: remote

- Created user:  
$ oneuser create teste4 “teste4@TEST” --driver public

- My nginx.conf:  
…  
location / {  
auth\_basic “closed site”;  
auth\_basic\_user\_file /etc/nginx/htpasswd;  
proxy\_pass [http://127.0.0.1:9869](http://127.0.0.1:9869);  
}

- In /etc/nginx/htpasswd:  
teste4@TEST:$apr1$xxxxxxxxxxxxxxxxxxx/

Running with this configuration, after auth poup-up I click in “Login” button, but not happend nothing. Where am I going wrong?

PS: I’m using Nginx, but if need use Apache, I accept this solution too.

---

<div class="post-metadata">

**Author:** ![gbernardes](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@gbernardes](https://forum.opennebula.io/u/gbernardes)\
**Post date:** [April 23, 2018, 3:37pm UTC](https://forum.opennebula.io/t/auth-with-remote-user-in-sunstone/5938/2 "2018-04-23T15:37:53Z")

</div>

Can anyone help-me?

---

<div class="post-metadata">

**Author:** ![gbernardes](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@gbernardes](https://forum.opennebula.io/u/gbernardes)\
**Post date:** [April 26, 2018, 5:08pm UTC](https://forum.opennebula.io/t/auth-with-remote-user-in-sunstone/5938/3 "2018-04-26T17:08:10Z")

</div>

I’m almost there! What I already did:

1 - Install Nginx and Passenger, with this commands:  
# curl -sSL [https://get.rvm.io](https://get.rvm.io) | bash  
# gem install passenger  
# passenger-install-nginx-module

2 - Added in nginx.conf:  
http {  
…  
passenger\_default\_user oneadmin;

location / {  
root /usr/lib/one/sunstone/public;  
auth\_basic “closed site”;  
auth\_basic\_user\_file /etc/nginx/htpasswd;  
passenger\_enabled on;  
passenger\_sticky\_sessions on;  
}

I authenticate user OK and when click in “Login” starts load of dashboard, but in this point pop up authentication window again, and stay in this loop. Any ideas or suggestions?
