mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-12 09:05:12 +00:00
* feat: define org grant check on project * feat: has project check * feat: has project check * feat: check has project * feat: check has project * feat: add has project check to console * Update internal/auth/repository/eventsourcing/eventstore/auth_request.go Co-authored-by: Livio Amstutz <[email protected]> * Update internal/auth/repository/eventsourcing/eventstore/auth_request.go Co-authored-by: Livio Amstutz <[email protected]> * Update internal/auth/repository/eventsourcing/eventstore/auth_request.go Co-authored-by: Livio Amstutz <[email protected]> * Update internal/auth/repository/eventsourcing/eventstore/auth_request.go Co-authored-by: Livio Amstutz <[email protected]> * Update internal/auth/repository/eventsourcing/eventstore/auth_request_test.go Co-authored-by: Livio Amstutz <[email protected]> * Update internal/auth/repository/eventsourcing/eventstore/auth_request_test.go Co-authored-by: Livio Amstutz <[email protected]> * Update internal/auth/repository/eventsourcing/eventstore/auth_request_test.go Co-authored-by: Livio Amstutz <[email protected]> * Update internal/ui/login/static/i18n/en.yaml Co-authored-by: Livio Amstutz <[email protected]> * fix: add has project tests Co-authored-by: Livio Amstutz <[email protected]>
217 lines
6.2 KiB
Protocol Buffer
217 lines
6.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "zitadel/object.proto";
|
|
import "validate/validate.proto";
|
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
|
|
|
package zitadel.project.v1;
|
|
|
|
option go_package ="github.com/caos/zitadel/pkg/grpc/project";
|
|
|
|
message Project {
|
|
string id = 1 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"69629023906488334\""
|
|
}
|
|
];
|
|
zitadel.v1.ObjectDetails details = 2;
|
|
string name = 3 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"ZITADEL\""
|
|
}
|
|
];
|
|
ProjectState state = 4 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
description: "current state of the project";
|
|
}
|
|
];
|
|
// describes if roles of user should be added in token
|
|
bool project_role_assertion = 5;
|
|
// ZITADEL checks if the user has at least one on this project
|
|
bool project_role_check = 6;
|
|
// ZITADEL checks if the org of the user has permission to this project
|
|
bool has_project_check = 7;
|
|
}
|
|
|
|
message GrantedProject {
|
|
string grant_id = 1 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"69629023906488334\""
|
|
}
|
|
];
|
|
string granted_org_id = 2 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"69629023906488334\""
|
|
}
|
|
];
|
|
string granted_org_name = 3 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"Some Organisation\""
|
|
}
|
|
];
|
|
repeated string granted_role_keys = 4 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "[\"role.super.man\"]"
|
|
}
|
|
];
|
|
ProjectGrantState state = 5 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
description: "current state of the project grant";
|
|
}
|
|
];
|
|
|
|
string project_id = 6 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"69629023906488334\""
|
|
}
|
|
];
|
|
string project_name = 7 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"ZITADEL\""
|
|
}
|
|
];
|
|
string project_owner_id = 8 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"69629023906488334\""
|
|
}
|
|
];
|
|
string project_owner_name = 9 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"CAOS AG\""
|
|
}
|
|
];
|
|
|
|
zitadel.v1.ObjectDetails details = 10;
|
|
}
|
|
|
|
enum ProjectState {
|
|
PROJECT_STATE_UNSPECIFIED = 0;
|
|
PROJECT_STATE_ACTIVE = 1;
|
|
PROJECT_STATE_INACTIVE = 2;
|
|
}
|
|
|
|
enum ProjectGrantState {
|
|
PROJECT_GRANT_STATE_UNSPECIFIED = 0;
|
|
PROJECT_GRANT_STATE_ACTIVE = 1;
|
|
PROJECT_GRANT_STATE_INACTIVE = 2;
|
|
}
|
|
|
|
message ProjectQuery {
|
|
oneof query {
|
|
option (validate.required) = true;
|
|
|
|
ProjectNameQuery name_query = 1;
|
|
}
|
|
}
|
|
|
|
message ProjectNameQuery {
|
|
string name = 1 [
|
|
(validate.rules).string = {max_len: 200},
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"ZITADEL\""
|
|
}
|
|
];
|
|
zitadel.v1.TextQueryMethod method = 2 [
|
|
(validate.rules).enum.defined_only = true,
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
description: "defines which text equality method is used"
|
|
}
|
|
];
|
|
}
|
|
|
|
message Role {
|
|
string key = 1 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"role.super.man\""
|
|
}
|
|
];
|
|
zitadel.v1.ObjectDetails details = 2;
|
|
string display_name = 3 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"Super man\""
|
|
}
|
|
];
|
|
string group = 4 [
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"people\""
|
|
}
|
|
];
|
|
}
|
|
|
|
message RoleQuery {
|
|
oneof query {
|
|
option (validate.required) = true;
|
|
|
|
RoleKeyQuery key_query = 1;
|
|
RoleDisplayNameQuery display_name_query = 2;
|
|
}
|
|
}
|
|
|
|
message RoleKeyQuery {
|
|
string key = 1 [
|
|
(validate.rules).string = {max_len: 200},
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"role.super.man\""
|
|
}
|
|
];
|
|
zitadel.v1.TextQueryMethod method = 2 [
|
|
(validate.rules).enum.defined_only = true,
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
description: "defines which text equality method is used"
|
|
}
|
|
];
|
|
}
|
|
|
|
message RoleDisplayNameQuery {
|
|
string display_name = 1 [
|
|
(validate.rules).string = {max_len: 200},
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"SUPER\""
|
|
}
|
|
];
|
|
zitadel.v1.TextQueryMethod method = 2 [
|
|
(validate.rules).enum.defined_only = true,
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
description: "defines which text equality method is used"
|
|
}
|
|
];
|
|
}
|
|
|
|
message ProjectGrantQuery {
|
|
oneof query {
|
|
option (validate.required) = true;
|
|
|
|
GrantProjectNameQuery project_name_query = 1;
|
|
GrantRoleKeyQuery role_key_query = 2;
|
|
}
|
|
}
|
|
|
|
message GrantProjectNameQuery {
|
|
string name = 1 [
|
|
(validate.rules).string = {max_len: 200},
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"ZITADEL\""
|
|
}
|
|
];
|
|
zitadel.v1.TextQueryMethod method = 2 [
|
|
(validate.rules).enum.defined_only = true,
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
description: "defines which text equality method is used"
|
|
}
|
|
];
|
|
}
|
|
|
|
message GrantRoleKeyQuery {
|
|
string role_key = 1 [
|
|
(validate.rules).string = {max_len: 200},
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
example: "\"role.super.man\""
|
|
}
|
|
];
|
|
zitadel.v1.TextQueryMethod method = 2 [
|
|
(validate.rules).enum.defined_only = true,
|
|
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
description: "defines which text equality method is used"
|
|
}
|
|
];
|
|
} |