openanalytics / shinyproxy

ShinyProxy - Open Source Enterprise Deployment for Shiny and data science apps
https://www.shinyproxy.io
Apache License 2.0
523 stars 152 forks source link

Redirection not HTTPS #391

Closed ghost closed 5 months ago

ghost commented 1 year ago

I have been stuck on this for like 10 days and more already

I have an app which uses OPENID with Microsoft but the redirection URI sent to Microsoft is not working it seems

below is my application.yaml file


server: forward-headers-strategy: native useForwardHeaders: true

proxy: title: Sites logo-url: "file:///opt/shinyproxy/assets/logo.png" template-path: /opt/shinyproxy/templates port: 3939 heartbeat-rate: 10000 heartbeat-timeout: 60000 hide-navbar: false container-log-path: /container-logs container-wait-time: 60000 container-backend: ${SHINYPROXY_BACKEND} docker: internal-networking: true container-network: "net" authentication: openid ; admin-groups: admin openid: auth-url: https://login.microsoftonline.com/28c6c543-8422-41cf-8bea-a257eddcd88c/oauth2/authorize token-url: https://login.microsoftonline.com/28c6c543-8422-41cf-8bea-a257eddcd88c/oauth2/token jwks-url: https://login.microsoftonline.com/common/discovery/keys client-id: SSSSSb client-secret: SSSSS ; users: ; - name: public ; password: public ; groups: public ; - name: staff-beginner ; password: lantuble321 ; groups: public, private, staff-beginner ; - name: staff-advanced ; password: granyurt678 ; groups: public, private, staff-beginner, staff-advanced ; - name: admin ; password: dronort432 ; groups: public, private, staff-beginner, staff-advanced, admin specs:

logging: level: root: WARN file: name: /log/shinyproxy.log

;server: ; forward-headers-strategy: native ; useForwardHeaders: true


below is my nginx configuration erver { listen 80; server_name prio.itncc.org; return 301 https://$server_name$request_uri; ; rewrite ^(.*) https://$server_name$1 permanent; }

server {

listen 443 ssl; server_name prio.itncc.org;

ssl on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_session_timeout 10m;

    ssl_certificate /etc/letsencrypt/live/prio.itncc.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/prio.itncc.org/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/prio.itncc.org/chain.pem;

access_log /var/log/nginx/ncc.carleton.ca-access.log; error_log /var/log/nginx/ncc.carleton.ca-error.log error;

; ; web application launcher ; location / { proxy_pass http://127.0.0.1:3939/; ; ProxyPassReverse http://127.0.0.1:3939/; proxy_http_version 1.1; proxy_set_header Connection "upgrade"; proxy_set_header Upgrade $http_upgrade; proxy_read_timeout 20d; proxy_buffering off;

proxy_redirect      off;
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-Protocol $scheme;
proxy_set_header    X-Forwarded-Host $server_name;

}

}

LEDfan commented 1 year ago

Hi Please see this FAQ entry on how to debug this issue: https://shinyproxy.io/faq/#invalid-redirect_uri-when-using-openid-connect-or-keycloak

LEDfan commented 5 months ago

Hi, I think this question has been answered (and it seems your account was removed), therefore I'll close this issue, please open a new issue or re-open this issue if you are still experiencing an issue.