Merge remote-tracking branch 'origin/main' into llb-byow
This commit is contained in:
commit
704d68848c
160 files changed
+15933
-4684
No files matched your search
@@ -0,0 +1,118 @@
|
||||
syntax = "proto3";
|
||||
|
||||
// Package store provides protobufs for storing types in the static
|
||||
// credential package.
|
||||
package controller.storage.credential.static.store.v1;
|
||||
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
import "controller/storage/timestamp/v1/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/hashicorp/boundary/internal/credential/static/store;store";
|
||||
|
||||
message CredentialStore {
|
||||
// public_id is a surrogate key suitable for use in a public API.
|
||||
// @inject_tag: `gorm:"primary_key"`
|
||||
string public_id = 1;
|
||||
|
||||
// The create_time is set by the database.
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 2;
|
||||
|
||||
// The update_time is set by the database.
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp update_time = 3;
|
||||
|
||||
// name is optional. If set, it must be unique within scope_id.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string name = 4 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Name"
|
||||
that: "name"
|
||||
}];
|
||||
|
||||
// description is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string description = 5 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Description"
|
||||
that: "description"
|
||||
}];
|
||||
|
||||
// The scope_id of the owning scope.
|
||||
// It must be set.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string scope_id = 6;
|
||||
|
||||
// version allows optimistic locking of the resource.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
uint32 version = 7;
|
||||
}
|
||||
|
||||
message UsernamePasswordCredential {
|
||||
// public_id is a surrogate key suitable for use in a public API.
|
||||
// @inject_tag: `gorm:"primary_key"`
|
||||
string public_id = 1;
|
||||
|
||||
// create_time is set by the database.
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 2;
|
||||
|
||||
// update_time is set by the database.
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp update_time = 3;
|
||||
|
||||
// name is optional. If set, it must be unique within scope_id.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string name = 4 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Name"
|
||||
that: "name"
|
||||
}];
|
||||
|
||||
// description is optional.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string description = 5 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Description"
|
||||
that: "description"
|
||||
}];
|
||||
|
||||
// store_id of the owning static credential store.
|
||||
// It must be set.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string store_id = 6;
|
||||
|
||||
// version allows optimistic locking of the resource.
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
uint32 version = 7;
|
||||
|
||||
// username is the username associated with the credential.
|
||||
// It must be set.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string username = 8 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Username"
|
||||
that: "attributes.username"
|
||||
}];
|
||||
|
||||
// password is the plain-text of the password associated with the credential. We are
|
||||
// not storing this plain-text password in the database.
|
||||
// @inject_tag: `gorm:"-" wrapping:"pt,password_data"`
|
||||
bytes password = 9 [(custom_options.v1.mask_mapping) = {
|
||||
this: "Password"
|
||||
that: "attributes.password"
|
||||
}];
|
||||
|
||||
// ct_password is the ciphertext of the password. It
|
||||
// is stored in the database.
|
||||
// @inject_tag: `gorm:"column:password_encrypted;not_null" wrapping:"ct,password_data"`
|
||||
bytes ct_password = 10;
|
||||
|
||||
// password_hmac is a sha256-hmac of the unencrypted password. It is recalculated
|
||||
// everytime the password is updated.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
bytes password_hmac = 11 [(custom_options.v1.mask_mapping) = {
|
||||
this: "PasswordHmac"
|
||||
that: "attributes.password_hmac"
|
||||
}];
|
||||
|
||||
// The key_id of the kms database key used for encrypting this entry.
|
||||
// It must be set.
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string key_id = 12;
|
||||
}
|
||||
@@ -90,3 +90,53 @@ message CredentialLibrary {
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 40;
|
||||
}
|
||||
|
||||
message StaticCredential {
|
||||
// target_id of the Target
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string target_id = 10;
|
||||
|
||||
// credential_id of the static Credential
|
||||
// @inject_tag: `gorm:"column:credential_static_id;primary_key"
|
||||
string credential_id = 20;
|
||||
|
||||
// credential_purpose is the purpose of the credential for the target
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string credential_purpose = 30;
|
||||
|
||||
// create_time from the RDBMS
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 40;
|
||||
}
|
||||
|
||||
message CredentialSource {
|
||||
// target_id of the Target
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string target_id = 10;
|
||||
|
||||
// credential_source_id of the Credential Library or static Credential
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string credential_source_id = 20;
|
||||
|
||||
// credential_purpose is the purpose of the credential for the target
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string credential_purpose = 30;
|
||||
|
||||
// create_time from the RDBMS
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 40;
|
||||
|
||||
// type of credential source (library or static)
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string type = 50;
|
||||
}
|
||||
|
||||
message CredentialSourceView {
|
||||
// public_id of the Credential source
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string public_id = 10;
|
||||
|
||||
// type of credential source (library or static)
|
||||
// @inject_tag: `gorm:"not_null"`
|
||||
string type = 20;
|
||||
}
|
||||
Reference in new issue
Block a user