Subject: [dns-privacy] Operating System API support for DNS security policy

From: Iain Sharp <[email-masked]>
Date: Mon, 19 Aug 2019 09:56:37 +0000

All,

DNS over TLS offers the ability to perform DNS queries over a TLS secured channel. In my understanding, DNS over TLS is not yet available in all operating systems, but operating system support could become common in future.

Many applications rely on operating system APIs to access DNS services. As native support of DNS over TLS rolls out in to operating systems it seems likely that some applications will wish to control the security policy that the operating system applies when it performs DNS resolution. For example, the application may wish to require that the operating system uses an encrypted DNS protocol.

Today, most operating systems use the getaddrinfo() function described in RFC3493 as the basis of their API for translating DNS names to IP addresses, but this does not have security policy attributes. Is anyone aware of any activity to enhance the RFC3493 work to add application control of security policy to the getaddrinfo()  capabilities?

Unless operating systems support secure DNS standards and expose APIs to allow applications to use them effectively then applications that require secure DNS have little choice other than to roll their own implementations.

Thanks

Iain

---

From: Shane Kerr <[email-masked]>
Date: Mon, 19 Aug 2019 12:17:38 +0200

Iaian,

On 19/08/2019 11.56, Iain Sharp wrote:
> Today, most operating systems use the getaddrinfo() function described 
> in RFC3493 as the basis of their API for translating DNS names to IP 
> addresses, but this does not have security policy attributes. Is anyone 
> aware of any activity to enhance the RFC3493 work to add application 
> control of security policy to the getaddrinfo()  capabilities?

I think that we should look instead at using a more modern API like getdns:

https://getdnsapi.net/

Cheers,

--
Shane

---

From: Tommy Jensen <[email-masked]>
Date: Mon, 19 Aug 2019 17:29:06 +0000

Hey Iain,

Iain> Many applications rely on operating system APIs to access DNS services. As native support of DNS over TLS rolls out in to operating systems it seems likely that some applications will wish to control the security policy that the operating system applies when it performs DNS resolution. For example, the application may wish to require that the operating system uses an encrypted DNS protocol.

I actually don't see this being necessary. Walking through the possibilities:

  *   If the OS supports DoT and the configured servers support it:
     *   OS should be using DoT whether the app requests it or not
  *   If the OS supports DoT but the servers don't:
     *   App intent isn't helpful (to the same server)
  *   If the OS doesn't support it:
     *   App intent isn't helpful

My view is that the OS should be taking the most secure DNS route it has available regardless of app request (after all, think of all the apps which won't request DoT but should). In the case where the OS supports DoT but isn't using it, that decision is being made in the context of other information, such as enterprise configuration, that the app may not have.

Iain> Unless operating systems support secure DNS standards and expose APIs to allow applications to use them effectively then applications that require secure DNS have little choice other than to roll their own implementations.

I totally agree. Platforms should be providing the network tools apps need so all apps can benefit similarly, rather than leaving apps to figure out networking nuance on their own. I just think in this case that there should never have to be a situation where an app needs to request DNS encryption (because either it's already happening or it can't happen for some reason unknown to the app).

Summary: I think such an API should be unnecessary on well-behaved platforms.

Thanks,
Tommy
________________________________
From: dns-privacy <[email-masked]> on behalf of Iain Sharp <[email-masked]>
Sent: Monday, August 19, 2019 2:56 AM
To: [email-masked] <[email-masked]>
Subject: [dns-privacy] Operating System API support for DNS security policy

All,

Thanks

Iain

---

From: Bob Harold <[email-masked]>
Date: Mon, 19 Aug 2019 13:38:24 -0400

On Mon, Aug 19, 2019 at 1:29 PM Tommy Jensen <Jensen.Thomas=
[email-masked]> wrote:

> Hey Iain,
>
> Iain> Many applications rely on operating system APIs to access DNS
> services. As native support of DNS over TLS rolls out in to operating
> systems it seems likely that some applications will wish to control the
> security policy that the operating system applies when it performs DNS
> resolution. For example, the application may wish to require that the
> operating system uses an encrypted DNS protocol.
>
>    - If the OS supports DoT and the configured servers support it:
>       - OS should be using DoT whether the app requests it or not
>    - If the OS supports DoT but the servers don't:
>       - App intent isn't helpful (to the same server)
>    - If the OS doesn't support it:
>       - App intent isn't helpful
>
> I read this differently - the api needs to tell the app whether the OS
does encrypted DNS:

   - OS supports DoT and can connect to a DoT resolver
      - App uses OS for DNS
   - OS does not support DoT
      - App connects to a DoT server itself, bypassing the OS  (even though
      I dislike this, unless the user has agreed)
   - OS supports DoT but cannot reach a DoT server
      - various choices, we don't need to discuss this now.

-- 
Bob Harold

>
>
> My view is that the OS should be taking the most secure DNS route it has
> available regardless of app request (after all, think of all the apps which
> won't request DoT but should). In the case where the OS supports DoT but
> isn't using it, that decision is being made in the context of other
> information, such as enterprise configuration, that the app may not have.
>
> Iain> Unless operating systems support secure DNS standards and expose
> APIs to allow applications to use them effectively then applications that
> require secure DNS have little choice other than to roll their own
> implementations.
>
> I totally agree. Platforms should be providing the network tools apps need
> so all apps can benefit similarly, rather than leaving apps to figure out
> networking nuance on their own. I just think in this case that there should
> never have to be a situation where an app needs to request DNS encryption
> (because either it's already happening or it can't happen for some reason
> unknown to the app).
>
> ------------------------------
> *From:* dns-privacy <[email-masked]> on behalf of Iain
> Sharp <[email-masked]>
> *Sent:* Monday, August 19, 2019 2:56 AM
> *To:* [email-masked] <[email-masked]>
> *Subject:* [dns-privacy] Operating System API support for DNS security
> policy
>
>
> All,
>
>
>
> DNS over TLS offers the ability to perform DNS queries over a TLS secured
> channel. In my understanding, DNS over TLS is not yet available in all
> operating systems, but operating system support could become common in
> future.
>
>
>
> Many applications rely on operating system APIs to access DNS services. As
> native support of DNS over TLS rolls out in to operating systems it seems
> likely that some applications will wish to control the security policy that
> the operating system applies when it performs DNS resolution. For example,
> the application may wish to require that the operating system uses an
> encrypted DNS protocol.
>
>
>
> Today, most operating systems use the getaddrinfo() function described in
> RFC3493 as the basis of their API for translating DNS names to IP
> addresses, but this does not have security policy attributes.. Is anyone
> Unless operating systems support secure DNS standards and expose APIs to
> allow applications to use them effectively then applications that require
> secure DNS have little choice other than to roll their own implementations.
>
>
>
>
>
> Thanks
>
>
>
> Iain
>

---

From: Tommy Jensen <[email-masked]>
Date: Mon, 19 Aug 2019 17:47:49 +0000

bob> I read this differently - the api needs to tell the app whether the OS does encrypted DNS

I agree. If that was your original Iain, then I apoligize.

Bob, your table also highlights a concern of mine, which is empowering apps to know what the platform has to offer them and when using their own DNS stub will break existing user/administrator expectations. Not all cases are privacy related, but some are.

Thanks,
Tommy
________________________________
From: Bob Harold <[email-masked]>
Sent: Monday, August 19, 2019 10:38 AM
To: Tommy Jensen <[email-masked]>
Cc: Iain Sharp <[email-masked]>; [email-masked] <[email-masked]>
Subject: Re: [dns-privacy] Operating System API support for DNS security policy

On Mon, Aug 19, 2019 at 1:29 PM Tommy Jensen <Jensen.Thomas=[email-masked]<mailto:[email-masked]>> wrote:
Hey Iain,

I read this differently - the api needs to tell the app whether the OS does encrypted DNS:

  *   OS supports DoT and can connect to a DoT resolver
     *   App uses OS for DNS
  *   OS does not support DoT
     *   App connects to a DoT server itself, bypassing the OS  (even though I dislike this, unless the user has agreed)
  *   OS supports DoT but cannot reach a DoT server
     *   various choices, we don't need to discuss this now.

--
Bob Harold

Thanks,
Tommy
________________________________
From: dns-privacy <[email-masked]<mailto:[email-masked]>> on behalf of Iain Sharp <[email-masked]<mailto:[email-masked]>>
Sent: Monday, August 19, 2019 2:56 AM
To: [email-masked]<mailto:[email-masked]> <[email-masked]<mailto:[email-masked]>>
Subject: [dns-privacy] Operating System API support for DNS security policy

All,

Today, most operating systems use the getaddrinfo() function described in RFC3493 as the basis of their API for translating DNS names to IP addresses, but this does not have security policy attributes.. Is anyone aware of any activity to enhance the RFC3493 work to add application control of security policy to the getaddrinfo()  capabilities?

Thanks

Iain

---

From: [email-masked]
Date: Mon, 19 Aug 2019 18:13:56 +0000

>       - various choices, we don't need to discuss this now.

+1, there's also the case of TLS ESNI where the application wants to only do the lookup if DNS privacy will be used. Different applications may choose different  fallbacks if DNS privacy is  not available from the OS.

Cheers, 
S.

---

From: Iain Sharp <[email-masked]>
Date: Tue, 20 Aug 2019 10:13:37 +0000

Thanks for the informative replies.

The use cases I was thinking of are similar to those outlined by Bob and Stephen. Hypothetically, there might also be scenarios where the application wishes the DNS to be done without security (e.g. for debugging) though I don't know in practice how important these are.

The getdns API is quite similar to what I had in mind. In getdns you can specify the transports you want from UDP, TCP and TLS. Possibly other levers may be needed for things like ESNI.

Would the following be a fair summary of the discussion?
1) There is some support for the idea it would be useful for APIs to allow an application to at least know, and perhaps influence, what DNS security features will be used if it makes a DNS request via the operating system.
2) The getaddrinfo() API in RFC3493 doesn't provide this capability.
3) As far as we are aware there is no work in IETF currently on how to express security policy in DNS APIs, but the getdns API seems to have similar goals to point 1.

Regards

Iain

-----Original Message-----
From: dns-privacy <[email-masked]> On Behalf Of [email-masked]
Sent: 19 August 2019 19:14
To: [email-masked]
Cc: Iain Sharp <[email-masked]>; [email-masked]; Jensen.Thomas=[email-masked]
Subject: Re: [dns-privacy] Operating System API support for DNS security policy

On Monday, 19 August 2019, Bob Harold wrote:
> > services. As native support of DNS over TLS rolls out in to 
> > operating systems it seems likely that some applications will wish 
> > to control the security policy that the operating system applies 
> > when it performs DNS resolution. For example, the application may 
> > wish to require that the operating system uses an encrypted DNS protocol.
> >

Cheers,
S.

> --
> Bob Harold
> 
> 
> >
> >
> > My view is that the OS should be taking the most secure DNS route it 
> > has available regardless of app request (after all, think of all the 
> > apps which won't request DoT but should). In the case where the OS 
> > supports DoT but isn't using it, that decision is being made in the 
> > context of other information, such as enterprise configuration, that the app may not have.
> >
> > Iain> Unless operating systems support secure DNS standards and 
> > Iain> expose
> > APIs to allow applications to use them effectively then applications 
> > that require secure DNS have little choice other than to roll their 
> > own implementations.
> >
> > I totally agree. Platforms should be providing the network tools 
> > apps need so all apps can benefit similarly, rather than leaving 
> > apps to figure out networking nuance on their own. I just think in 
> > this case that there should never have to be a situation where an 
> > app needs to request DNS encryption (because either it's already 
> > happening or it can't happen for some reason unknown to the app).
> >
> > *Subject:* [dns-privacy] Operating System API support for DNS 
> > security policy
> >
> >
> > All,
> >
> >
> >
> > DNS over TLS offers the ability to perform DNS queries over a TLS 
> > secured channel. In my understanding, DNS over TLS is not yet 
> > available in all operating systems, but operating system support 
> > could become common in future.
> >
> >
> >
> > Many applications rely on operating system APIs to access DNS 
> > services. As native support of DNS over TLS rolls out in to 
> > operating systems it seems likely that some applications will wish 
> > to control the security policy that the operating system applies 
> > when it performs DNS resolution. For example, the application may 
> > wish to require that the operating system uses an encrypted DNS protocol.
> >
> >
> >
> > addresses, but this does not have security policy attributes.. Is 
> > anyone aware of any activity to enhance the RFC3493 work to add 
> > application control of security policy to the getaddrinfo()  capabilities?
> >
> >
> >
> > Unless operating systems support secure DNS standards and expose 
> > APIs to allow applications to use them effectively then applications 
> > that require secure DNS have little choice other than to roll their own implementations.
> >
> >
> >
> >
> >
> > Thanks
> >
> >
> >
> > Iain
> >
>
_______________________________________________
dns-privacy mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/dns-privacy

---

From: Erik Kline <[email-masked]>
Date: Tue, 20 Aug 2019 10:26:06 -0700

On Tue, 20 Aug 2019 at 03:13, Iain Sharp <[email-masked]> wrote:

> The use cases I was thinking of are similar to those outlined by Bob and
> Stephen. Hypothetically, there might also be scenarios where the
> application wishes the DNS to be done without security (e.g. for debugging)
> though I don't know in practice how important these are.
>
> The getdns API is quite similar to what I had in mind. In getdns you can
> specify the transports you want from UDP, TCP and TLS. Possibly other
> levers may be needed for things like ESNI.
>
> 1) There is some support for the idea it would be useful for APIs to allow
> an application to at least know, and perhaps influence, what DNS security
> features will be used if it makes a DNS request via the operating system.
> 3) As far as we are aware there is no work in IETF currently on how to
> express security policy in DNS APIs, but the getdns API seems to have
> similar goals to point 1.
>

Re (3), I haven't been following taps work closely, but it seems like the
kind of thing they might have spent some cycles on.

> +1, there's also the case of TLS ESNI where the application wants to only
> do the lookup if DNS privacy will be used. Different applications may
> choose different  fallbacks if DNS privacy is  not available from the OS.
>
> Cheers,
> S.
>
>
> > --
> > Bob Harold
> >
> >
> > >
> > >