diff --git a/.spelling b/.spelling index c9f5c3f3977..14c57364f27 100644 --- a/.spelling +++ b/.spelling @@ -71,6 +71,10 @@ AzureDNS BKPR Bazel Bitnami +BundleSource +BundleTarget +BundleCondition +NamespaceSelector CAs CNAME CNAMEs diff --git a/content/docs/configuration/ca.md b/content/docs/configuration/ca.md index 9c1fb479f46..fffb6f2401d 100644 --- a/content/docs/configuration/ca.md +++ b/content/docs/configuration/ca.md @@ -13,8 +13,10 @@ The CA issuer represents a Certificate Authority whose certificate and private key are stored inside the cluster as a Kubernetes `Secret`. Certificates issued by a CA issuer will not be publicly trusted and so are unlikely to be trusted -by your applications without further configuration work. Consider the [trust-manager](../projects/trust-manager.md) -project for distributing trust stores. +by your applications without further configuration. + +Consider [trust-manager](../projects/trust-manager/README.md) for distributing your CA certificate safely +across your cluster! ## Deployment diff --git a/content/docs/configuration/selfsigned.md b/content/docs/configuration/selfsigned.md index edd591e7bf5..bfc2b39b2b4 100644 --- a/content/docs/configuration/selfsigned.md +++ b/content/docs/configuration/selfsigned.md @@ -136,12 +136,14 @@ spec: ### Trust Clients consuming `SelfSigned` certificates have _no way_ to trust them -without already having the certificates beforehand. This becomes hard to -manage when the client of the server using the certificate exists in a -different namespace. This limitation can be tackled by using [trust-manager](../projects/trust-manager.md) -to distribute the `ca.crt` to other namespaces. The alternative is to use -"TOFU" (trust on first use), which has security implications in the event -of a man-in-the-middle attack. +without already having the certificates beforehand, which can be hard to +manage when the client is in a different namespace to the server. + +This limitation can be tackled by using [trust-manager](../projects/trust-manager/README.md) to distribute `ca.crt` +to other namespaces. + +There is no secure alternative to solving the problem of distributing trust stores; it's possible +to "TOFU" (trust-on-first-use) a certificate, but that approach is vulnerable to man-in-the-middle attacks. ### Certificate Validity diff --git a/content/docs/manifest.json b/content/docs/manifest.json index 7d87d242fdf..99c484c28de 100644 --- a/content/docs/manifest.json +++ b/content/docs/manifest.json @@ -343,7 +343,16 @@ }, { "title": "trust-manager", - "path": "/docs/projects/trust-manager.md" + "routes": [ + { + "title": "Introduction", + "path": "/docs/projects/trust-manager/README.md" + }, + { + "title": "API Reference", + "path": "/docs/projects/trust-manager/api-reference.md" + } + ] } ] }, diff --git a/content/docs/projects/README.md b/content/docs/projects/README.md index 85f49e9301f..20200adceb8 100644 --- a/content/docs/projects/README.md +++ b/content/docs/projects/README.md @@ -28,6 +28,7 @@ These tools help with security, compliance and control. in the form of X.509 certificate key pairs to mounting Kubernetes Pods. The end result is all and any Pod running in Kubernetes can securely request their SPIFFE identity document from a Trust Domain with minimal configuration. -- [trust-manager](./trust-manager.md): an +- [trust-manager](./trust-manager/README.md): an operator to distribute trust bundles, like CA certificates, across a Kubernetes cluster. +- [trust-manager API reference](./trust-manager/api-reference.md): full documentation of the trust-manager CRD(s) diff --git a/content/docs/projects/trust-manager.md b/content/docs/projects/trust-manager/README.md similarity index 100% rename from content/docs/projects/trust-manager.md rename to content/docs/projects/trust-manager/README.md diff --git a/content/docs/projects/trust-manager/api-reference.md b/content/docs/projects/trust-manager/api-reference.md new file mode 100644 index 00000000000..0d1f9642e6d --- /dev/null +++ b/content/docs/projects/trust-manager/api-reference.md @@ -0,0 +1,464 @@ +--- +title: trust-manager API Reference +description: "trust-manager API documentation for custom resources" +--- + +Packages: + +- [`trust.cert-manager.io/v1alpha1`](#trustcert-manageriov1alpha1) + +# `trust.cert-manager.io/v1alpha1` + +Resource Types: + + +- [Bundle](#bundle) + + + + +## `Bundle` + + + + + + + +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +trust.cert-manager.io/v1alpha1 | +true | +
kind | +string | +Bundle | +true | +
metadata | +object | +Refer to the Kubernetes API documentation for the fields of the `metadata` field. | +true | +
spec | +object | +
+ Desired state of the Bundle resource. + |
+ true | +
status | +object | +
+ Status of the Bundle. This is set and managed automatically. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
sources | +[]object | +
+ Sources is a set of references to data whose data will sync to the target. + |
+ true | +
target | +object | +
+ Target is the target location in all namespaces to sync source data to. + |
+ true | +
Name | +Type | +Description | +Required | +
---|---|---|---|
configMap | +object | +
+ ConfigMap is a reference to a ConfigMap's `data` key, in the trust Namespace. + |
+ false | +
inLine | +string | +
+ InLine is a simple string to append as the source data. + |
+ false | +
secret | +object | +
+ Secret is a reference to a Secrets's `data` key, in the trust Namespace. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ Key is the key of the entry in the object's `data` field to be used. + |
+ true | +
name | +string | +
+ Name is the name of the source object in the trust Namespace. + |
+ true | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ Key is the key of the entry in the object's `data` field to be used. + |
+ true | +
name | +string | +
+ Name is the name of the source object in the trust Namespace. + |
+ true | +
Name | +Type | +Description | +Required | +
---|---|---|---|
configMap | +object | +
+ ConfigMap is the target ConfigMap in Namespaces that all Bundle source data will be synced to. + |
+ false | +
namespaceSelector | +object | +
+ NamespaceSelector will, if set, only sync the target resource in Namespaces which match the selector. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ Key is the key of the entry in the object's `data` field to be used. + |
+ true | +
Name | +Type | +Description | +Required | +
---|---|---|---|
matchLabels | +map[string]string | +
+ MatchLabels matches on the set of labels that must be present on a Namespace for the Bundle target to be synced there. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
conditions | +[]object | +
+ List of status conditions to indicate the status of the Bundle. Known condition types are `Bundle`. + |
+ false | +
target | +object | +
+ Target is the current Target that the Bundle is attempting or has completed syncing the source data to. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
status | +string | +
+ Status of the condition, one of ('True', 'False', 'Unknown'). + |
+ true | +
type | +string | +
+ Type of the condition, known values are (`Synced`). + |
+ true | +
lastTransitionTime | +string | +
+ LastTransitionTime is the timestamp corresponding to the last status change of this condition. + + Format: date-time + |
+ false | +
message | +string | +
+ Message is a human readable description of the details of the last transition, complementing reason. + |
+ false | +
observedGeneration | +integer | +
+ If set, this represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date with respect to the current state of the Bundle. + + Format: int64 + |
+ false | +
reason | +string | +
+ Reason is a brief machine readable explanation for the condition's last transition. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
configMap | +object | +
+ ConfigMap is the target ConfigMap in Namespaces that all Bundle source data will be synced to. + |
+ false | +
namespaceSelector | +object | +
+ NamespaceSelector will, if set, only sync the target resource in Namespaces which match the selector. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
key | +string | +
+ Key is the key of the entry in the object's `data` field to be used. + |
+ true | +
Name | +Type | +Description | +Required | +
---|---|---|---|
matchLabels | +map[string]string | +
+ MatchLabels matches on the set of labels that must be present on a Namespace for the Bundle target to be synced there. + |
+ false | +
Name | +Type | +Description | +Required | +
---|---|---|---|
apiVersion | +string | +{{$group.Group}}/{{$group.Version}} | +true | +
kind | +string | +{{$kind.Name}} | +true | +
metadata | +object | +Refer to the Kubernetes API documentation for the fields of the `metadata` field. | +true | +
{{if .TypeKey}}{{.Name}}{{else}}{{.Name}}{{end}} | +{{.Type}} | +
+ {{.Description}} + {{- if or .Schema.Format .Schema.Enum .Schema.Default .Schema.Minimum .Schema.Maximum }} + + {{- end}} + {{- if .Schema.Format }} + Format: {{ .Schema.Format }} + {{- end }} + {{- if .Schema.Enum }} + Enum: {{ .Schema.Enum | toStrings | join ", " }} + {{- end }} + {{- if .Schema.Default }} + Default: {{ .Schema.Default }} + {{- end }} + {{- if .Schema.Minimum }} + Minimum: {{ .Schema.Minimum }} + {{- end }} + {{- if .Schema.Maximum }} + Maximum: {{ .Schema.Maximum }} + {{- end }} + |
+ {{.Required}} | +