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

derive CA from pre-shared key #3815

Merged
merged 2 commits into from Dec 16, 2022
Merged

derive CA from pre-shared key #3815

merged 2 commits into from Dec 16, 2022

Conversation

wasaga
Copy link
Contributor

@wasaga wasaga commented Dec 16, 2022

Summary

Creates new certificate authority using a pre-shared key. This certificate authority is generated on the fly and would yield the same private key every time for the given PSK.

This PR creates an utility package pkg/derivecert that allows services that have a certain pre-shared key (i.e. Pomerium shared_secret) to get automatic TLS without need to share and distribute certs, and provides a better alternative to plaintext (or with disabled TLS cert chain validation) communication, but is not intended to be a replacement for proper mTLS setup.

Certs are intentionally created with very large validity, so that services that start (or restart) would be able to trust them.

Related issues

User Explanation

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@wasaga wasaga requested a review from a team as a code owner December 16, 2022 03:58
@coveralls
Copy link

coveralls commented Dec 16, 2022

Coverage Status

Coverage increased (+0.04%) to 62.869% when pulling bb10a0d on wasaga/derive-ca into 27c9439 on main.

pkg/derivecert/ca.go Outdated Show resolved Hide resolved
pkg/derivecert/ca.go Show resolved Hide resolved
@wasaga wasaga merged commit 44a5c1b into main Dec 16, 2022
@wasaga wasaga deleted the wasaga/derive-ca branch December 16, 2022 17:56
@wasaga wasaga added the enhancement New feature or request label Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants