-
Notifications
You must be signed in to change notification settings - Fork 4
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
fist pass on api key crud operations #25
Changes from all commits
a3babdd
8355aa8
553b152
5422e5e
96e43e4
346498c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,3 +130,44 @@ message ServiceAccountSpec { | |
string description = 3; | ||
} | ||
|
||
|
||
message ApiKey { | ||
// The id of the API Key. | ||
string id = 1; | ||
// The current version of the API key specification. | ||
// The next update operation will have to include this version. | ||
string resource_version = 2; | ||
// The API key specification. | ||
ApiKeySpec spec = 3; | ||
// The current state of the API key. | ||
// Possible values: activating, activationfailed, active, updating, updatefailed, deleting, deletefailed, deleted, suspending, suspendfailed, suspended. | ||
// For any failed state, reach out to Temporal Cloud support for remediation. | ||
string state = 4; | ||
// The id of the async operation that is creating/updating/deleting the API key, if any. | ||
string async_operation_id = 5; | ||
// The date and time when the API key was created. | ||
google.protobuf.Timestamp created_time = 6; | ||
// The date and time when the API key was last modified. | ||
// Will not be set if the API key has never been modified. | ||
google.protobuf.Timestamp last_modified_time = 7; | ||
} | ||
|
||
message ApiKeySpec { | ||
// The id of the owner to create the API key for. | ||
// The owner id is immutable. Once set during creation, it cannot be changed. | ||
// The owner id is the id of the user when the owner type is 'user'. | ||
// The owner id is the id of the service account when the owner type is 'service-account'. | ||
string owner_id = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also we should mention that the id here will be the id of the service account when the type is service account. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added comments. |
||
// The type of the owner to create the API key for. | ||
// The owner type is immutable. Once set during creation, it cannot be changed. | ||
// Possible values: user, service-account. | ||
string owner_type = 2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since owner is not update-able, I think we should put the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Talked about this offline, we will keep the owner_id and owner_type in the Spec to keep consistent with the the other apis, where all user provided info is in the spec, irrespective of their mutability. |
||
// The display name of the API key. | ||
string display_name = 3; | ||
// The description of the API key. | ||
string description = 4; | ||
// The expiry time of the API key. | ||
google.protobuf.Timestamp expiry_time = 5; | ||
// True if the API key is disabled. | ||
bool disabled = 6; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mark the owner_id, owner_type and expiry as immutable in the comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done