Skip to content

Commit e7edb86

Browse files
committed
WIP: first draft
1 parent 51c5a05 commit e7edb86

File tree

2 files changed

+148
-0
lines changed

2 files changed

+148
-0
lines changed
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
title: "Opt-Out of self-signed CAs (and their certs)"
3+
authors: [ "@joshuatcasey" ]
4+
status: "proposed"
5+
sponsor: [ "@cfryanr", "@ashish-amarnath" ]
6+
approval_date: "TBD"
7+
---
8+
9+
*Disclaimer*: Proposals are point-in-time designs and decisions.
10+
Once approved and implemented, they become historical documents.
11+
If you are reading an old proposal, please be aware that the
12+
features described herein might have continued to evolve since.
13+
14+
# Opt-Out of self-signed CAs (and their certs)
15+
16+
## Problem Statement
17+
18+
Pinniped's Concierge, Supervisor, and Local-User-Authenticator today require the use of self-signed certificate
19+
authorities (CAs). These self-signed CAs are used for a variety of purposes, but generally are used to sign leaf
20+
certificates used to serve TLS or sign leaf certificates for client authentication (mTLS).
21+
22+
Using self-signed certificates can mean that custom CA bundles need to be installed on client machines so that clients
23+
can perform TLS verification with a Pinniped endpoint. As of Pinniped v0.32.0, any endpoints that are meant to be
24+
visited by a client machine can use external certificates. In particular, each Supervisor `FederationDomain` serves
25+
OIDC discovery and web endpoints that are meant to be visited by client machines, and each Concierge `ImpersonationProxy`
26+
is an endpoint meant to be visited by client machines. This proposal will not change configuration for those endpoints.
27+
28+
However, Pinniped does expose various endpoints for Kubernetes-internal use, such as to serve a `/healthz` endpoint
29+
or an endpoint that backs an `APIService` (only the Kubernetes API Service will call an `APIService`), as well as
30+
create certificates for client authentication (when the impersonation proxy is enabled). Pinniped will generate its own
31+
CA certificate and any leaf certificates that it needs.
32+
33+
## Terminology / Concepts
34+
35+
* Self-signed certificate: A certificate not signed by a publicly-trusted CA authority.
36+
* Certificate Authority (CA): A certificate (with `isCA: true`) used to issue intermediate certificates or leaf
37+
certificates, such as certificates for serving TLS or certificates for client authentication (mTLS).
38+
* Generated certificate: A certificate generated by Pinniped, from its own CAs. By definition these generated certificates
39+
are not themselves self-signed, since they are always signed by a CA (even if that CA is self-signed).
40+
* External certificate: A certificate provided by something outside of Pinniped, such as `cert-manager`. Usually this
41+
is a leaf certificate (to serve TLS, for example), but could be a CA certificate.
42+
* Secret type `kubernetes.io/tls`: Secrets that must have keys `tls.crt` and `tls.key` that can contain either a CA,
43+
intermediate, or leaf certificate. See https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets.
44+
* `cert-manager`: A [tool](https://cert-manager.io/) to manage certificates used within a cluster. Generally outputs
45+
secrets of type `kubernetes.io/tls`, and may populate an additional data field `ca.crt` with a higher-level certificate
46+
if available.
47+
* CA Bundle: A collection of certificates used to verify TLS or some other certificate signature. Usually should only
48+
contain CA or intermediate certificates (not leaf certificates that should be rotated frequently), and should never
49+
contain private keys.
50+
51+
## Proposal
52+
53+
TBD
54+
55+
### Goals and Non-goals
56+
57+
Goal:
58+
* Pinniped should provide enough configuration options for Pinniped administrators to completely avoid using self-signed CAs
59+
* Pinniped should generally expect external certificates to be leaf certificates (to serve TLS, for example). Pinniped
60+
will need a CA certificate when the impersonation proxy is enabled, in order to issue client certificates for mTLS.
61+
* Pinniped should rely on Kubernetes standards such as secrets with type `kubernetes.io/tls`, instead of coupling itself
62+
to any specific tool such as `cert-manager`. However, Pinniped will defer to a `ca.crt` field for CA bundles if that
63+
field is available.
64+
65+
Non-goals:
66+
* It is not a goal of this proposal to remove Pinniped's self-signed CAs (and require the user to configure all CAs and
67+
certificates). Pinniped should continue to generate any necessary CAs and certificates that are not externally provided.
68+
* It is not a goal of this proposal to change how the Supervisor signs the ID tokens that it issues. Those tokens are
69+
signed by a ECDSA private key specific to each `FederationDomain`. Clients that need to validate tokens issued by the
70+
Pinniped Supervisor can obtain the public key as per OIDC specifications, not through PKI distribution.
71+
* It is not a goal of this proposal to change configuration for `FederationDomain` or `ImpersonationProxy` resources
72+
that already accept external certificates as of v0.32.0
73+
74+
#### API Changes
75+
76+
TBD
77+
78+
#### Configuration Changes
79+
80+
TBD
81+
82+
#### Upgrades
83+
84+
TBD
85+
86+
#### Tests
87+
88+
TBD
89+
90+
#### New Dependencies
91+
92+
No.
93+
94+
#### Performance Considerations
95+
96+
No.
97+
98+
#### Observability Considerations
99+
100+
TBD
101+
102+
#### Security Considerations
103+
104+
TBD
105+
106+
#### Usability Considerations
107+
108+
TBD
109+
110+
#### Documentation Considerations
111+
112+
TBD
113+
114+
### Other Approaches Considered
115+
116+
TBD
117+
118+
## Open Questions
119+
120+
TBD
121+
122+
## Answered Questions
123+
124+
TBD
125+
126+
## Implementation Plan
127+
128+
TBD
129+
130+
## Implementation PRs
131+
132+
* TBD
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2024 the Pinniped contributors. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package fail_test
5+
6+
// TODO: remove this file before merging.
7+
8+
import (
9+
"testing"
10+
11+
"github.com/stretchr/testify/require"
12+
)
13+
14+
func Test(t *testing.T) {
15+
require.Fail(t, "fail this test so that unit tests fail and integration tests do not run in CI")
16+
}

0 commit comments

Comments
 (0)