Closed lvml closed 4 years ago
(I don't know much about the Python "requests" library, but would guess that using https://2.python-requests.org/en/master/user/advanced/#client-side-certificates could be sufficient, here?)
I meanwhile found that inserting s.cert = '/path/client.cert'
after creating the "session" does actually work, and now only other issues with the authentication dance remain to be solved.
BTW: The warning at the linked python documentation page "The private key to your local certificate must be unencrypted. Currently, Requests does not support using encrypted keys." seems outdated - I am asked for a certificate decryption key if the certificate is encrypted, and decryption seems to work fine.
Leaving this issue open as a suggestion to add the client certificate support "officially".
@lvml: Everything is done in coldcoff/pan-globalprotect-okta, this will hopefully be merged along the following merge chain:
coldcoff/pan-globalprotect-okta -> aclindsa/pan-globalprotect-okta -> arthepsy/pan-globalprotect-okta
@aclindsa and myself agreed to bring this feature "back home" to @arthepsy with our combined PR https://github.com/arthepsy/pan-globalprotect-okta/pull/19
Hi (and first of all thanks for your GP/Okta related efforts!),
I have access to a GP VPN portal of which there is a newer version now that also requires a second factor via Okta.
Trying your gp-okta.py script to address this, I run into the problem that the prelogin.response says "Valid client certificate is required" - and that is plausible since the non-Okta-using instance of the GP gateway also requires valid client certificates to be presented - which works fine when I do so with the "openconnect --certificate ..." option.
Could you support presenting a client certificate when requesting "https://vpn.example.com/global-protect/prelogin.esp"?
For completeness, the relevant part of the gp-okta.py output with "debug=1" I see: