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

server/tailsql: add basic support for setec secrets #5

Merged
merged 3 commits into from
Aug 14, 2023

Conversation

creachadair
Copy link
Member

Extend the DBSpec type to allow specifying a secret name for the connection
string instead of a URL or file. Move URL resolution from the validation step
to the open step, so that validation is cheap and idempotent.

Add an Option to hold a setec.Store, and export the CheckSources method so the
caller can find out which secrets they need to include.

Enforce that a secret store is present during construction of the service, if
any of the sources requires it.

Add a test to exercise using the new secret field (requires tailscale/setec#36).

Signed-off-by: M. J. Fromberger fromberger@tailscale.com

Extend the DBSpec type to allow specifying a secret name for the connection
string instead of a URL or file. Move URL resolution from the validation step
to the open step, so that validation is cheap and idempotent.

Add an Option to hold a setec.Store, and export the CheckSources method so the
caller can find out which secrets they need to include.

Enforce that a secret store is present during construction of the service, if
any of the sources requires it.

Add a test to exercise using the new secret field (requires tailscale/setec#36).

Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
@creachadair creachadair marked this pull request as ready for review August 14, 2023 18:51
server/tailsql/options.go Show resolved Hide resolved
server/tailsql/tailsql_test.go Outdated Show resolved Hide resolved
@creachadair creachadair merged commit 71e55c2 into main Aug 14, 2023
1 check passed
@creachadair creachadair deleted the mjf/import-setec branch August 14, 2023 19:09
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.

2 participants