Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security: Reduce code duplication between auto_tls_init and the rest of the security package #64883

Open
itsbilal opened this issue May 7, 2021 · 0 comments
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

Comments

@itsbilal
Copy link
Member

itsbilal commented May 7, 2021

A lot of the primitives in pkg/security/auto_tls_init.go are just shortcuts or
specializations 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 in auto_tls_init.go
being similar to code in pkg/security/x509.go. Rather, that method tries
to 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

@itsbilal itsbilal added the C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. label May 7, 2021
@jlinder jlinder added the T-server-and-security DB Server & Security label Jun 16, 2021
@knz knz added the A-authentication Pertains to authn subsystems label Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants