derricksmith/phpsaml

Error using Azure AD authentication even with compression off

Opened this issue · 9 comments

Hi,
Previously we were getting errors because Azure AD does not support compressed SAML authentication requests. You added a way to disable compression in the config file, but now Microsoft is giving a different error when we try to authenticate:
AADSTS750055: SAML message was not properly DEFLATE-encoded.

Perhaps this maybe useful:
From the reference online encoding linked in the question, Azure AD is expecting raw deflate data. To get that, replace the deflateInit() call with:

deflateInit2(&zs, compressionlevel, 8, -15, 8, 0)

The web page is here:
https://stackoverflow.com/questions/73938815/zlib-deflated-samlrequest-returns-a-not-deflated-propper-by-azure-ad

I have the same problem, nothing in the logs

Hi, I didn't even know about the fork, so thank you and hope you can fix it.

Hi @DonutsNL. Any progress on replacing the deflateInit() call?

I am making it configurable in a new version of the plugin. I am also adressing some structural stuff to adopt composer and psr4 namespaces.

Thats still a work in progress. Finished working on the main config and got basic crud working. Keep an eye out on my repo, ill be posting updates there.

In the meanwhile you can disable/enable conpression manually in the config.class.php.

Greetings, thank you very much for all your work, how can I test your new version?, I have tried to use the repository from git "phpsaml2" but it is still not visible from the plugins in GLPI. Thanks!

I will post some instructions in the repo. Basically it requires you to manually download it and place it inside the marketplace folder in a folder named "glpisaml." Make sure the environment you using for testing is not a production environment. the plugin is very much a work in progress and not yet functional or production ready. I just finished the configuration interface and would very much like to get some early feedback on that. Rgrds,