forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc,security,sql,cli: Add subject_required cluster setting
Previous in sequence: cockroachdb#120786 informs cockroachdb#110616, cockroachdb#118750 fixes CRDB-35884 Epic CRDB-34126 We will be adding a cluster setting `server.client_cert.subject_required.enabled` which will mandate a requirement for role subject to be set either through subject role option or root-cert-distinguished-name and node-cert-distinguished-name. It controls both RPC access and login via authCert. Release note: None
- Loading branch information
Showing
11 changed files
with
112 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2021 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package security | ||
|
||
import "github.com/cockroachdb/cockroach/pkg/settings" | ||
|
||
// All cluster settings necessary for tls client cert authentication. | ||
const ( | ||
baseClientCertSettingName = "server.client_cert." | ||
ClientCertSubjectRequiredSettingName = baseClientCertSettingName + "subject_required.enabled" | ||
) | ||
|
||
// ClientCertSubjectRequired mandates a requirement for role subject to be set | ||
// either through subject role option or root-cert-distinguished-name and | ||
// node-cert-distinguished-name. It controls both RPC access and login via | ||
// authCert | ||
var ClientCertSubjectRequired = settings.RegisterBoolSetting( | ||
settings.ApplicationLevel, | ||
ClientCertSubjectRequiredSettingName, | ||
"mandates a requirement for subject role to be set for db user", | ||
false, | ||
settings.WithPublic, | ||
settings.WithReportable(true), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters