* [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
@ 2017-01-15 6:17 Pavel Raiskup
2017-01-15 8:52 ` Steffan Karger
2017-01-15 10:08 ` David Sommerseth
0 siblings, 2 replies; 8+ messages in thread
From: Pavel Raiskup @ 2017-01-15 6:17 UTC (permalink / raw)
To: openvpn-devel
Adding a new --with-ca-bundle configure option. It's argument is
used as default CA file when no --ca option is specified at
runtime.
This option is primarily designed for systems where users are
allowed to manage trusted authorities for whole system (in one
consolidated file; usually implemented in 'ca-certificates'
package).
Signed-off-by: Pavel Raiskup <praiskup@...1347...>
---
configure.ac | 5 +++++
src/openvpn/options.c | 9 +++++++++
2 files changed, 14 insertions(+)
diff --git a/configure.ac b/configure.ac
index 43487b0..f5e1e63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -308,6 +308,11 @@ AC_ARG_WITH(
[with_plugindir="\$(libdir)/openvpn/plugins"]
)
+AC_ARG_WITH(
+ [ca-bundle],
+ [AS_HELP_STRING([--with-ca-bundle], [use consolidated CA bundle])],
+ [AC_DEFINE_UNQUOTED([DEFAULT_CA_FILE], ["$withval"], [Default --ca argument])]
+)
AC_DEFINE_UNQUOTED([TARGET_ALIAS], ["${host}"], [A string representing our host])
case "$host" in
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index d9c384e..92d81ae 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -3000,6 +3000,15 @@ options_postprocess_mutate(struct options *o)
}
#endif
+#ifdef DEFAULT_CA_FILE
+ if (!o->ca_file && !platform_access(DEFAULT_CA_FILE, R_OK))
+ {
+ msg(M_WARN, "option '--ca' unspecified; using system bundle '%s'",
+ DEFAULT_CA_FILE);
+ o->ca_file = DEFAULT_CA_FILE;
+ }
+#endif
+
#if ENABLE_MANAGEMENT
if (o->http_proxy_override)
{
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
2017-01-15 6:17 [Openvpn-devel] [PATCH] options: allow setting default --ca argument value Pavel Raiskup
@ 2017-01-15 8:52 ` Steffan Karger
2017-01-15 9:12 ` Gert Doering
2017-01-15 10:08 ` David Sommerseth
1 sibling, 1 reply; 8+ messages in thread
From: Steffan Karger @ 2017-01-15 8:52 UTC (permalink / raw)
To: openvpn-devel
Hi,
On 15-01-17 07:17, Pavel Raiskup wrote:
> Adding a new --with-ca-bundle configure option. It's argument is
> used as default CA file when no --ca option is specified at
> runtime.
>
> This option is primarily designed for systems where users are
> allowed to manage trusted authorities for whole system (in one
> consolidated file; usually implemented in 'ca-certificates'
> package).
>
> Signed-off-by: Pavel Raiskup <praiskup@...1347...>
> ---
> configure.ac | 5 +++++
> src/openvpn/options.c | 9 +++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 43487b0..f5e1e63 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -308,6 +308,11 @@ AC_ARG_WITH(
> [with_plugindir="\$(libdir)/openvpn/plugins"]
> )
>
> +AC_ARG_WITH(
> + [ca-bundle],
> + [AS_HELP_STRING([--with-ca-bundle], [use consolidated CA bundle])],
> + [AC_DEFINE_UNQUOTED([DEFAULT_CA_FILE], ["$withval"], [Default --ca argument])]
> +)
>
> AC_DEFINE_UNQUOTED([TARGET_ALIAS], ["${host}"], [A string representing our host])
> case "$host" in
> diff --git a/src/openvpn/options.c b/src/openvpn/options.c
> index d9c384e..92d81ae 100644
> --- a/src/openvpn/options.c
> +++ b/src/openvpn/options.c
> @@ -3000,6 +3000,15 @@ options_postprocess_mutate(struct options *o)
> }
> #endif
>
> +#ifdef DEFAULT_CA_FILE
> + if (!o->ca_file && !platform_access(DEFAULT_CA_FILE, R_OK))
> + {
> + msg(M_WARN, "option '--ca' unspecified; using system bundle '%s'",
> + DEFAULT_CA_FILE);
> + o->ca_file = DEFAULT_CA_FILE;
> + }
> +#endif
> +
> #if ENABLE_MANAGEMENT
> if (o->http_proxy_override)
> {
>
Feature-NAK. OpenVPN should use it's own CA, not the system CA list.
There is no reason to allow hundreds of parties in the world to
man-in-the-middle your OpenVPN connections. Please please please do not
use your system CA list for OpenVPN, just specify the CA you do want to
trust.
(OpenVPN is /not/ WWW, don't think about OpenVPN's usage of CAs as if it
were the WWW.)
-Steffan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
2017-01-15 8:52 ` Steffan Karger
@ 2017-01-15 9:12 ` Gert Doering
2017-01-15 9:17 ` Steffan Karger
0 siblings, 1 reply; 8+ messages in thread
From: Gert Doering @ 2017-01-15 9:12 UTC (permalink / raw)
To: Steffan Karger <steffan@; +Cc: openvpn-devel
[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]
Hi,
On Sun, Jan 15, 2017 at 09:52:46AM +0100, Steffan Karger wrote:
> On 15-01-17 07:17, Pavel Raiskup wrote:
[..]
> > This option is primarily designed for systems where users are
> > allowed to manage trusted authorities for whole system (in one
> > consolidated file; usually implemented in 'ca-certificates'
> > package).
[..]
>
> Feature-NAK. OpenVPN should use it's own CA, not the system CA list.
I could see the use-case (enterprise wide list of trusted CAs, and
use of it compiled into an enterprise-distribute openvpn bundle),
but I agree with Steffan that it's not something we need to have in
OpenVPN - "--ca" can reference to a CA bundle today, and enterprise-
distributed config files reference the enterprise-maintained CA bundle,
it will just work without code changes.
My main reason for not liking this is "another compile-time option" -
someone has to maintain and test this, with and without this option,
which adds to our maintenance nightmare. So the gain has to be
significant.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert@...1296...
fax: +49-89-35655025 gert@...1297...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 630 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
2017-01-15 9:12 ` Gert Doering
@ 2017-01-15 9:17 ` Steffan Karger
0 siblings, 0 replies; 8+ messages in thread
From: Steffan Karger @ 2017-01-15 9:17 UTC (permalink / raw)
To: Gert Doering <gert@; +Cc: openvpn-devel
[-- Attachment #1.1: Type: text/plain, Size: 1241 bytes --]
On 15-01-17 10:12, Gert Doering wrote:
> On Sun, Jan 15, 2017 at 09:52:46AM +0100, Steffan Karger wrote:
>> On 15-01-17 07:17, Pavel Raiskup wrote:
> [..]
>>> This option is primarily designed for systems where users are
>>> allowed to manage trusted authorities for whole system (in one
>>> consolidated file; usually implemented in 'ca-certificates'
>>> package).
> [..]
>>
>> Feature-NAK. OpenVPN should use it's own CA, not the system CA list.
>
> I could see the use-case (enterprise wide list of trusted CAs, and
> use of it compiled into an enterprise-distribute openvpn bundle),
> but I agree with Steffan that it's not something we need to have in
> OpenVPN - "--ca" can reference to a CA bundle today, and enterprise-
> distributed config files reference the enterprise-maintained CA bundle,
> it will just work without code changes.
Yes, I got that. I'll be a bit more verbose: the use case is
sufficiently covered by --ca (as Gert says), and this option is *way*
too likely to be misinterpreted to 'point to
/etc/ssl/certs/ca-certificates.crt', which will in almost all setups
significantly reduces security.
We have plenty of confusing options, we really don't need another one :)
-Steffan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
2017-01-15 6:17 [Openvpn-devel] [PATCH] options: allow setting default --ca argument value Pavel Raiskup
2017-01-15 8:52 ` Steffan Karger
@ 2017-01-15 10:08 ` David Sommerseth
2017-01-15 13:52 ` Pavel Raiskup
1 sibling, 1 reply; 8+ messages in thread
From: David Sommerseth @ 2017-01-15 10:08 UTC (permalink / raw)
To: Pavel Raiskup <praiskup@
[-- Attachment #1.1: Type: text/plain, Size: 1438 bytes --]
On 15/01/17 07:17, Pavel Raiskup wrote:
> Adding a new --with-ca-bundle configure option. It's argument is
> used as default CA file when no --ca option is specified at
> runtime.
>
> This option is primarily designed for systems where users are
> allowed to manage trusted authorities for whole system (in one
> consolidated file; usually implemented in 'ca-certificates'
> package).
>
> Signed-off-by: Pavel Raiskup <praiskup@...1347...>
> ---
> configure.ac | 5 +++++
> src/openvpn/options.c | 9 +++++++++
> 2 files changed, 14 insertions(+)
As this was mentioned on a Red Hat Bugzilla (bz #1413343 [1]) as well,
I'm reiterating my argument here for closing that bugzilla as notabug.
I completely agree with Steffan, this is a NAK. Such a feature would be
a dreamscenario for The Great Firewall of China and similar national
routing instances which implements complete network surveillance. It
would make it extremely trivial for them to implement a MITM OpenVPN
server which would affect users not being aware of this issue.
This feature would elude users configuring OpenVPN it is no problem
using certificates from public CA issuers. This is a VERY BAD idea! We
should help users configure OpenVPN in a secure way by default. Not the
opposite.
[1] <https://bugzilla.redhat.com/show_bug.cgi?id=1413343>
--
kind regards,
David Sommerseth
OpenVPN Technologies, Inc
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
2017-01-15 10:08 ` David Sommerseth
@ 2017-01-15 13:52 ` Pavel Raiskup
2017-01-15 17:53 ` David Sommerseth
0 siblings, 1 reply; 8+ messages in thread
From: Pavel Raiskup @ 2017-01-15 13:52 UTC (permalink / raw)
To: openvpn-devel
On Sunday, January 15, 2017 11:08:38 AM CET David Sommerseth wrote:
> On 15/01/17 07:17, Pavel Raiskup wrote:
> > Adding a new --with-ca-bundle configure option. It's argument is
> > used as default CA file when no --ca option is specified at
> > runtime.
> >
> > This option is primarily designed for systems where users are
> > allowed to manage trusted authorities for whole system (in one
> > consolidated file; usually implemented in 'ca-certificates'
> > package).
> >
> > Signed-off-by: Pavel Raiskup <praiskup@...1347...>
> > ---
> > configure.ac | 5 +++++
> > src/openvpn/options.c | 9 +++++++++
> > 2 files changed, 14 insertions(+)
>
> As this was mentioned on a Red Hat Bugzilla (bz #1413343 [1]) as well,
> I'm reiterating my argument here for closing that bugzilla as notabug.
>
> I completely agree with Steffan, this is a NAK. Such a feature would be
> a dreamscenario for The Great Firewall of China and similar national
> routing instances which implements complete network surveillance. It
> would make it extremely trivial for them to implement a MITM OpenVPN
> server which would affect users not being aware of this issue.
>
> This feature would elude users configuring OpenVPN it is no problem
> using certificates from public CA issuers. This is a VERY BAD idea! We
> should help users configure OpenVPN in a secure way by default. Not the
> opposite.
Ack, I originally thought about this as tool to solve "packaging issue".
We have corporate-wide authority, and people usually have it stored in
bundle. But I got the point, and such a shame mistake -- there's too many
trusted CAs.
Thanks for having a look!
Pavel
>
>
> [1] <https://bugzilla.redhat.com/show_bug.cgi?id=1413343>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
2017-01-15 13:52 ` Pavel Raiskup
@ 2017-01-15 17:53 ` David Sommerseth
2017-01-15 18:59 ` Marvin Adeff
0 siblings, 1 reply; 8+ messages in thread
From: David Sommerseth @ 2017-01-15 17:53 UTC (permalink / raw)
To: Pavel Raiskup <praiskup@
[-- Attachment #1.1: Type: text/plain, Size: 2642 bytes --]
On 15/01/17 14:52, Pavel Raiskup wrote:
> On Sunday, January 15, 2017 11:08:38 AM CET David Sommerseth wrote:
>> On 15/01/17 07:17, Pavel Raiskup wrote:
>>> Adding a new --with-ca-bundle configure option. It's argument is
>>> used as default CA file when no --ca option is specified at
>>> runtime.
>>>
>>> This option is primarily designed for systems where users are
>>> allowed to manage trusted authorities for whole system (in one
>>> consolidated file; usually implemented in 'ca-certificates'
>>> package).
>>>
>>> Signed-off-by: Pavel Raiskup <praiskup@...1347...>
>>> ---
>>> configure.ac | 5 +++++
>>> src/openvpn/options.c | 9 +++++++++
>>> 2 files changed, 14 insertions(+)
>>
>> As this was mentioned on a Red Hat Bugzilla (bz #1413343 [1]) as well,
>> I'm reiterating my argument here for closing that bugzilla as notabug.
>>
>> I completely agree with Steffan, this is a NAK. Such a feature would be
>> a dreamscenario for The Great Firewall of China and similar national
>> routing instances which implements complete network surveillance. It
>> would make it extremely trivial for them to implement a MITM OpenVPN
>> server which would affect users not being aware of this issue.
>>
>> This feature would elude users configuring OpenVPN it is no problem
>> using certificates from public CA issuers. This is a VERY BAD idea! We
>> should help users configure OpenVPN in a secure way by default. Not the
>> opposite.
>
> Ack, I originally thought about this as tool to solve "packaging issue".
> We have corporate-wide authority, and people usually have it stored in
> bundle. But I got the point, and such a shame mistake -- there's too many
> trusted CAs.
I would recommend seeing the CA file being part of the configuration
instead of a packaging detail. And you can embedd the CA inside the
configuration file ... just do this in the config:
<ca>
-----BEGIN CERTIFICATE-----
....
....
....
-----END CERTIFICATE-----
</ca>
This replaces the 'ca /path/to/ca.pem' line in the configuration file.
Otherwise, for enterprises doing their own packaging ... it is also
possible to install the OpenVPN CA file in /etc/pki/.... which is easily
done with RPM files which again can be pushed out through internal
repositories or Satellite. The distributed configurations would then
just need to use 'ca /etc/pki/tls/cert/openvpn-ca.pem'.
It all depends on how often it is expected to distribute configuration
files vs how often the CA certificate is renewed.
--
kind regards,
David Sommerseth
OpenVPN Technologies, Inc
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH] options: allow setting default --ca argument value
2017-01-15 17:53 ` David Sommerseth
@ 2017-01-15 18:59 ` Marvin Adeff
0 siblings, 0 replies; 8+ messages in thread
From: Marvin Adeff @ 2017-01-15 18:59 UTC (permalink / raw)
To: openvpn-devel
A User's Perspective:
We've been doing just this since ovpn began allowing inline certs. Works great! Recommend.
Marvin
Sent from my iPhone
> On Jan 15, 2017, at 9:53 AM, David Sommerseth <openvpn@...2080...> wrote:
>
>> On 15/01/17 14:52, Pavel Raiskup wrote:
>>> On Sunday, January 15, 2017 11:08:38 AM CET David Sommerseth wrote:
>>>> On 15/01/17 07:17, Pavel Raiskup wrote:
>>>> Adding a new --with-ca-bundle configure option. It's argument is
>>>> used as default CA file when no --ca option is specified at
>>>> runtime.
>>>>
>>>> This option is primarily designed for systems where users are
>>>> allowed to manage trusted authorities for whole system (in one
>>>> consolidated file; usually implemented in 'ca-certificates'
>>>> package).
>>>>
>>>> Signed-off-by: Pavel Raiskup <praiskup@...1347...>
>>>> ---
>>>> configure.ac | 5 +++++
>>>> src/openvpn/options.c | 9 +++++++++
>>>> 2 files changed, 14 insertions(+)
>>>
>>> As this was mentioned on a Red Hat Bugzilla (bz #1413343 [1]) as well,
>>> I'm reiterating my argument here for closing that bugzilla as notabug.
>>>
>>> I completely agree with Steffan, this is a NAK. Such a feature would be
>>> a dreamscenario for The Great Firewall of China and similar national
>>> routing instances which implements complete network surveillance. It
>>> would make it extremely trivial for them to implement a MITM OpenVPN
>>> server which would affect users not being aware of this issue.
>>>
>>> This feature would elude users configuring OpenVPN it is no problem
>>> using certificates from public CA issuers. This is a VERY BAD idea! We
>>> should help users configure OpenVPN in a secure way by default. Not the
>>> opposite.
>>
>> Ack, I originally thought about this as tool to solve "packaging issue".
>> We have corporate-wide authority, and people usually have it stored in
>> bundle. But I got the point, and such a shame mistake -- there's too many
>> trusted CAs.
>
> I would recommend seeing the CA file being part of the configuration
> instead of a packaging detail. And you can embedd the CA inside the
> configuration file ... just do this in the config:
>
> <ca>
> -----BEGIN CERTIFICATE-----
> ....
> ....
> ....
> -----END CERTIFICATE-----
> </ca>
>
> This replaces the 'ca /path/to/ca.pem' line in the configuration file.
>
> Otherwise, for enterprises doing their own packaging ... it is also
> possible to install the OpenVPN CA file in /etc/pki/.... which is easily
> done with RPM files which again can be pushed out through internal
> repositories or Satellite. The distributed configurations would then
> just need to use 'ca /etc/pki/tls/cert/openvpn-ca.pem'.
>
> It all depends on how often it is expected to distribute configuration
> files vs how often the CA certificate is renewed.
>
>
> --
> kind regards,
>
> David Sommerseth
> OpenVPN Technologies, Inc
>
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-01-15 18:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-15 6:17 [Openvpn-devel] [PATCH] options: allow setting default --ca argument value Pavel Raiskup
2017-01-15 8:52 ` Steffan Karger
2017-01-15 9:12 ` Gert Doering
2017-01-15 9:17 ` Steffan Karger
2017-01-15 10:08 ` David Sommerseth
2017-01-15 13:52 ` Pavel Raiskup
2017-01-15 17:53 ` David Sommerseth
2017-01-15 18:59 ` Marvin Adeff
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.