Skip to content

Conversation

@ggray-cb
Copy link
Contributor

@ggray-cb ggray-cb commented Mar 1, 2024

This PR covers several certificate/encryption-related features:

Overview of changes, with links to the preview site:

  • What’s New in Version 7.6:
    • Moved all security and authentication features to their own section (which will later be done to organize other content).
    • Added entries for all certificate-related new features. Note that this is the only work done for DOC-11280 because there is no main documentation that covers the area covered by the changes.
  • Certificates:
    • heavily edited this topic to comply with our documentation standards. Some content was removed because it wasn't relevant to this topic or was redundant.
    • Added PKCS 12 support for node certificates.
    • Added section on certificate expiration that mentions alerts for expiration and mentions the expiration can be changed.
    • Expanded section on private keys to discuss support for EC keys.
  • Configure Server Certificates: also heavily edited for standards and clarity. Added section on using PKCS 12 certificates.
  • Upgrade: added a "Before You Upgrade" section and moved existing warning about .NET SDKs and mixed mode. Added section about the removal of TLS 1 and 1.1.
  • On-the-Wire Security: changes mainly for removasl of TLS 1 and 1.1.
  • Manage On-the-Wire Security: standards and clarity edits, plus changes for TLS 1 and 1.1 removal.
  • Alerts: Added certificate expiration to list of possible alerts. Also updated out-of-date screenshot.
  • Setting Alerts: fixed error in several examples. Updated some example output for limits. Added limit setting for expiration alerts.
  • Configure On-the-Wire Security: changes for TLS 1 and 1.1 removal, mainly around tlsMinVersion setting.

One certificate _issues_ another certificate — thereby letting the new certificate inherit its own authority and occupy the tier immediately below itself — by the process of _certificate signing_.
A Couchbase Server cluster organizes certificates in a hierarchy.
The certificate with overall authority for the cluster is at the top of the hierarchy.
This certificate is the root certificate, also called the cluster certificate, because it is the certificate for the cluster as a whole.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The terminology has changed a bit since we introduced multiple ca support. Since you are rewriting it maybe we should not use obsolete terminology.
For example, we don't actually have cluster certificate anymore. We used to have a single root cert for the cluster, and all node certs were supposed to be signed by that cert, but it has changed.
Now every node can be issued by a separate ca and that will be fine. In this case it is not really clear what to call the cluster certificate. I suggest we get rid of this term as it seems confusing.

Instead of "the cluster certificate" we now have the trust store which is basically a list of root and intermediate certificates that are considered trusted by the cluster (it is cluster wide). The meaning of it is simple: we trust any certificate that was signed by a certificate from the trust store.
Basically any node certificate chain should end with a certificate from the trust store.

By default, Couchbase Server provides minimally defined _root_ and _entity_ certificates to protect cluster and individual nodes.
Administrators can replace these, with customized or externally acquired certificates, and with corresponding certificate-chains.
All certificates and certificate-chains for client-side use need to be explicitly created and/or deployed by administrators, as appropriate.
The private key of the default self-signed cluster certificate is not available.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The private key of the default self-signed cluster certificate is not available.

I think it would be better to say "default self-signed root certificate"

Couchbase Server provides a default self-signed cluster certificate which it generates and deploys while creating the first node in a cluster.
You can deploy a new replacement cluster certificate on the cluster using the Couchbase REST API or command line interface.
For example, you can replace the certificate with one supplied by a well-known CA to make authentication with third parties easier.
The current cluster certificate is always visible on the *Root Certificate* panel of the *Security* screen of Couchbase Server Web Console.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couchbase Server provides a default self-signed cluster certificate which it generates and deploys while creating the first node in a cluster.
You can deploy a new replacement cluster certificate on the cluster using the Couchbase REST API or command line interface.
For example, you can replace the certificate with one supplied by a well-known CA to make authentication with third parties easier.
The current cluster certificate is always visible on the Root Certificate panel of the Security screen of Couchbase Server Web Console.

This paragraph seems to be obsolete. There is no root certificate panel in UI anymore.
I think we can write about the trust store here instead.
Main points:

  • This is a list of trusted certificates that is used for peer verification when (1) TLS connections are established between couchbase-nodes, and (2) when clients authenticate using client certificates.
  • It is cluster wide
  • the default self-signed root certificate (which is generated while creating the first node in a cluster) is added to the trust store automatically. It can be removed from the trust store if all nodes use custom certificates.
  • Trusted certificates are visible on Certificates panel of the Security screen

* If the two nodes do _not_ have the same CA, the CA of each must be loaded onto the other; after which, connection and node-addition (or node-joining) can occur.
When a cluster using custom certificates adds or joins a new node to itself, the new node must interact with an existing node.
This interaction requires both the existing node and the new node to verify each other's identity using their chains of trust.
Therefore, certificates of the existing and new node must have a common CA in their trust chain.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Therefore, certificates of the existing and new node must have a common CA in their trust chain.

They don't have to have common CA.
But rather cluster and the-node-to-be-added should have each others root (CA) certificates added to their trust store. Basically they should trust each other.
Say A joins B. Then A should have B's root certificate added to A's trusted store. And B should have A's root certificate added to B's trusted store.
In most cases it is satisfied automatically because usually all certs are issued by the same CA (so root cert is the same). But in some cases CA can be different (CA certs are rotated periodically, users also can switch from one CA to abother, etc...)

Therefore, certificates of the existing and new node must have a common CA in their trust chain.
In most cases, you make sure the nodes can identify each other by signing them with the cluster certificate or the same intermediate certificate.
If, for some reason, you cannot use the same certificate to sign the node's certificates, you must concatenate the intermediate certificates to each node's certificate.
This concatenation make sure the nodes can find a common CA in their chain of trust to identify each other.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If, for some reason, you cannot use the same certificate to sign the node's certificates, you must concatenate the intermediate certificates to each node's certificate.
This concatenation make sure the nodes can find a common CA in their chain of trust to identify each other.

I am not sure I understand these phrases. Probably we need to discuss it.
Or we can remove it.

Copy link
Contributor

@bfavini bfavini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Looks good.

Copy link

@bryandmc bryandmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the sections I looked at specifically were the ones regarding change of ciphers, change of available tlsMinVersion numbers and gave the rest a quick read and it seems fine to me. Please have other's finish their reviews since I didn't go into detail into sections I didn't cover originally.

* Added setting to cause second-level headings to appear in the What's New topic, to allow for easier navigation.
* Fixed some Vale-flagged issues in What's New.
@ggray-cb ggray-cb merged commit 45a1cc5 into release/7.6 Mar 15, 2024
@ggray-cb ggray-cb deleted the certificate_changes_for_7.6 branch March 15, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants