-
Notifications
You must be signed in to change notification settings - Fork 277
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
Add vault ssh certificate credential library #2860
Merged
Merged
Conversation
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
tmessi
requested review from
shore and
emilymianeil
and removed request for
a team
January 30, 2023 22:29
github-actions
bot
added
api
core
core/daemon
core/db
core/proto
core/session
core/sql
core/gen
labels
Jan 30, 2023
tmessi
force-pushed
the
llb-vault-ssh-cert-injection
branch
from
February 2, 2023 14:38
15c5fb5
to
8c6e0f1
Compare
tmessi
force-pushed
the
llb-vault-ssh-cert-injection
branch
2 times, most recently
from
February 2, 2023 17:02
accda14
to
a88bcc2
Compare
Allows for new issuing credential library implementations in the future. Moved db and decrypt logic to privateCredentialLibraryAllTypes from issueCredentialLibrary. This also removes sessionId from retrieveCredential, it was not needed and removing allows retrieveCredential to be reused for credentials issued outside current workflow.
This defines a new credential library type for ssh certificates. It adds new repository methods to support CRUDL of the new ssh certificate credential library. Co-authored-by: Timothy Messier <tim.messier@gmail.com>
Allows the new credential library type to be pulled from the db and used for issuing ssh certificate type credentials. The ssh cert library interfaces with vault's ssh secrets engine to either issu certificates directly from vault, or to generate them within boundary and have vault sign them as a certificate authority for authentication. See: https://developer.hashicorp.com/vault/api-docs/secret/ssh#sign-ssh-key https://developer.hashicorp.com/vault/api-docs/secret/ssh#generate-certificate-and-key
This expands the wh_credential_dimension to include fields for the new vault ssh certificate credential library.
This allows the new vault ssh certificate credential library to be used as an injected application credential source.
When issuing credentials from vault credential libraries, only persist the vault credential if it is revokable. A credential that is revokable has a valid lease id that can be used to revoke the lease in vault. If the credential is not revokable it is also not renewable since renewing also requires a lease id. See: https://developer.hashicorp.com/vault/docs/concepts/lease
tmessi
force-pushed
the
llb-vault-ssh-cert-injection
branch
from
February 2, 2023 17:43
a88bcc2
to
8624819
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new credential library type,
vault-ssh-certificate
, whichcan be used with vault's ssh secret engine to generate certificates to
use as credentials for ssh. This new credential library can be created
using:
See the help output for a full list of the options supported.
This also renames the
vault
credential library subtype tovault-generic
. The previous subtype ofvault
will continue to work,thus the following commands are equivalent:
See: https://developer.hashicorp.com/vault/docs/secrets/ssh