-
Notifications
You must be signed in to change notification settings - Fork 329
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
failed to connect just with a certificate #375
Comments
I don't find the error message in the source (at least not the current one). Are you using the network manager applet? |
Yes I'm using the network manager applet. Thanks for the tip, I'll give it a try. |
I managed to skip over asking for a username and password, but now I have the same error as in issue #366. |
The error in #366 is probably unrelated (it's not a Fortinet gateway). |
It would be best to provide your own verbose log (use |
|
Ok, it could not authenticate you with an empty password. I can't test it easily, because local users always have a password, so your account is probably an external one (LDAP or Radius, ...). Maybe we are lucky and it is sufficient just to drop the parameter for the password from the request that is sent out. Try out this branch. It will interactively ask you for a password - just hit enter and in the case of an empty password it is just not sent (that's the most simple implementation I can imagine, and probably good enough for a first test). |
I cloned the branch, commented out lines 403-416 in main.c. (this was recommended by mrbaseman) After that I run autogen.sh, ./configure and make. |
Does authentication with certificate only work with the proprietary Forticlient? Do you have a chance to capture the packets? Probably this is difficult, because you would have to break up https, which in turn lets the authentication fail ;-) |
I'm sorry, it seems I forgot to push my commits upstream. @Claudiuion could you retry, please? Probably you have to |
I have this error when I try to compile. |
I think, somehow I was in the middle of merging in the latest commits from master. I have just pushed another correction which makes this compile error go away. |
@Claudiuion were you able to test this again after I have fixed the compile error? |
yes, but I have the same problem:
|
well, it would have been too easy... Probably one would have to know more about how this login process is handled. Probably the account is in an LDAP or Radius server, and the certificate or its subject is also part of the user profile, and it is somehow taken by the VPN and forwarded to the server that handles the authentication. But that's quite speculative, too. I fear that I can't help much more. |
If you have any other ideas, I'm willing to test since I have the same issue |
Hmm... the connection mechanism would be interesting to inspect, e.g. using |
With the recently released version 1.8.0 we have improved the debugging output. I have rebase my cert-only branch, and then openfortivpn might give more hints about the login process when started with |
FWIW I have another fortigate vpn that is certificate only auth, it works if I just provide whatever random password (I have "notused"); it looks like the server just ignores this part of the handshake |
Ah: the username I use isn't random, it's the Subject CN of the client certificate.
I would use |
@Claudiuion could you double-check that the username matches the CN of the certificate? |
Test made on openfortivpn 1.8.0, cert-only branch |
Thanks for trying... My CN doesn't have a space, I wonder if they have some way of escaping it (we don't do urlencoding right, might be worth trying %20?) That aside I don't have much idea, I don't have access to the fortigate config either :/ |
@martinetd Indeed url_encode() converts space Is |
Ah we do urlencode the username as well, then it'll be a pain to test at user level. |
it would perhaps help to know how this is implemented on the server-side at all. Is it an LDAP, Radius, AD, ...? |
hello. i made a new test using the last commits on cert-only branch. The log: As a username I used the CN from the certificate. The username also contains a space between first and lastname (CN = firstname lastname). |
:( the same error. The proprietary client works without issues. Please check this log maybe it gives you an idea... |
the foritclientsslvpn's log say "realm enabled" but don't list anything after it, there might be something to set for openfortivpn? (we have a That aside if your username is now properly listed with a %20 in the new openfortivpn's log with the new branch I really am out of idea... I no longer have access to my cert-only vpn btw so can't help anymore with that. |
My cert-only branch that I have mentioned above went into the 1.11.0 Release. We haven't heard back anything here, maybe the |
...and try to solve login problems with certificate only (adrienverge#375)
Dimitri has found a problem with a commit originally from my cert-only branch in #496 |
@Claudiuion would you mind testing once more with the current master branch? |
@mrbaseman I'm getting a segfault
Later edit:
I can now connect |
I have initiated a Coverity scan by pushing the latest master branch into the coverity_scan branch. "Your build is in the queue to be analyzed. There are 292 builds ahead of it" unfortunately. |
it fails to add the nameservers to
|
@nicolaerosia How is this related to connection with a certificate? If unrelated please create a new issue. |
@DimitriPapadopoulos I don't know - it is the first time I'm using openfortivpn, I just wanted to report that auth with cert works fine but with this small issue. |
@nicolaerosia Please create a new issue. |
the segfault should be fixed on master with #513 now |
I have opened the separate issue for the DNS resolution topic, please see my answer there |
@nicolaerosia Have you seen the new issue we have created regarding the error you experienced (#514)? |
@Claudiuion This should be fixed in current versions. If not please do not hesitate to reopen. I'm also closing this issue because it has grown too complicated and references multiple issues. |
Our server supports only authentication with a certificate. We don't have usernames and passwords. Is it possible to bypass the verification for a username and pass?
The error that I receive is:
VPN connection: failed to connect: 'Missing required option “user”.
The text was updated successfully, but these errors were encountered: