2020-03-23 10:50:40 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
import "google/protobuf/struct.proto";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
2020-03-23 12:25:16 +01:00
|
|
|
import "validate/validate.proto";
|
2020-03-23 10:50:40 +01:00
|
|
|
import "protoc-gen-swagger/options/annotations.proto";
|
|
|
|
import "authoption/options.proto";
|
|
|
|
|
2020-06-09 09:22:37 +02:00
|
|
|
package caos.zitadel.auth.api.v1;
|
2020-03-23 10:50:40 +01:00
|
|
|
|
2020-03-23 16:56:02 +01:00
|
|
|
option go_package = "github.com/caos/zitadel/pkg/auth/api/grpc";
|
2020-03-23 10:50:40 +01:00
|
|
|
|
|
|
|
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
2020-05-18 12:06:36 +02:00
|
|
|
info: {
|
|
|
|
title: "Auth API";
|
|
|
|
version: "0.1";
|
|
|
|
contact:{
|
|
|
|
url: "https://github.com/caos/zitadel/pkg/auth"
|
2020-03-23 10:50:40 +01:00
|
|
|
};
|
2020-05-18 12:06:36 +02:00
|
|
|
};
|
2020-03-23 10:50:40 +01:00
|
|
|
|
2020-05-18 12:06:36 +02:00
|
|
|
schemes: HTTPS;
|
2020-03-23 10:50:40 +01:00
|
|
|
|
2020-05-18 12:06:36 +02:00
|
|
|
consumes: "application/json";
|
|
|
|
consumes: "application/grpc";
|
2020-03-23 10:50:40 +01:00
|
|
|
|
2020-05-18 12:06:36 +02:00
|
|
|
produces: "application/json";
|
|
|
|
produces: "application/grpc";
|
2020-03-23 10:50:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
service AuthService {
|
2020-05-18 12:06:36 +02:00
|
|
|
// Readiness
|
|
|
|
rpc Healthz(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/healthz"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc Ready(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/ready"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc Validate(google.protobuf.Empty) returns (google.protobuf.Struct) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/validate"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// Authorization
|
|
|
|
rpc GetMyUserSessions(google.protobuf.Empty) returns (UserSessionViews) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/me/usersessions"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
//User
|
2020-06-17 16:43:53 +02:00
|
|
|
rpc GetMyUser(google.protobuf.Empty) returns (UserView) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/users/me"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-06-17 07:25:04 +02:00
|
|
|
rpc GetMyUserProfile(google.protobuf.Empty) returns (UserProfileView) {
|
2020-05-18 12:06:36 +02:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/users/me/profile"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc UpdateMyUserProfile(UpdateUserProfileRequest) returns (UserProfile) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
put: "/users/me/profile"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-06-17 07:25:04 +02:00
|
|
|
rpc GetMyUserEmail(google.protobuf.Empty) returns (UserEmailView) {
|
2020-05-18 12:06:36 +02:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/users/me/email"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc ChangeMyUserEmail(UpdateUserEmailRequest) returns (UserEmail) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
put: "/users/me/email"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc VerifyMyUserEmail(VerifyMyUserEmailRequest) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/users/me/email/_verify"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc ResendMyEmailVerificationMail(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/users/me/email/_resendverification"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-06-17 07:25:04 +02:00
|
|
|
rpc GetMyUserPhone(google.protobuf.Empty) returns (UserPhoneView) {
|
2020-05-18 12:06:36 +02:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/users/me/phone"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc ChangeMyUserPhone(UpdateUserPhoneRequest) returns (UserPhone) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
put: "/users/me/phone"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-07-06 15:48:24 +02:00
|
|
|
rpc RemoveMyUserPhone(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
delete: "/users/me/phone"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-18 12:06:36 +02:00
|
|
|
rpc VerifyMyUserPhone(VerifyUserPhoneRequest) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/users/me/phone/_verify"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc ResendMyPhoneVerificationCode(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/users/me/phone/_resendverification"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-06-17 07:25:04 +02:00
|
|
|
rpc GetMyUserAddress(google.protobuf.Empty) returns (UserAddressView) {
|
2020-05-18 12:06:36 +02:00
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/users/me/address"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-07-01 07:18:05 +02:00
|
|
|
rpc GetMyUserChanges(ChangesRequest) returns (Changes) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/users/me/changes"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-18 12:06:36 +02:00
|
|
|
rpc UpdateMyUserAddress(UpdateUserAddressRequest) returns (UserAddress) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
put: "/users/me/address"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc GetMyMfas(google.protobuf.Empty) returns (MultiFactors) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/users/me/mfas"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
//Password
|
|
|
|
rpc ChangeMyPassword(PasswordChange) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
put: "/users/me/passwords/_change"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-07-06 15:35:20 +02:00
|
|
|
rpc GetMyPasswordComplexityPolicy(google.protobuf.Empty) returns (PasswordComplexityPolicy) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/policies/passwords/complexity"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-05-18 12:06:36 +02:00
|
|
|
// MFA
|
|
|
|
rpc AddMfaOTP(google.protobuf.Empty) returns (MfaOtpResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/users/me/mfa/otp"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc VerifyMfaOTP(VerifyMfaOtp) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
put: "/users/me/mfa/otp/_verify"
|
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc RemoveMfaOTP(google.protobuf.Empty) returns (google.protobuf.Empty) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
delete: "/users/me/mfa/otp"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-06-05 07:50:04 +02:00
|
|
|
rpc SearchMyUserGrant(UserGrantSearchRequest) returns (UserGrantSearchResponse) {
|
2020-05-18 12:06:36 +02:00
|
|
|
option (google.api.http) = {
|
2020-06-05 07:50:04 +02:00
|
|
|
post: "/usergrants/me/_search"
|
2020-05-18 12:06:36 +02:00
|
|
|
body: "*"
|
|
|
|
};
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-06-05 07:50:04 +02:00
|
|
|
rpc SearchMyProjectOrgs(MyProjectOrgSearchRequest) returns (MyProjectOrgSearchResponse) {
|
2020-05-18 12:06:36 +02:00
|
|
|
option (google.api.http) = {
|
2020-06-05 07:50:04 +02:00
|
|
|
post: "/global/projectorgs/_search"
|
|
|
|
body: "*"
|
2020-05-18 12:06:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
//Permission
|
|
|
|
rpc GetMyZitadelPermissions(google.protobuf.Empty) returns (MyPermissions) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/permissions/zitadel/me"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
2020-06-19 15:33:54 +02:00
|
|
|
|
|
|
|
rpc GetMyProjectPermissions(google.protobuf.Empty) returns (MyPermissions) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
get: "/permissions/me"
|
|
|
|
};
|
|
|
|
|
|
|
|
option (caos.zitadel.utils.v1.auth_option) = {
|
|
|
|
permission: "authenticated"
|
|
|
|
};
|
|
|
|
}
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserSessionViews {
|
2020-05-18 12:06:36 +02:00
|
|
|
repeated UserSessionView user_sessions = 1;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
message UserSessionView {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
string agent_id = 2;
|
|
|
|
UserSessionState auth_state = 3;
|
|
|
|
string user_id = 4;
|
|
|
|
string user_name = 5;
|
|
|
|
uint64 sequence = 6;
|
2020-06-17 16:43:53 +02:00
|
|
|
string login_name = 7;
|
|
|
|
string display_name = 8;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum UserSessionState {
|
2020-05-18 12:06:36 +02:00
|
|
|
USERSESSIONSTATE_UNSPECIFIED = 0;
|
|
|
|
USERSESSIONSTATE_ACTIVE = 1;
|
|
|
|
USERSESSIONSTATE_TERMINATED = 2;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum OIDCResponseType {
|
2020-05-18 12:06:36 +02:00
|
|
|
OIDCRESPONSETYPE_CODE = 0;
|
|
|
|
OIDCRESPONSETYPE_ID_TOKEN = 1;
|
|
|
|
OIDCRESPONSETYPE_ID_TOKEN_TOKEN = 2;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2020-06-17 16:43:53 +02:00
|
|
|
message UserView {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
UserState state = 2;
|
|
|
|
google.protobuf.Timestamp creation_date = 3;
|
2020-06-17 16:43:53 +02:00
|
|
|
google.protobuf.Timestamp change_date = 4;
|
|
|
|
google.protobuf.Timestamp last_login = 5;
|
|
|
|
google.protobuf.Timestamp password_changed = 6;
|
|
|
|
string user_name = 7;
|
|
|
|
string first_name = 8;
|
|
|
|
string last_name = 9;
|
|
|
|
string display_name = 10;
|
2020-05-18 12:06:36 +02:00
|
|
|
string nick_name = 11;
|
2020-06-17 16:43:53 +02:00
|
|
|
string preferred_language = 12;
|
|
|
|
Gender gender = 13;
|
|
|
|
string email = 14;
|
|
|
|
bool is_email_verified = 15;
|
|
|
|
string phone = 16;
|
|
|
|
bool is_phone_verified = 17;
|
|
|
|
string country = 18;
|
|
|
|
string locality = 19;
|
|
|
|
string postal_code = 20;
|
|
|
|
string region = 21;
|
|
|
|
string street_address = 22;
|
|
|
|
uint64 sequence = 23;
|
|
|
|
string resource_owner = 24;
|
|
|
|
repeated string login_names = 25;
|
|
|
|
string preferred_login_name = 26;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum UserState {
|
2020-06-17 16:43:53 +02:00
|
|
|
USERSTATE_UNSPECIFIED = 0;
|
2020-05-18 12:06:36 +02:00
|
|
|
USERSTATE_ACTIVE = 1;
|
|
|
|
USERSTATE_INACTIVE = 2;
|
|
|
|
USERSTATE_DELETED = 3;
|
|
|
|
USERSTATE_LOCKED = 4;
|
|
|
|
USERSTATE_SUSPEND = 5;
|
|
|
|
USERSTATE_INITIAL = 6;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum Gender {
|
2020-05-18 12:06:36 +02:00
|
|
|
GENDER_UNSPECIFIED = 0;
|
|
|
|
GENDER_FEMALE = 1;
|
|
|
|
GENDER_MALE = 2;
|
|
|
|
GENDER_DIVERSE = 3;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserProfile {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
string user_name = 2;
|
|
|
|
string first_name = 3;
|
|
|
|
string last_name = 4;
|
|
|
|
string nick_name = 5;
|
|
|
|
string display_name = 6;
|
|
|
|
string preferred_language = 7;
|
|
|
|
Gender gender = 8;
|
|
|
|
uint64 sequence = 9;
|
|
|
|
google.protobuf.Timestamp creation_date = 10;
|
|
|
|
google.protobuf.Timestamp change_date = 11;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2020-06-17 07:25:04 +02:00
|
|
|
message UserProfileView {
|
|
|
|
string id = 1;
|
|
|
|
string user_name = 2;
|
|
|
|
string first_name = 3;
|
|
|
|
string last_name = 4;
|
|
|
|
string nick_name = 5;
|
|
|
|
string display_name = 6;
|
|
|
|
string preferred_language = 7;
|
|
|
|
Gender gender = 8;
|
|
|
|
uint64 sequence = 9;
|
|
|
|
google.protobuf.Timestamp creation_date = 10;
|
|
|
|
google.protobuf.Timestamp change_date = 11;
|
|
|
|
repeated string login_names = 12;
|
|
|
|
string preferred_login_name = 13;
|
|
|
|
}
|
|
|
|
|
2020-03-23 10:50:40 +01:00
|
|
|
message UpdateUserProfileRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string first_name = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
|
|
|
string last_name = 2 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
|
|
|
string nick_name = 3 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
2020-06-17 08:06:40 +02:00
|
|
|
string preferred_language = 4 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
|
|
|
Gender gender = 5;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserEmail {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
string email = 2;
|
|
|
|
bool isEmailVerified = 3;
|
|
|
|
uint64 sequence = 4;
|
|
|
|
google.protobuf.Timestamp creation_date = 5;
|
|
|
|
google.protobuf.Timestamp change_date = 6;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2020-06-17 07:25:04 +02:00
|
|
|
message UserEmailView {
|
|
|
|
string id = 1;
|
|
|
|
string email = 2;
|
|
|
|
bool isEmailVerified = 3;
|
|
|
|
uint64 sequence = 4;
|
|
|
|
google.protobuf.Timestamp creation_date = 5;
|
|
|
|
google.protobuf.Timestamp change_date = 6;
|
|
|
|
}
|
|
|
|
|
2020-03-23 10:50:40 +01:00
|
|
|
message VerifyMyUserEmailRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string code = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message VerifyUserEmailRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
string code = 2 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateUserEmailRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string email = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserPhone {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
string phone = 2;
|
|
|
|
bool is_phone_verified = 3;
|
|
|
|
uint64 sequence = 4;
|
|
|
|
google.protobuf.Timestamp creation_date = 5;
|
|
|
|
google.protobuf.Timestamp change_date = 6;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2020-06-17 07:25:04 +02:00
|
|
|
message UserPhoneView {
|
|
|
|
string id = 1;
|
|
|
|
string phone = 2;
|
|
|
|
bool is_phone_verified = 3;
|
|
|
|
uint64 sequence = 4;
|
|
|
|
google.protobuf.Timestamp creation_date = 5;
|
|
|
|
google.protobuf.Timestamp change_date = 6;
|
|
|
|
}
|
|
|
|
|
2020-03-23 10:50:40 +01:00
|
|
|
message UpdateUserPhoneRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string phone = 1 [(validate.rules).string = {min_len: 1, max_len: 20}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message VerifyUserPhoneRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string code = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserAddress {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
string country = 2;
|
|
|
|
string locality = 3;
|
|
|
|
string postal_code = 4;
|
|
|
|
string region = 5;
|
|
|
|
string street_address = 6;
|
|
|
|
uint64 sequence = 7;
|
2020-06-17 07:25:04 +02:00
|
|
|
google.protobuf.Timestamp creation_date = 8;
|
|
|
|
google.protobuf.Timestamp change_date = 9;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UserAddressView {
|
|
|
|
string id = 1;
|
|
|
|
string country = 2;
|
|
|
|
string locality = 3;
|
|
|
|
string postal_code = 4;
|
|
|
|
string region = 5;
|
|
|
|
string street_address = 6;
|
|
|
|
uint64 sequence = 7;
|
2020-05-18 12:06:36 +02:00
|
|
|
google.protobuf.Timestamp creation_date = 8;
|
|
|
|
google.protobuf.Timestamp change_date = 9;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateUserAddressRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string country = 1 [(validate.rules).string = {max_len: 200}];
|
|
|
|
string locality = 2 [(validate.rules).string = {max_len: 200}];
|
|
|
|
string postal_code = 3 [(validate.rules).string = {max_len: 200}];
|
|
|
|
string region = 4 [(validate.rules).string = {max_len: 200}];
|
|
|
|
string street_address = 5 [(validate.rules).string = {max_len: 200}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2020-03-31 11:07:48 +02:00
|
|
|
message PasswordID {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message PasswordRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
string password = 1 [(validate.rules).string = {min_len: 1, max_len: 72}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message PasswordChange {
|
2020-05-18 12:06:36 +02:00
|
|
|
string old_password = 1 [(validate.rules).string = {min_len: 1, max_len: 72}];
|
|
|
|
string new_password = 2 [(validate.rules).string = {min_len: 1, max_len: 72}];
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum MfaType {
|
2020-05-18 12:06:36 +02:00
|
|
|
MFATYPE_UNSPECIFIED = 0;
|
|
|
|
MFATYPE_SMS = 1;
|
|
|
|
MFATYPE_OTP = 2;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message VerifyMfaOtp {
|
2020-05-18 12:06:36 +02:00
|
|
|
string code = 1;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message MultiFactors {
|
2020-05-18 12:06:36 +02:00
|
|
|
repeated MultiFactor mfas = 1;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message MultiFactor {
|
2020-05-18 12:06:36 +02:00
|
|
|
MfaType type = 1;
|
|
|
|
MFAState state = 2;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message MfaOtpResponse {
|
2020-05-18 12:06:36 +02:00
|
|
|
string user_id = 1;
|
|
|
|
string url = 2;
|
|
|
|
string secret = 3;
|
|
|
|
MFAState state = 4;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum MFAState {
|
2020-05-18 12:06:36 +02:00
|
|
|
MFASTATE_UNSPECIFIED = 0;
|
|
|
|
MFASTATE_NOT_READY = 1;
|
|
|
|
MFASTATE_READY = 2;
|
|
|
|
MFASTATE_REMOVED = 3;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message OIDCClientAuth {
|
2020-05-18 12:06:36 +02:00
|
|
|
string client_id = 1;
|
|
|
|
string client_secret = 2;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2020-06-05 07:50:04 +02:00
|
|
|
message UserGrantSearchRequest {
|
|
|
|
uint64 offset = 1;
|
|
|
|
uint64 limit = 2;
|
|
|
|
UserGrantSearchKey sorting_column = 3 [(validate.rules).enum = {not_in: [0]}];;
|
|
|
|
bool asc = 4;
|
|
|
|
repeated UserGrantSearchQuery queries = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UserGrantSearchQuery {
|
|
|
|
UserGrantSearchKey key = 1 [(validate.rules).enum = {not_in: [0]}];;
|
|
|
|
SearchMethod method = 2;
|
|
|
|
string value = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum UserGrantSearchKey {
|
|
|
|
UserGrantSearchKey_UNKNOWN = 0;
|
|
|
|
UserGrantSearchKey_ORG_ID = 1;
|
|
|
|
UserGrantSearchKey_PROJECT_ID = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UserGrantSearchResponse {
|
|
|
|
uint64 offset = 1;
|
|
|
|
uint64 limit = 2;
|
|
|
|
uint64 total_result = 3;
|
|
|
|
repeated UserGrantView result = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UserGrantView {
|
|
|
|
string OrgId = 1;
|
|
|
|
string ProjectId = 2;
|
|
|
|
string UserId = 3;
|
|
|
|
repeated string Roles = 4;
|
|
|
|
string OrgName = 5;
|
|
|
|
}
|
|
|
|
|
2020-03-23 10:50:40 +01:00
|
|
|
message MyProjectOrgSearchRequest {
|
2020-05-18 12:06:36 +02:00
|
|
|
uint64 offset = 1;
|
|
|
|
uint64 limit = 2;
|
|
|
|
bool asc = 4;
|
|
|
|
repeated MyProjectOrgSearchQuery queries = 5;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message MyProjectOrgSearchQuery {
|
2020-05-18 12:06:36 +02:00
|
|
|
MyProjectOrgSearchKey key = 1 [(validate.rules).enum = {not_in: [0]}];;
|
|
|
|
SearchMethod method = 2;
|
|
|
|
string value = 3;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
enum MyProjectOrgSearchKey {
|
2020-05-18 12:06:36 +02:00
|
|
|
MYPROJECTORGSEARCHKEY_UNSPECIFIED = 0;
|
|
|
|
MYPROJECTORGSEARCHKEY_ORG_NAME = 1;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message MyProjectOrgSearchResponse {
|
2020-05-18 12:06:36 +02:00
|
|
|
uint64 offset = 1;
|
|
|
|
uint64 limit = 2;
|
|
|
|
uint64 total_result = 3;
|
|
|
|
repeated Org result = 4;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message Org {
|
2020-05-18 12:06:36 +02:00
|
|
|
string id = 1;
|
|
|
|
string name = 2;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message MyPermissions {
|
2020-05-18 12:06:36 +02:00
|
|
|
repeated string permissions = 1;
|
2020-03-23 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2020-03-31 11:07:48 +02:00
|
|
|
enum SearchMethod {
|
2020-05-18 12:06:36 +02:00
|
|
|
SEARCHMETHOD_EQUALS = 0;
|
|
|
|
SEARCHMETHOD_STARTS_WITH = 1;
|
|
|
|
SEARCHMETHOD_CONTAINS = 2;
|
2020-06-05 07:50:04 +02:00
|
|
|
SEARCHMETHOD_EQUALS_IGNORE_CASE = 3;
|
|
|
|
SEARCHMETHOD_STARTS_WITH_IGNORE_CASE = 4;
|
|
|
|
SEARCHMETHOD_CONTAINS_IGNORE_CASE = 5;
|
|
|
|
}
|
2020-07-01 07:18:05 +02:00
|
|
|
|
|
|
|
message ChangesRequest {
|
|
|
|
uint64 limit= 1;
|
|
|
|
uint64 sequence_offset = 2;
|
|
|
|
bool asc = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Changes {
|
|
|
|
repeated Change changes = 1;
|
|
|
|
uint64 offset = 2;
|
|
|
|
uint64 limit = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Change {
|
|
|
|
google.protobuf.Timestamp change_date = 1;
|
|
|
|
string event_type = 2;
|
|
|
|
uint64 sequence = 3;
|
|
|
|
string editor_id = 4;
|
|
|
|
string editor = 5;
|
|
|
|
google.protobuf.Struct data = 6;
|
2020-07-06 15:35:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message PasswordComplexityPolicy {
|
|
|
|
string id = 1;
|
|
|
|
string description = 2;
|
|
|
|
google.protobuf.Timestamp creation_date = 3;
|
|
|
|
google.protobuf.Timestamp change_date = 4;
|
|
|
|
uint64 min_length = 5;
|
|
|
|
bool has_lowercase = 6;
|
|
|
|
bool has_uppercase = 7;
|
|
|
|
bool has_number = 8;
|
|
|
|
bool has_symbol = 9;
|
|
|
|
uint64 sequence = 10;
|
|
|
|
bool is_default = 11;
|
|
|
|
}
|