pam-oauth2
pam-oauth2 copied to clipboard
Support POST API requests?
I was trying to set this up to authenticate against Keycloak's token endpoint and discovered that it seems to be hard coded to use GET requests w hile the API I have requires the secrets be passed in POST data. I can construct a working query via curl that returns something I think will be processed okay, but when I setup PAM to do the same thing with this module I can only figure out how to get a GET request out.
Comments in #3 which also mentions Keycloak suggest using a different project pam-exec-oauth2 which seems to send POST requests correctly. I going to try setting up that for now, but I would rather switch back to this if a way to authenticate against Keycloak was added.
By the way, I did setup Arch Linux packaging on the AUR for this if anybody wants it.
I think one of the existing forks already supports it: https://github.com/WLOGSolutions/pam-oauth2
Hmm, that does look promising. The documentation is dicy but it looks like it might handle the request.
Would you accept a PR with that change if I cleaned it up a bit? It would be nice to get document working Keycloak support in a tagged release.
@alerque per chance did you have some time to spend on a patch?
No I haven't gotten a chance to invest back in this. I am still using pam-exec-oauth2 in production as was my temporary resolution above. I could potentially put it back on my todo list, but not having an answer from the maintainer as to whether that change would even be accepted is not exactly encouraging.
@CyberDem0n what do you think?