|
...
|
...
|
@@ -199,7 +199,7 @@ Command examples:
|
|
199
|
199
|
COMMAND -- kill
|
|
200
|
200
|
---------------
|
|
201
|
201
|
|
|
202
|
|
-In server mode, kill a particlar client instance.
|
|
|
202
|
+In server mode, kill a particular client instance.
|
|
203
|
203
|
|
|
204
|
204
|
Command examples:
|
|
205
|
205
|
|
|
...
|
...
|
@@ -407,6 +407,7 @@ RECONNECTING -- A restart has occurred.
|
|
407
|
407
|
EXITING -- A graceful exit is in progress.
|
|
408
|
408
|
RESOLVE -- (Client only) DNS lookup
|
|
409
|
409
|
TCP_CONNECT -- (Client only) Connecting to TCP server
|
|
|
410
|
+AUTH_PENDING -- (Client only) Authentication pending
|
|
410
|
411
|
|
|
411
|
412
|
Command examples:
|
|
412
|
413
|
|
|
...
|
...
|
@@ -437,6 +438,11 @@ Fields (e)-(h) are shown for CONNECTED state,
|
|
437
|
437
|
(e) is available starting from OpenVPN 2.1
|
|
438
|
438
|
(f)-(i) are available starting from OpenVPN 2.4
|
|
439
|
439
|
|
|
|
440
|
+For AUTH_PENDING, if (c) is present, it would read
|
|
|
441
|
+as "timeout number" where number is the number of seconds
|
|
|
442
|
+before authentication will timeout. It is printed as an
|
|
|
443
|
+unsigned integer (%u).
|
|
|
444
|
+
|
|
440
|
445
|
Real-time state notifications will have a ">STATE:" prefix
|
|
441
|
446
|
prepended to them.
|
|
442
|
447
|
|
|
...
|
...
|
@@ -608,7 +614,7 @@ COMMAND -- client-pending-auth (OpenVPN 2.5 or higher)
|
|
608
|
608
|
Instruct OpenVPN server to send AUTH_PENDING and INFO_PRE message
|
|
609
|
609
|
to signal a pending authenticating to the client. A pending auth means
|
|
610
|
610
|
that the connecting requires extra authentication like a one time
|
|
611
|
|
-password or doing a single sign one via web.
|
|
|
611
|
+password or doing a single sign on via web.
|
|
612
|
612
|
|
|
613
|
613
|
client-pending-auth {CID} {EXTRA} {TIMEOUT}
|
|
614
|
614
|
|
|
...
|
...
|
@@ -624,22 +630,22 @@ the timeout proposed by the server, even if the timeout is shorter.
|
|
624
|
624
|
If the client does not receive a packet from the server for hand-window the
|
|
625
|
625
|
connection times out regardless of the timeout. This ensures that the connection
|
|
626
|
626
|
still times out relatively quickly in case of network problems. The client will
|
|
627
|
|
-continously send PULL_REQUEST messages to the server until the timeout is reached.
|
|
|
627
|
+continuously send PULL_REQUEST messages to the server until the timeout is reached.
|
|
628
|
628
|
This message also triggers an ACK message from the server that resets the
|
|
629
|
629
|
hand-window based timeout.
|
|
630
|
630
|
|
|
631
|
631
|
Both client and server limit the maximum timeout to the smaller value of half the
|
|
632
|
632
|
--tls-reneg minimum time and --hand-window time (defaults to 60s).
|
|
633
|
633
|
|
|
634
|
|
-For the format of EXTRA see below. For the OpenVPN server this is a stateless
|
|
|
634
|
+For the format of {EXTRA} see below. For OpenVPN server this is a stateless
|
|
635
|
635
|
operation and needs to be followed by a client-deny/client-auth[-nt] command
|
|
636
|
636
|
(that is the result of the out of band authentication).
|
|
637
|
637
|
|
|
638
|
638
|
Before issuing a client-pending-auth to a client instead of a
|
|
639
|
639
|
client-auth/client-deny, the server should check the IV_SSO
|
|
640
|
|
-environment variable if the method is support. The currently
|
|
641
|
|
-defined method are crtext for challenge/response using text
|
|
642
|
|
-(e.g. TOTP), openurl and proxy_url for opening an URL in the client to
|
|
|
640
|
+environment variable for whether the method is supported. Currently
|
|
|
641
|
+defined methods are crtext for challenge/response using text
|
|
|
642
|
+(e.g., TOTP), openurl and proxy_url for opening a URL in the client to
|
|
643
|
643
|
continue authentication. A client supporting the first two methods would
|
|
644
|
644
|
set
|
|
645
|
645
|
|
|
...
|
...
|
@@ -649,17 +655,30 @@ The variable name IV_SSO is historic as AUTH_PENDING was first used
|
|
649
|
649
|
to signal single sign on support. To keep compatibility with existing
|
|
650
|
650
|
implementations the name IV_SSO is kept in lieu of a better name.
|
|
651
|
651
|
|
|
|
652
|
+The management interface of the client receives notification of
|
|
|
653
|
+pending auth via
|
|
|
654
|
+
|
|
|
655
|
+>STATE:datetime,AUTH_PENDING,[timeout number]
|
|
|
656
|
+
|
|
|
657
|
+If {EXTRA} is present the client is informed using INFOMSG
|
|
|
658
|
+notification as
|
|
|
659
|
+
|
|
|
660
|
+>INFOMSG:{EXTRA}
|
|
|
661
|
+
|
|
|
662
|
+where {EXTRA} is formatted as received from the server.
|
|
|
663
|
+Currently defined formats for {EXTRA} are detailed below.
|
|
|
664
|
+
|
|
652
|
665
|
openurl
|
|
653
|
666
|
========
|
|
654
|
667
|
For a web based extra authentication (like for
|
|
655
|
|
-SSO/SAML) EXTRA should be
|
|
|
668
|
+SSO/SAML) {EXTRA} should be
|
|
656
|
669
|
|
|
657
|
670
|
OPEN_URL:url
|
|
658
|
671
|
|
|
659
|
|
-and client should ask to the user to open the URL to continue.
|
|
|
672
|
+and client should ask the user to open the URL to continue.
|
|
660
|
673
|
|
|
661
|
674
|
The space in a control message is limited, so this url should be kept
|
|
662
|
|
-short to avoid issues. If a loger url is required a URL that redirects
|
|
|
675
|
+short to avoid issues. If a longer url is required a URL that redirects
|
|
663
|
676
|
to the longer URL should be sent instead.
|
|
664
|
677
|
|
|
665
|
678
|
A complete documentation how URLs should be handled on the client is available
|
|
...
|
...
|
@@ -667,17 +686,18 @@ in the openvpn3 repository:
|
|
667
|
667
|
|
|
668
|
668
|
https://github.com/OpenVPN/openvpn3/blob/master/doc/webauth.md
|
|
669
|
669
|
|
|
670
|
|
-url_proxy
|
|
|
670
|
+proxy_url
|
|
671
|
671
|
========
|
|
672
|
|
-To avoid issues with OpenVPN connection persist-tun and not able
|
|
673
|
|
-to reach the web server, a variant of openurl via a HTTPS
|
|
674
|
|
-Proxy exists. The client should announce url_proxy in its IV_SSO
|
|
675
|
|
-and parse the PROXY_URL message. The format is
|
|
|
672
|
+This is a variant of openurl that allows opening a url via an
|
|
|
673
|
+HTTP proxy. It could be used to avoid issues with OpenVPN connection's
|
|
|
674
|
+persist-tun that may cause the web server to be unreachable.
|
|
|
675
|
+The client should announce proxy_url in its IV_SSO and parse the
|
|
|
676
|
+PROXY_URL message. The format of {EXTRA} in this case is
|
|
676
|
677
|
|
|
677
|
678
|
PROXY_URL:<proxy>:<proxy_port>:<proxyuser_base64>:<proxy_password_base64>:url
|
|
678
|
679
|
|
|
679
|
|
-The proxy should be a literal IPv4 address or IPv6 address in [] to avoid
|
|
680
|
|
-ambiguity in parsing. A literal IP address is preferred as DNS might not be
|
|
|
680
|
+The proxy should be a literal IPv4 address or IPv6 address enclosed in [] to avoid
|
|
|
681
|
+ambiguity in parsing. A literal IP address is preferred as DNS might not be
|
|
681
|
682
|
available when the client needs to open the url. The IP address will usually
|
|
682
|
683
|
be the address that client uses to connect to the VPN server. For dual-homed
|
|
683
|
684
|
VPN servers, the server should respond with the same address that the client
|
|
...
|
...
|
@@ -685,19 +705,18 @@ connects to.
|
|
685
|
685
|
|
|
686
|
686
|
This address is also usually excluded from being redirected over the VPN
|
|
687
|
687
|
by a host route. If the platform (like Android) uses another way of protecting
|
|
688
|
|
-the VPN connection routing loops the client needs to also exclude the
|
|
|
688
|
+the VPN connection from routing loops, the client needs to also exclude the
|
|
689
|
689
|
connection to the proxy in the same manner.
|
|
690
|
690
|
|
|
691
|
691
|
Should another IP be used, then the VPN configuration should include a route
|
|
692
|
|
-statement to exclude that route from being routed over the VPN.
|
|
|
692
|
+statement to exclude that address from being routed over the VPN.
|
|
693
|
693
|
|
|
694
|
694
|
crtext
|
|
695
|
695
|
=======
|
|
696
|
|
-
|
|
697
|
|
-The format of EXTRA is similar to the already used two step authentication
|
|
|
696
|
+The format of {EXTRA} is similar to the already used two step authentication
|
|
698
|
697
|
described in Challenge/Response Protocol section of this document. Since
|
|
699
|
|
-most of the fields are not necessary or can be infered only the <flags>
|
|
700
|
|
-and <challgenge_text> fields are used:
|
|
|
698
|
+most of the fields are not necessary or can be inferred, only the <flags>
|
|
|
699
|
+and <challenge_text> fields are used:
|
|
701
|
700
|
|
|
702
|
701
|
CR_TEXT:<flags>:<challenge_text>
|
|
703
|
702
|
|
|
...
|
...
|
@@ -707,7 +726,8 @@ and <challgenge_text> fields are used:
|
|
707
|
707
|
|
|
708
|
708
|
<challenge_text>: the challenge text to be shown to the user.
|
|
709
|
709
|
|
|
710
|
|
-
|
|
|
710
|
+The client should return the response to the crtext challenge
|
|
|
711
|
+using the cr-response command.
|
|
711
|
712
|
|
|
712
|
713
|
COMMAND -- client-deny (OpenVPN 2.1 or higher)
|
|
713
|
714
|
-----------------------------------------------
|
|
...
|
...
|
@@ -925,17 +945,18 @@ To accept connecting to the host and port directly, use this command:
|
|
925
|
925
|
|
|
926
|
926
|
COMMAND -- cr-response (OpenVPN 2.5 or higher)
|
|
927
|
927
|
-------------------------------------------------
|
|
928
|
|
-Provides support for sending responses a challenge/response
|
|
929
|
|
-query via INFOMSG,CR_TEXT. The response should be base64 encoded:
|
|
|
928
|
+Provides support for sending responses to a challenge/response
|
|
|
929
|
+query via INFOMSG,CR_TEXT (client-only). The response should
|
|
|
930
|
+be base64 encoded:
|
|
930
|
931
|
|
|
931
|
932
|
cr-response SGFsbG8gV2VsdCE=
|
|
932
|
933
|
|
|
933
|
|
-The document is intended to be used after the client received a
|
|
934
|
|
-CR_TEXT challenge (see send-pending-auth section). The answer is
|
|
935
|
|
-the answer to the challenge and depends on the challenge itself
|
|
936
|
|
-for a TOTP challenge this would the number encoded as base64 or
|
|
937
|
|
-just a string for a challenge like "what day is it today?".
|
|
938
|
|
-
|
|
|
934
|
+This command is intended to be used after the client receives a
|
|
|
935
|
+CR_TEXT challenge (see client-pending-auth section). The argument
|
|
|
936
|
+to cr-response is the base64 encoded answer to the challenge and
|
|
|
937
|
+depends on the challenge itself. For a TOTP challenge this would be
|
|
|
938
|
+a number encoded as base64; for a challenge like "what day is it today?"
|
|
|
939
|
+it would be a string encoded as base64.
|
|
939
|
940
|
|
|
940
|
941
|
COMMAND -- pk-sig (OpenVPN 2.5 or higher, management version > 1)
|
|
941
|
942
|
COMMAND -- rsa-sig (OpenVPN 2.3 or higher, management version <= 1)
|
|
...
|
...
|
@@ -1076,6 +1097,9 @@ PASSWORD -- Used to tell the management interface client that OpenVPN
|
|
1076
|
1076
|
STATE -- Shows the current OpenVPN state, as controlled
|
|
1077
|
1077
|
by the "state" command.
|
|
1078
|
1078
|
|
|
|
1079
|
+INFOMSG -- Authentication related info from server such as
|
|
|
1080
|
+ CR_TEXT or OPEN_URL. See description under client-pending-auth
|
|
|
1081
|
+
|
|
1079
|
1082
|
The CLIENT notification
|
|
1080
|
1083
|
-----------------------
|
|
1081
|
1084
|
|
|
...
|
...
|
@@ -1133,14 +1157,15 @@ CLIENT notification types:
|
|
1133
|
1133
|
>CLIENT:ENV,...
|
|
1134
|
1134
|
>CLIENT:ENV,END
|
|
1135
|
1135
|
|
|
1136
|
|
- Using the cr-response command on the client side will trigger this
|
|
|
1136
|
+ Use of the cr-response command on the client side will trigger this
|
|
1137
|
1137
|
message on the server side.
|
|
1138
|
1138
|
|
|
1139
|
|
- CR_RESPONSE notification. The >CR_RESPONSE fulfils the same purpose as the
|
|
|
1139
|
+ CR_RESPONSE notification fulfills the same purpose as the
|
|
1140
|
1140
|
CRV1 response in the traditional challenge/response. See that section
|
|
1141
|
|
- below for more details. Since this still uses the same cid as the original
|
|
1142
|
|
- response, we do not use the username and opaque session data in this
|
|
1143
|
|
- response but only contains the actual response.
|
|
|
1141
|
+ below for more details. Since this uses the same cid as in the original
|
|
|
1142
|
+ client-pending-auth challenge, we do not include the username and opaque
|
|
|
1143
|
+ session data in this notification. The string {response_base64} only contains
|
|
|
1144
|
+ the actual response received from the client.
|
|
1144
|
1145
|
|
|
1145
|
1146
|
It is important to note that OpenVPN2 merely passes the authentication
|
|
1146
|
1147
|
information and does not do any further checks. (E.g. if a CR was issued
|
|
...
|
...
|
@@ -1148,7 +1173,7 @@ CLIENT notification types:
|
|
1148
|
1148
|
data has a valid base64 encoding)
|
|
1149
|
1149
|
|
|
1150
|
1150
|
This interface should be be sufficient for almost all challenge/response
|
|
1151
|
|
- system that can be implemented with a single round and base64 encoding the
|
|
|
1151
|
+ system that can be implemented with a single round and base64 encoding of the
|
|
1152
|
1152
|
response. Mechanisms that need multiple rounds or more complex answers
|
|
1153
|
1153
|
should implement a different response type than CR_RESPONSE.
|
|
1154
|
1154
|
|