refact(target): Change repository to take CredentialLibraries
This change removes the hard-coded credential purpose for the Credential Libraries. It also moves the logic of creating CredentialLibraries from CredentialSources out of the repository and into the targets.Service. This refactor will allow for additional credential purposes to be supported in both the service and the repository.
This commit is contained in:
20 files changed
+1213
-133
No files matched your search
@@ -0,0 +1,73 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package controller.storage.target.targettest.store.v1;
|
||||
option go_package = "github.com/hashicorp/boundary/internal/target/targettest/store;store";
|
||||
|
||||
import "controller/storage/timestamp/v1/timestamp.proto";
|
||||
import "controller/custom_options/v1/options.proto";
|
||||
|
||||
message Target {
|
||||
// public_id is used to access the targettest.Target via an API
|
||||
// @inject_tag: gorm:"primary_key"
|
||||
string public_id = 10;
|
||||
|
||||
// scope id for the targettest.Target
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string scope_id = 20;
|
||||
|
||||
// name is the optional friendly name used to
|
||||
// access the targettest.Target via an API
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string name = 30
|
||||
[(custom_options.v1.mask_mapping) = { this: "name" that: "name" }];
|
||||
|
||||
// description of the targettest.Target
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string description = 40 [(custom_options.v1.mask_mapping) = {
|
||||
this: "description"
|
||||
that: "description"
|
||||
}];
|
||||
|
||||
// create_time from the RDBMS
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp create_time = 50;
|
||||
|
||||
// update_time from the RDBMS
|
||||
// @inject_tag: `gorm:"default:current_timestamp"`
|
||||
timestamp.v1.Timestamp update_time = 60;
|
||||
|
||||
// version allows optimistic locking of the targettest.Target when modifying the
|
||||
// targettest.Target
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
uint32 version = 70;
|
||||
|
||||
// default port of the targettest.Target
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
uint32 default_port = 80 [(custom_options.v1.mask_mapping) = {
|
||||
this: "DefaultPort"
|
||||
that: "attributes.default_port"
|
||||
}];
|
||||
|
||||
// Maximum total lifetime of a created session, in seconds
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
uint32 session_max_seconds = 100 [(custom_options.v1.mask_mapping) = {
|
||||
this: "SessionMaxSeconds"
|
||||
that: "session_max_seconds"
|
||||
}];
|
||||
|
||||
// Maximum number of connections in a session
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
int32 session_connection_limit = 110 [(custom_options.v1.mask_mapping) = {
|
||||
this: "SessionConnectionLimit"
|
||||
that: "session_connection_limit"
|
||||
}];
|
||||
|
||||
// A boolean expression that allows filtering the workers that can handle a session
|
||||
// @inject_tag: `gorm:"default:null"`
|
||||
string worker_filter = 120 [(custom_options.v1.mask_mapping) = {
|
||||
this: "WorkerFilter"
|
||||
that: "worker_filter"
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user