Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLPI Single Sign On with Keycloak #118

Open
Gribou opened this issue Feb 24, 2025 · 4 comments
Open

GLPI Single Sign On with Keycloak #118

Gribou opened this issue Feb 24, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@Gribou
Copy link

Gribou commented Feb 24, 2025

Hello,
First of all, thank you for this plugin that I have been looking for for a long time.
I tried to create authentication with a Keycloak server, but when I test it, I get the following error:

Image

Is this due to a misconfiguration of the plugin or a misconfiguration of Keycloak?

@eduardomozart
Copy link
Collaborator

It seems a misconfiguration, as it's returning a 404 error. It also seems that you're using a NGINX proxy, it maybe an issue there. The URL "/plugins/singlesignon/front/callback.php/provider/1" in fact doesn't exist, it's a pseudo URL that should redirect to "/plugins/singlesignon/front/callback.php" which parses "/provider/1" as a parameter, maybe your proxy is attempting to check if it exists but it doesn't.

@eduardomozart eduardomozart added help wanted Extra attention is needed need feedback Need feedback labels Feb 25, 2025
@Gribou
Copy link
Author

Gribou commented Feb 26, 2025

Hello,
Thank you for your response. You are absolutely right, I am using Nginx as the web server to serve PHP pages. I tried to configure Nginx but I must admit that I am struggling, have you ever installed the plugin on a server with Nginx/1.27.4 and PHP-FPM 8.2.27? The Nginx server is running in a Docker container and PHP is running in another.
When i go to the pugin page and click to 'Test unique identification'
I've got : "Fournisseur non défini
Revenir à la page précédente
Retour en haut de page"
Message.

In the logs of nginx i see :👍
"GET /plugins/singlesignon/front/callback.php/provider/1 HTTP/1.1" 302 5 "https://*****************.com/plugins/singlesignon/front/provider.form.php?id=1"

GET /provider/1/index.php?redirect=%2Fplugins%2Fsinglesignon%2Ffront%2Fcallback.php%2Fprovider%2F1 HTTP/1.1" 404 27 "https://*******************.com/plugins/singlesignon/front/provider.form.php?id=1"

My nginx config file looks like this :


server {
listen 8080;
server_name localhost;

    root /usr/share/nginx/html;
    index index.php index.html;

    location / {
        try_files $uri $uri/ =404;
    }
    
    location ~ ^/plugins/singlesignon/.*\.php$
    include fastcgi_params;
    fastcgi_pass php:9000;
    fastcgi_index index.php;

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param QUERY_STRING $query_string;
    try_files $uri =404;

}



    location ~ /\.ht {
        deny all;
    }
}

Do you think my nginx configuration file is correct ?

@eduardomozart
Copy link
Collaborator

I'm not a specialist on NGINX, but I believe I'll implement a fix that will change the URL format to /plugins/singlesignon/front/callback.php?provider=1 which should make it work, but we require some time to implement this change.

@eduardomozart eduardomozart added bug Something isn't working and removed need feedback Need feedback help wanted Extra attention is needed labels Feb 26, 2025
@Gribou
Copy link
Author

Gribou commented Feb 26, 2025

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants