On 24/03/2017 05:54, Walter Goulet wrote:
On Thursday, March 23, 2017 at 8:13:38 PM UTC-5, Jakob Bohm wrote:
On 23/03/2017 22:59, Walter Goulet wrote:
Hi all,

This is not directly related to Mozilla policy, CA issues or really any of the 
normal discussions that I typically see in the group. However, I think that my 
question may be relevant in helping to understand what a 'policy' for an 
internal, non-publicly trusted PKI might look like.

While considering the problem of how to let developers, devops teams and 
traditional system administrators to adequately test TLS in lab environments, 
in my experience I've seen a variety of practices, some very poor, others 
questionable and some that seem reasonable.

These include:
- Using externally resolvable DNS names for test/staging environments and using 
certificates issued by publicly trusted CAs for testing.
- Using certificates from a 'test-only' PKI infrastructure that runs in a lab 
environment, usually with little to no security controls of any kind whatsoever.
- Using self-signed certificates for testing, then finding when deploying 
applications in production you end up debugging certificate path building 
errors.

So a solution that I've been considering is to develop an approach for what a 
'Test PKI' infrastructure should look like. At a high level, my idea for what a 
secure 'Test PKI' infrastructure would look like is:
- Root CA certificate is not publicly trusted by any browsers/OSs.
- Certificates issued for test purposes may not be issued for any valid 
domains, but instead may only be issued for IANA reserved domains (those 
documented here: 
https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml.
 So if an organization called 'mycompany.com' wants to test PKI securely in 
their lab, the only certificates that could be issued would be 'mycompany.test, 
mycompany.local, mycompany.invalid and so on).

For this item, another practical solution is to limit it to a subdomain
of whatever domain is used for internal systems, (e.g. an AD subdomain
for Windows environments or a traditional organizational subdomain in a
non-Windows environment).

For example, if regular internal department machines are under
math.campus.example.edu, then the test machines could be under
lab3.math.campus.example.edu.



That's true Jakob, but I'm trying to take this process even a step further. I'm 
trying to get away from users testing with valid domains, so that even if the 
TestCA root is trusted by other users, certificates issued to it won't be valid 
for use on any external networks. That's why I'm focused on eliminating the use 
of valid TLDs in test certificates.

This is a pretty big shift from a typical testing approach, so I see some 
resistance. Is anyone aware of pitfalls when using the reserved TLDs for 
internal testing?


Not valid TLDs are not the only domain names that are not valid on the
public Internet.  Deliberately reserved names can exist at every level
of the DNS, including below a real domain.

DNS and network policies may easily prevent the use of "unauthorized"
domains, even in a test environment.

Also some system vendors may introduce stupid rules for the reserved
TLDs, such as when someone stole the "local." domain for broadcast DNS,
which was a real pain in the rear for existing networks.

Also, some tests need to be conducted over the public Internet to get
realistic test results, at least without expensive "network problem
simulation" hardware.

In terms of security:

Limiting who trusts your test CA root is the first and strongest line
of defense.

Limiting what names your test CA can issue certificates from is the
second line of defense.

Firewalling access to your test machines from most of the public
Internet is the third line of defense.

Limiting public visibility of the DNS zones that hold your test
environment (DNS split horizon etc.) is the fourth line of defense.

Using names that cannot even be propagated through the public DNS due
to global limitations (your suggestion) is a fifth layer of defense
that is not always attainable or desirable.


Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
_______________________________________________
dev-security-policy mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-security-policy

Reply via email to