security: Reduce code duplication between auto_tls_init and the rest of the security package #64883
Labels
A-authentication
Pertains to authn subsystems
C-cleanup
Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.
T-server-and-security
DB Server & Security
A lot of the primitives in
pkg/security/auto_tls_init.go
are just shortcuts orspecializations around existing routines in the security package. As part of
this issue, tackle any major instances of code repetition between the two
parts of the package, and have any TLS auto-init/join related code
use existing.
An example of a repetition is
CreateCACertAnd Key
inauto_tls_init.go
being similar to code in
pkg/security/x509.go
. Rather, that method triesto exactly mimic its behaviour. A simple restructure of code in
auto_tls_init.go
to exclusively use existing routines elsewhere in the security package
would go a long way in cleaning up repetitive code.
Stems from #60632.
Jira issue: CRDB-7325
Epic: CRDB-6663
The text was updated successfully, but these errors were encountered: