Add handler and API support for alias creation with target (#4508)

* Add handler and API support for alias creation with target
This commit is contained in:
Todd authored and GitHub committed 2024-03-12 13:57:47 -07:00
1 parent 8d5ec21d73
commit 868228847d
15 files changed
+1116 -484

No files matched your search

@@ -106,7 +106,7 @@ message AuthorizeSessionArguments {
// specified when calling authorize-session an error will be returned unless
// the provided host-id matches this value.
string host_id = 100 [
json_name = "login_name",
json_name = "host_id",
(custom_options.v1.generate_sdk_option) = true,
(custom_options.v1.mask_mapping) = {
this: "attributes.authorize_session_arguments.host_id"
@@ -14,12 +14,31 @@ import "google/protobuf/wrappers.proto";
option go_package = "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/targets;targets";
// Alias is the alias information related to the aliases associated with the target.
message Alias {
// Output only. The ID of the alias referencing this target.
string id = 10; // @gotags: `class:"public" eventstream:"observation"`
// Ouput only. The value of the alias referencing this target.
string value = 20; // @gotags: `class:"public" eventstream:"observation"`
string scope_id = 30 [json_name = "scope_id"]; // @gotags: `class:"public" eventstream:"observation"`;
TargetAliasAttributes attributes = 40;
}
message TargetAliasAttributes {
AuthorizeSessionArguments authorize_session_arguments = 1 [json_name = "authorize_session_arguments"]; // @gotags: `class:"public"`
}
message AuthorizeSessionArguments {
// host_id is the id of the host that the session will be authorized for.
// When specified authorizing a session using this alias will have the same
// effect of authorizing a session to the alias' destination_id and passing
// in this value through the -host-id flag. If the host-id flag is also
// specified when calling authorize-session an error will be returned unless
// the provided host-id matches this value.
string host_id = 1 [json_name = "host_id"]; // @gotags: `class:"public"`
}
message HostSource {
@@ -222,6 +241,10 @@ message Target {
// Output only. The aliases that point to this Target.
repeated Alias aliases = 550 [json_name = "aliases"]; // @gotags: `class:"public"`
// Input only. with_aliases specify the aliases that should be created when
// the target is created. This field is only usable at target creation time.
repeated Alias with_aliases = 560 [json_name = "with_aliases"]; // @gotags: `class:"public"`
// Deprecated fields
reserved "application_credential_library_ids", "application_credential_libraries";
reserved 150, 180;