https://prefect.io logo
Title
l

Luca Schneider

09/14/2021, 3:46 PM
Hi all, question regarding prefect UI and a reverse proxy with basic auth (such as nginx). All my prefect server components sit behind nginx with basic auth. Everything is working except the Interactive API page where it keeps prompting for user:pwd as if every API call would need to be authenticated. I am assuming there is a conflict with authentification header or am I missing something ?
z

Zach Angell

09/14/2021, 3:59 PM
Hi @Luca Schneider which version of Server are you using?
l

Luca Schneider

09/14/2021, 4:06 PM
0.15.4
👍 1
my nginx.conf looks like that. with the UI sitting at the root and apollo sitting on a path
server {
        auth_basic ***
        auth_basic_user_file ***
                              
                              
                               location /apollo/{
                                               proxy_pass <http://apollo:4200/>;
                                               proxy_set_header Host $http_host;
                                               proxy_set_header X-Real-IP $remote_addr;                                     
                                               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                                      
                                               proxy_set_header X-Forwarded-Proto $scheme;
                               }
                              
                               }
                              
                               location /{
                                               proxy_pass <http://prefect-ui:8080/>;
                                               proxy_set_header Host $http_host;
                                               proxy_set_header X-Real-IP $remote_addr;                                     
                                               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                                      
                                               proxy_set_header X-Forwarded-Proto $scheme;
                                              
                               }
}
z

Zach Angell

09/14/2021, 6:05 PM
I checked with the team on this. Every API call will have to be authenticated, including those from the Interactive API
👍 1
l

Luca Schneider

09/14/2021, 6:13 PM
I was planning to move to a client certificate authentification at some point. It should fix this issue.
👍 1
Thanks