2017-10-11 17:21:20 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2018-06-04 14:19:26 +00:00
|
|
|
option go_package = "github.com/hashicorp/vault/helper/identity";
|
|
|
|
|
2017-10-11 17:21:20 +00:00
|
|
|
package identity;
|
|
|
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
2018-09-18 03:03:00 +00:00
|
|
|
import "helper/identity/mfa/types.proto";
|
2017-10-11 17:21:20 +00:00
|
|
|
|
|
|
|
// Group represents an identity group.
|
|
|
|
message Group {
|
|
|
|
// ID is the unique identifier for this group
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string id = 1;
|
|
|
|
|
|
|
|
// Name is the unique name for this group
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string name = 2;
|
|
|
|
|
|
|
|
// Policies are the vault policies to be granted to members of this group
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
repeated string policies = 3;
|
|
|
|
|
|
|
|
// ParentGroupIDs are the identifiers of those groups to which this group is a
|
|
|
|
// member of. These will serve as references to the parent group in the
|
|
|
|
// hierarchy.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
repeated string parent_group_ids = 4;
|
|
|
|
|
|
|
|
// MemberEntityIDs are the identifiers of entities which are members of this
|
|
|
|
// group
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
repeated string member_entity_ids = 5;
|
|
|
|
|
|
|
|
// Metadata represents the custom data tied with this group
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
map<string, string> metadata = 6;
|
|
|
|
|
|
|
|
// CreationTime is the time at which this group was created
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
google.protobuf.Timestamp creation_time = 7;
|
|
|
|
|
|
|
|
// LastUpdateTime is the time at which this group was last modified
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
google.protobuf.Timestamp last_update_time= 8;
|
|
|
|
|
|
|
|
// ModifyIndex tracks the number of updates to the group. It is useful to detect
|
|
|
|
// updates to the groups.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
uint64 modify_index = 9;
|
|
|
|
|
2019-05-07 19:29:51 +00:00
|
|
|
// BucketKey is the path of the storage packer key into which this group is
|
|
|
|
// stored.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2019-05-07 19:29:51 +00:00
|
|
|
string bucket_key = 10;
|
2017-11-02 20:05:48 +00:00
|
|
|
|
|
|
|
// Alias is used to mark this group as an internal mapping of a group that
|
|
|
|
// is external to the identity store. Alias can only be set if the 'type'
|
|
|
|
// is set to 'external'.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-11-02 20:05:48 +00:00
|
|
|
Alias alias = 11;
|
|
|
|
|
|
|
|
// Type indicates if this group is an internal group or an external group.
|
|
|
|
// Memberships of the internal groups can be managed over the API whereas
|
|
|
|
// the memberships on the external group --for which a corresponding alias
|
|
|
|
// will be set-- will be managed automatically.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-11-02 20:05:48 +00:00
|
|
|
string type = 12;
|
2018-08-10 16:45:34 +00:00
|
|
|
|
2018-09-18 03:03:00 +00:00
|
|
|
// NamespaceID is the identifier of the namespace to which this group
|
2018-08-10 16:45:34 +00:00
|
|
|
// belongs to. Do not return this value over the API when reading the
|
|
|
|
// group.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2018-09-18 03:03:00 +00:00
|
|
|
string namespace_id = 13;
|
2017-10-11 17:21:20 +00:00
|
|
|
}
|
|
|
|
|
2021-10-15 19:20:00 +00:00
|
|
|
// LocalAliases holds the aliases belonging to an entity that are local to the
|
|
|
|
// cluster.
|
|
|
|
message LocalAliases {
|
|
|
|
repeated Alias aliases = 1;
|
|
|
|
}
|
|
|
|
|
2017-10-11 17:21:20 +00:00
|
|
|
// Entity represents an entity that gets persisted and indexed.
|
|
|
|
// Entity is fundamentally composed of zero or many aliases.
|
|
|
|
message Entity {
|
|
|
|
// Aliases are the identities that this entity is made of. This can be
|
|
|
|
// empty as well to favor being able to create the entity first and then
|
|
|
|
// incrementally adding aliases.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
repeated Alias aliases = 1;
|
|
|
|
|
|
|
|
// ID is the unique identifier of the entity which always be a UUID. This
|
|
|
|
// should never be allowed to be updated.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string id = 2;
|
|
|
|
|
|
|
|
// Name is a unique identifier of the entity which is intended to be
|
|
|
|
// human-friendly. The default name might not be human friendly since it
|
|
|
|
// gets suffixed by a UUID, but it can optionally be updated, unlike the ID
|
|
|
|
// field.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string name = 3;
|
|
|
|
|
|
|
|
// Metadata represents the explicit metadata which is set by the
|
|
|
|
// clients. This is useful to tie any information pertaining to the
|
|
|
|
// aliases. This is a non-unique field of entity, meaning multiple
|
|
|
|
// entities can have the same metadata set. Entities will be indexed based
|
|
|
|
// on this explicit metadata. This enables virtual groupings of entities
|
|
|
|
// based on its metadata.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
map<string, string> metadata = 4;
|
|
|
|
|
|
|
|
// CreationTime is the time at which this entity is first created.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
google.protobuf.Timestamp creation_time = 5;
|
|
|
|
|
|
|
|
// LastUpdateTime is the most recent time at which the properties of this
|
|
|
|
// entity got modified. This is helpful in filtering out entities based on
|
|
|
|
// its age and to take action on them, if desired.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
google.protobuf.Timestamp last_update_time= 6;
|
|
|
|
|
|
|
|
// MergedEntityIDs are the entities which got merged to this one. Entities
|
|
|
|
// will be indexed based on all the entities that got merged into it. This
|
|
|
|
// helps to apply the actions on this entity on the tokens that are merged
|
|
|
|
// to the merged entities. Merged entities will be deleted entirely and
|
|
|
|
// this is the only trackable trail of its earlier presence.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
repeated string merged_entity_ids = 7;
|
|
|
|
|
|
|
|
// Policies the entity is entitled to
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
repeated string policies = 8;
|
|
|
|
|
2019-05-07 19:29:51 +00:00
|
|
|
// BucketKey is the path of the storage packer key into which this entity is
|
|
|
|
// stored.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2019-05-07 19:29:51 +00:00
|
|
|
string bucket_key = 9;
|
2017-10-11 17:21:20 +00:00
|
|
|
|
|
|
|
// MFASecrets holds the MFA secrets indexed by the identifier of the MFA
|
|
|
|
// method configuration.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2018-09-18 03:03:00 +00:00
|
|
|
map<string, mfa.Secret> mfa_secrets = 10;
|
2018-04-14 01:49:40 +00:00
|
|
|
|
|
|
|
// Disabled indicates whether tokens associated with the account should not
|
|
|
|
// be able to be used
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2018-04-14 01:49:40 +00:00
|
|
|
bool disabled = 11;
|
2018-08-10 16:45:34 +00:00
|
|
|
|
|
|
|
// NamespaceID is the identifier of the namespace to which this entity
|
|
|
|
// belongs to. Do not return this value over the API when reading the
|
|
|
|
// entity.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2018-09-18 03:03:00 +00:00
|
|
|
string namespace_id = 12;
|
2017-10-11 17:21:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Alias represents the alias that gets stored inside of the
|
|
|
|
// entity object in storage and also represents in an in-memory index of an
|
|
|
|
// alias object.
|
|
|
|
message Alias {
|
|
|
|
// ID is the unique identifier that represents this alias
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string id = 1;
|
|
|
|
|
2017-11-02 20:05:48 +00:00
|
|
|
// CanonicalID is the entity identifier to which this alias belongs to
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-11-02 20:05:48 +00:00
|
|
|
string canonical_id = 2;
|
2017-10-11 17:21:20 +00:00
|
|
|
|
|
|
|
// MountType is the backend mount's type to which this alias belongs to.
|
|
|
|
// This enables categorically querying aliases of specific backend types.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string mount_type = 3;
|
|
|
|
|
|
|
|
// MountAccessor is the backend mount's accessor to which this alias
|
|
|
|
// belongs to.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string mount_accessor = 4;
|
|
|
|
|
|
|
|
// MountPath is the backend mount's path to which the Maccessor belongs to. This
|
|
|
|
// field is not used for any operational purposes. This is only returned when
|
|
|
|
// alias is read, only as a nicety.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string mount_path = 5;
|
|
|
|
|
|
|
|
// Metadata is the explicit metadata that clients set against an entity
|
|
|
|
// which enables virtual grouping of aliases. Aliases will be indexed
|
|
|
|
// against their metadata.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
map<string, string> metadata = 6;
|
|
|
|
|
|
|
|
// Name is the identifier of this alias in its authentication source.
|
2017-11-02 20:05:48 +00:00
|
|
|
// This does not uniquely identify an alias in Vault. This in conjunction
|
|
|
|
// with MountAccessor form to be the factors that represent an alias in a
|
2017-10-11 17:21:20 +00:00
|
|
|
// unique way. Aliases will be indexed based on this combined uniqueness
|
|
|
|
// factor.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
string name = 7;
|
|
|
|
|
|
|
|
// CreationTime is the time at which this alias was first created
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
google.protobuf.Timestamp creation_time = 8;
|
|
|
|
|
|
|
|
// LastUpdateTime is the most recent time at which the properties of this
|
|
|
|
// alias got modified. This is helpful in filtering out aliases based
|
|
|
|
// on its age and to take action on them, if desired.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-10-11 17:21:20 +00:00
|
|
|
google.protobuf.Timestamp last_update_time = 9;
|
|
|
|
|
2017-11-02 20:05:48 +00:00
|
|
|
// MergedFromCanonicalIDs is the FIFO history of merging activity
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2017-11-02 20:05:48 +00:00
|
|
|
repeated string merged_from_canonical_ids = 10;
|
2018-09-18 03:03:00 +00:00
|
|
|
|
|
|
|
// NamespaceID is the identifier of the namespace to which this alias
|
|
|
|
// belongs.
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
2018-09-18 03:03:00 +00:00
|
|
|
string namespace_id = 11;
|
2021-09-17 18:03:47 +00:00
|
|
|
|
|
|
|
// Custom Metadata represents the custom data tied to this alias
|
2021-09-30 01:25:15 +00:00
|
|
|
// @inject_tag: sentinel:"-"
|
|
|
|
map<string, string> custom_metadata = 12;
|
2021-10-15 19:20:00 +00:00
|
|
|
|
|
|
|
// Local indicates if the alias only belongs to the cluster where it was
|
|
|
|
// created. If true, the alias will be stored in a location that is ignored by
|
|
|
|
// the performance replication subsystem.
|
|
|
|
// @inject_tag: sentinel:"-"
|
|
|
|
bool local = 13;
|
|
|
|
|
|
|
|
// LocalBucketKey is the identifying element of the location where this alias
|
|
|
|
// is stored in the storage packer. This helps in querying local aliases
|
|
|
|
// during invalidation of local aliases in performance standbys.
|
|
|
|
// @inject_tag: sentinel:"-"
|
|
|
|
string local_bucket_key = 14;
|
2018-09-18 03:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated. Retained for backwards compatibility.
|
|
|
|
message EntityStorageEntry {
|
|
|
|
repeated PersonaIndexEntry personas = 1;
|
|
|
|
string id = 2;
|
|
|
|
string name = 3;
|
|
|
|
map<string, string> metadata = 4;
|
|
|
|
google.protobuf.Timestamp creation_time = 5;
|
|
|
|
google.protobuf.Timestamp last_update_time= 6;
|
|
|
|
repeated string merged_entity_ids = 7;
|
|
|
|
repeated string policies = 8;
|
|
|
|
string bucket_key_hash = 9;
|
|
|
|
map<string, mfa.Secret> mfa_secrets = 10;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated. Retained for backwards compatibility.
|
|
|
|
message PersonaIndexEntry {
|
|
|
|
string id = 1;
|
|
|
|
string entity_id = 2;
|
|
|
|
string mount_type = 3;
|
|
|
|
string mount_accessor = 4;
|
|
|
|
string mount_path = 5;
|
|
|
|
map<string, string> metadata = 6;
|
|
|
|
string name = 7;
|
|
|
|
google.protobuf.Timestamp creation_time = 8;
|
|
|
|
google.protobuf.Timestamp last_update_time = 9;
|
|
|
|
repeated string merged_from_entity_ids = 10;
|
2017-10-11 17:21:20 +00:00
|
|
|
}
|