feat: org command sides (#96)

* start org

* refactor(eventstore): filter in sql for querier

* feat(eventstore): Aggregate precondition

preconditions are checked right before insert. Insert is still transaction save

* feat(eventstore): check preconditions in repository

* test(eventstore): test precondition in models

* test(eventstore): precondition-tests

* start org

* refactor(eventstore): filter in sql for querier

* feat(eventstore): Aggregate precondition

preconditions are checked right before insert. Insert is still transaction save

* feat(admin): start implement org

* feat(eventstore): check preconditions in repository

* fix(eventstore): data as NULL if empty
refactor(eventstore): naming in sequence methods

* feat(admin): org command side

* feat(management): start org-repo

* feat(org): member

* fix: replace ObjectRoot.ID with ObjectRoot.AggregateID

* aggregateID

* add remove,change member

* refactor(org): namings

* refactor(eventstore): querier as type

* fix(precondition): rename validation from precondition to validation

* test(eventstore): isErr func instead of wantErr bool

* fix(tests): Data

* fix(eventstore): correct check for existing events in push,
simplify insert statement

* fix(eventstore): aggregate id public

* test(org): eventsourcing

* test(org): eventstore

* test(org): deactivate, reactivate, orgbyid

* test(org): getMemberByIDs

* tests

* running tests

* add user repo to admin

* thorw not found if no org found

* eventstore tests done

* lauft

* validate if user is already member of org

* modules

* delete unused file

* add member validation test

* return error if unable to validat member

* generate org id once,
set resourceowner of org

* Update internal/admin/repository/eventsourcing/eventstore/org.go

* Update internal/admin/repository/eventsourcing/eventstore/org.go

* Update internal/org/repository/eventsourcing/member_model.go

* Update internal/org/repository/eventsourcing/org.go

* Update internal/org/repository/eventsourcing/org.go

* Update internal/org/repository/eventsourcing/org_member.go

* Update internal/org/repository/eventsourcing/org_member.go

* Update internal/org/repository/eventsourcing/org_model.go

* Update internal/org/repository/eventsourcing/org.go

* Update internal/org/repository/eventsourcing/org_model.go

* Update internal/org/repository/eventsourcing/org_model.go

* typo

* correct user events

* usercreate for setuporg instead of userregister

* set data

* mod

* mod

* tests

* cleanup code

* code styling

* return member on add and change

* change username in startup

* girignore

* orgID as parameter in re-/deactive org

* startup config

* migration for admin_api-user

* probes fro admin

* move unique org

Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
This commit is contained in:
Silvan
2020-05-13 14:22:29 +02:00
committed by GitHub
parent 7facd78026
commit 9e32740eb8
67 changed files with 16694 additions and 13035 deletions

View File

@@ -2,16 +2,22 @@ package admin
import (
"context"
app "github.com/caos/zitadel/internal/admin"
sd "github.com/caos/zitadel/internal/config/systemdefaults"
"github.com/caos/logging"
"github.com/caos/zitadel/internal/admin/repository/eventsourcing"
"github.com/caos/zitadel/internal/api/auth"
"github.com/caos/zitadel/pkg/admin/api"
)
type Config struct {
App app.Config
API api.Config
Repository eventsourcing.Config
API api.Config
}
func Start(ctx context.Context, config Config, authZ auth.Config) {
api.Start(ctx, config.API)
func Start(ctx context.Context, config Config, authZ auth.Config, systemDefaults sd.SystemDefaults) {
repo, err := eventsourcing.Start(config.Repository, systemDefaults)
logging.Log("MAIN-9uBxp").OnError(err).Panic("unable to start app")
api.Start(ctx, config.API, authZ, repo)
}

View File

@@ -2,6 +2,9 @@ package api
import (
"context"
"github.com/caos/zitadel/internal/admin/repository"
"github.com/caos/zitadel/internal/api/auth"
grpc_util "github.com/caos/zitadel/internal/api/grpc"
"github.com/caos/zitadel/internal/api/grpc/server"
"github.com/caos/zitadel/pkg/admin/api/grpc"
@@ -11,8 +14,8 @@ type Config struct {
GRPC grpc_util.Config
}
func Start(ctx context.Context, conf Config) {
grpcServer := grpc.StartServer(conf.GRPC.ToServerConfig())
func Start(ctx context.Context, conf Config, authZ auth.Config, repo repository.Repository) {
grpcServer := grpc.StartServer(conf.GRPC.ToServerConfig(), authZ, repo)
grpcGateway := grpc.StartGateway(conf.GRPC.ToGatewayConfig())
server.StartServer(ctx, grpcServer)

View File

@@ -583,11 +583,11 @@ func (m *OrgSearchResponse) GetResult() []*Org {
}
type OrgSetUpRequest struct {
Org *CreateOrgRequest `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"`
User *RegisterUserRequest `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Org *CreateOrgRequest `protobuf:"bytes,1,opt,name=org,proto3" json:"org,omitempty"`
User *CreateUserRequest `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OrgSetUpRequest) Reset() { *m = OrgSetUpRequest{} }
@@ -622,7 +622,7 @@ func (m *OrgSetUpRequest) GetOrg() *CreateOrgRequest {
return nil
}
func (m *OrgSetUpRequest) GetUser() *RegisterUserRequest {
func (m *OrgSetUpRequest) GetUser() *CreateUserRequest {
if m != nil {
return m.User
}
@@ -676,105 +676,169 @@ func (m *OrgSetUpResponse) GetUser() *User {
return nil
}
type RegisterUserRequest struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
type CreateUserRequest struct {
UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
NickName string `protobuf:"bytes,4,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"`
DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
PreferredLanguage string `protobuf:"bytes,6,opt,name=preferred_language,json=preferredLanguage,proto3" json:"preferred_language,omitempty"`
Gender Gender `protobuf:"varint,7,opt,name=gender,proto3,enum=zitadel.admin.api.v1.Gender" json:"gender,omitempty"`
Password string `protobuf:"bytes,8,opt,name=password,proto3" json:"password,omitempty"`
OrgId string `protobuf:"bytes,9,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
Email string `protobuf:"bytes,8,opt,name=email,proto3" json:"email,omitempty"`
IsEmailVerified bool `protobuf:"varint,9,opt,name=is_email_verified,json=isEmailVerified,proto3" json:"is_email_verified,omitempty"`
Phone string `protobuf:"bytes,11,opt,name=phone,proto3" json:"phone,omitempty"`
IsPhoneVerified bool `protobuf:"varint,12,opt,name=is_phone_verified,json=isPhoneVerified,proto3" json:"is_phone_verified,omitempty"`
Country string `protobuf:"bytes,13,opt,name=country,proto3" json:"country,omitempty"`
Locality string `protobuf:"bytes,14,opt,name=locality,proto3" json:"locality,omitempty"`
PostalCode string `protobuf:"bytes,15,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
Region string `protobuf:"bytes,16,opt,name=region,proto3" json:"region,omitempty"`
StreetAddress string `protobuf:"bytes,17,opt,name=street_address,json=streetAddress,proto3" json:"street_address,omitempty"`
Password string `protobuf:"bytes,18,opt,name=password,proto3" json:"password,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RegisterUserRequest) Reset() { *m = RegisterUserRequest{} }
func (m *RegisterUserRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterUserRequest) ProtoMessage() {}
func (*RegisterUserRequest) Descriptor() ([]byte, []int) {
func (m *CreateUserRequest) Reset() { *m = CreateUserRequest{} }
func (m *CreateUserRequest) String() string { return proto.CompactTextString(m) }
func (*CreateUserRequest) ProtoMessage() {}
func (*CreateUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_73a7fc70dcc2027c, []int{9}
}
func (m *RegisterUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterUserRequest.Unmarshal(m, b)
func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateUserRequest.Unmarshal(m, b)
}
func (m *RegisterUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterUserRequest.Marshal(b, m, deterministic)
func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateUserRequest.Marshal(b, m, deterministic)
}
func (m *RegisterUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterUserRequest.Merge(m, src)
func (m *CreateUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateUserRequest.Merge(m, src)
}
func (m *RegisterUserRequest) XXX_Size() int {
return xxx_messageInfo_RegisterUserRequest.Size(m)
func (m *CreateUserRequest) XXX_Size() int {
return xxx_messageInfo_CreateUserRequest.Size(m)
}
func (m *RegisterUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterUserRequest.DiscardUnknown(m)
func (m *CreateUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateUserRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterUserRequest proto.InternalMessageInfo
var xxx_messageInfo_CreateUserRequest proto.InternalMessageInfo
func (m *RegisterUserRequest) GetEmail() string {
func (m *CreateUserRequest) GetUserName() string {
if m != nil {
return m.Email
return m.UserName
}
return ""
}
func (m *RegisterUserRequest) GetFirstName() string {
func (m *CreateUserRequest) GetFirstName() string {
if m != nil {
return m.FirstName
}
return ""
}
func (m *RegisterUserRequest) GetLastName() string {
func (m *CreateUserRequest) GetLastName() string {
if m != nil {
return m.LastName
}
return ""
}
func (m *RegisterUserRequest) GetNickName() string {
func (m *CreateUserRequest) GetNickName() string {
if m != nil {
return m.NickName
}
return ""
}
func (m *RegisterUserRequest) GetDisplayName() string {
func (m *CreateUserRequest) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *RegisterUserRequest) GetPreferredLanguage() string {
func (m *CreateUserRequest) GetPreferredLanguage() string {
if m != nil {
return m.PreferredLanguage
}
return ""
}
func (m *RegisterUserRequest) GetGender() Gender {
func (m *CreateUserRequest) GetGender() Gender {
if m != nil {
return m.Gender
}
return Gender_GENDER_UNSPECIFIED
}
func (m *RegisterUserRequest) GetPassword() string {
func (m *CreateUserRequest) GetEmail() string {
if m != nil {
return m.Password
return m.Email
}
return ""
}
func (m *RegisterUserRequest) GetOrgId() string {
func (m *CreateUserRequest) GetIsEmailVerified() bool {
if m != nil {
return m.OrgId
return m.IsEmailVerified
}
return false
}
func (m *CreateUserRequest) GetPhone() string {
if m != nil {
return m.Phone
}
return ""
}
func (m *CreateUserRequest) GetIsPhoneVerified() bool {
if m != nil {
return m.IsPhoneVerified
}
return false
}
func (m *CreateUserRequest) GetCountry() string {
if m != nil {
return m.Country
}
return ""
}
func (m *CreateUserRequest) GetLocality() string {
if m != nil {
return m.Locality
}
return ""
}
func (m *CreateUserRequest) GetPostalCode() string {
if m != nil {
return m.PostalCode
}
return ""
}
func (m *CreateUserRequest) GetRegion() string {
if m != nil {
return m.Region
}
return ""
}
func (m *CreateUserRequest) GetStreetAddress() string {
if m != nil {
return m.StreetAddress
}
return ""
}
func (m *CreateUserRequest) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
@@ -800,6 +864,7 @@ type User struct {
PostalCode string `protobuf:"bytes,18,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
Region string `protobuf:"bytes,19,opt,name=region,proto3" json:"region,omitempty"`
StreetAddress string `protobuf:"bytes,20,opt,name=street_address,json=streetAddress,proto3" json:"street_address,omitempty"`
Sequence uint64 `protobuf:"varint,21,opt,name=sequence,proto3" json:"sequence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -970,6 +1035,13 @@ func (m *User) GetStreetAddress() string {
return ""
}
func (m *User) GetSequence() uint64 {
if m != nil {
return m.Sequence
}
return 0
}
type CreateOrgRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
@@ -1032,7 +1104,7 @@ func init() {
proto.RegisterType((*OrgSearchResponse)(nil), "zitadel.admin.api.v1.OrgSearchResponse")
proto.RegisterType((*OrgSetUpRequest)(nil), "zitadel.admin.api.v1.OrgSetUpRequest")
proto.RegisterType((*OrgSetUpResponse)(nil), "zitadel.admin.api.v1.OrgSetUpResponse")
proto.RegisterType((*RegisterUserRequest)(nil), "zitadel.admin.api.v1.RegisterUserRequest")
proto.RegisterType((*CreateUserRequest)(nil), "zitadel.admin.api.v1.CreateUserRequest")
proto.RegisterType((*User)(nil), "zitadel.admin.api.v1.User")
proto.RegisterType((*CreateOrgRequest)(nil), "zitadel.admin.api.v1.CreateOrgRequest")
}
@@ -1040,112 +1112,119 @@ func init() {
func init() { proto.RegisterFile("admin.proto", fileDescriptor_73a7fc70dcc2027c) }
var fileDescriptor_73a7fc70dcc2027c = []byte{
// 1667 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x73, 0x1b, 0x49,
0x15, 0xcf, 0xe8, 0x9f, 0x47, 0x4f, 0xfe, 0x33, 0xee, 0x78, 0x9d, 0x59, 0x39, 0xbb, 0xf6, 0x0e,
0x9b, 0x90, 0xd5, 0x12, 0x69, 0x23, 0x96, 0x2a, 0xca, 0xd4, 0x2e, 0x25, 0x5b, 0xb3, 0x8e, 0x2a,
0xb6, 0xe4, 0x1d, 0xc9, 0xe1, 0xcf, 0x45, 0x4c, 0x34, 0xed, 0x51, 0x93, 0xd1, 0xcc, 0xa4, 0xbb,
0x95, 0xa0, 0xa5, 0x38, 0x90, 0x2a, 0x2e, 0x1c, 0x38, 0xc0, 0x81, 0x4f, 0xc0, 0x99, 0x13, 0x57,
0xbe, 0x04, 0x1f, 0x80, 0x0b, 0x55, 0x5c, 0x38, 0x70, 0xe1, 0xb2, 0x27, 0xaa, 0xbb, 0x47, 0xb2,
0x46, 0x96, 0x62, 0x52, 0x5c, 0xf6, 0x64, 0xf5, 0xef, 0xf7, 0x7b, 0xaf, 0x5f, 0xbf, 0x7e, 0xfd,
0xa6, 0xdb, 0x50, 0x72, 0xbd, 0x11, 0x09, 0xab, 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, 0xd1, 0xa8, 0x36, 0x70, 0x23, 0x56, 0x4b,
0x02, 0xa8, 0xc5, 0xcf, 0xfd, 0x9a, 0x34, 0xaa, 0x67, 0x3f, 0xa9, 0x3e, 0xaa, 0x68, 0x99, 0xba,
0xe1, 0xc6, 0x71, 0x40, 0x06, 0xf2, 0xe6, 0x50, 0xfb, 0x39, 0x8b, 0xc2, 0x34, 0xe2, 0xd3, 0x78,
0x70, 0x78, 0x4d, 0x73, 0x78, 0x4d, 0xf3, 0xd3, 0xca, 0x8d, 0x53, 0xca, 0xff, 0x12, 0x08, 0xed,
0xb3, 0x82, 0x2c, 0xf0, 0xef, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x70, 0xfd, 0x92, 0x95, 0x62,
0x10, 0x00, 0x00,
// 1785 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x73, 0x1b, 0x59,
0x15, 0x4e, 0xeb, 0x65, 0xe9, 0x48, 0x96, 0x5b, 0x37, 0x8e, 0xd3, 0x23, 0x67, 0xb0, 0xa7, 0x99,
0xbc, 0x14, 0x22, 0x4d, 0xc4, 0x50, 0x50, 0x9e, 0x62, 0x28, 0xd9, 0xea, 0xb1, 0x55, 0xb1, 0x25,
0x4f, 0x4b, 0x0e, 0x8f, 0x8d, 0xe8, 0xa8, 0xaf, 0x5b, 0x4d, 0xa4, 0xee, 0xce, 0xbd, 0x2d, 0x07,
0x85, 0x62, 0x41, 0xaa, 0xa8, 0x62, 0xc5, 0x02, 0x16, 0xfc, 0x02, 0xd6, 0xac, 0xd8, 0xb2, 0x66,
0xcf, 0x92, 0x2d, 0x55, 0x6c, 0xd9, 0xb0, 0x09, 0x1b, 0xea, 0x3e, 0x5a, 0x6f, 0xc5, 0xe5, 0x62,
0xc3, 0xca, 0xea, 0xf3, 0x7d, 0xe7, 0xdc, 0x73, 0xcf, 0x3d, 0xdf, 0x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b, 0x32, 0xc5, 0x1b, 0xfc, 0xdb, 0xff, 0x0d, 0x00, 0x00, 0xff,
0xff, 0xd2, 0xa3, 0xeb, 0x34, 0xeb, 0x11, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -197,6 +197,64 @@
}
}
},
"v1CreateUserRequest": {
"type": "object",
"properties": {
"user_name": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"display_name": {
"type": "string"
},
"preferred_language": {
"type": "string"
},
"gender": {
"$ref": "#/definitions/v1Gender"
},
"email": {
"type": "string"
},
"is_email_verified": {
"type": "boolean",
"format": "boolean"
},
"phone": {
"type": "string"
},
"is_phone_verified": {
"type": "boolean",
"format": "boolean"
},
"country": {
"type": "string"
},
"locality": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"region": {
"type": "string"
},
"street_address": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"v1Gender": {
"type": "string",
"enum": [
@@ -321,7 +379,7 @@
"$ref": "#/definitions/v1CreateOrgRequest"
},
"user": {
"$ref": "#/definitions/v1RegisterUserRequest"
"$ref": "#/definitions/v1CreateUserRequest"
}
}
},
@@ -345,38 +403,6 @@
],
"default": "ORGSTATE_UNSPECIFIED"
},
"v1RegisterUserRequest": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"display_name": {
"type": "string"
},
"preferred_language": {
"type": "string"
},
"gender": {
"$ref": "#/definitions/v1Gender"
},
"password": {
"type": "string"
},
"org_id": {
"type": "string"
}
}
},
"v1UniqueOrgResponse": {
"type": "object",
"properties": {
@@ -452,6 +478,10 @@
},
"street_address": {
"type": "string"
},
"sequence": {
"type": "string",
"format": "uint64"
}
}
},

View File

@@ -2,21 +2,38 @@ package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
)
func (s *Server) GetOrgByID(ctx context.Context, orgID *OrgID) (_ *Org, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-mvn3R", "Not implemented")
org, err := s.org.OrgByID(ctx, orgID.Id)
if err != nil {
return nil, err
}
return orgFromModel(org), nil
}
func (s *Server) SearchOrgs(ctx context.Context, request *OrgSearchRequest) (_ *OrgSearchResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-Po9Hd", "Not implemented")
orgs, err := s.org.SearchOrgs(ctx)
if err != nil {
return nil, err
}
return &OrgSearchResponse{Result: orgsFromModel(orgs),
Limit: request.Limit,
Offset: request.Offset,
// TotalResult: , TODO: total result from search
}, nil
}
func (s *Server) IsOrgUnique(ctx context.Context, request *UniqueOrgRequest) (org *UniqueOrgResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-0p6Fw", "Not implemented")
isUnique, err := s.org.IsOrgUnique(ctx, request.Name, request.Domain)
return &UniqueOrgResponse{IsUnique: isUnique}, err
}
func (s *Server) SetUpOrg(ctx context.Context, orgSetUp *OrgSetUpRequest) (_ *OrgSetUpResponse, err error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-hdj5D", "Not implemented")
setUp, err := s.org.SetUpOrg(ctx, setUpRequestToModel(orgSetUp))
if err != nil {
return nil, err
}
return setUpOrgResponseFromModel(setUp), err
}

View File

@@ -0,0 +1,181 @@
package grpc
import (
"github.com/caos/logging"
admin_model "github.com/caos/zitadel/internal/admin/model"
org_model "github.com/caos/zitadel/internal/org/model"
usr_model "github.com/caos/zitadel/internal/user/model"
"github.com/golang/protobuf/ptypes"
"golang.org/x/text/language"
)
func setUpRequestToModel(setUp *OrgSetUpRequest) *admin_model.SetupOrg {
return &admin_model.SetupOrg{
Org: orgCreateRequestToModel(setUp.Org),
User: userCreateRequestToModel(setUp.User),
}
}
func orgCreateRequestToModel(org *CreateOrgRequest) *org_model.Org {
return &org_model.Org{
Domain: org.Domain,
Name: org.Name,
}
}
func userCreateRequestToModel(user *CreateUserRequest) *usr_model.User {
preferredLanguage, err := language.Parse(user.PreferredLanguage)
logging.Log("GRPC-30hwz").OnError(err).Debug("unable to parse language")
return &usr_model.User{
Profile: &usr_model.Profile{
UserName: user.UserName,
DisplayName: user.DisplayName,
FirstName: user.FirstName,
LastName: user.LastName,
NickName: user.NickName,
PreferredLanguage: preferredLanguage,
Gender: genderToModel(user.Gender),
},
Password: &usr_model.Password{
SecretString: user.Password,
},
Email: &usr_model.Email{
EmailAddress: user.Email,
IsEmailVerified: user.IsEmailVerified,
},
Phone: &usr_model.Phone{
IsPhoneVerified: user.IsPhoneVerified,
PhoneNumber: user.Phone,
},
Address: &usr_model.Address{
Country: user.Country,
Locality: user.Locality,
PostalCode: user.PostalCode,
Region: user.Region,
StreetAddress: user.StreetAddress,
},
}
}
func setUpOrgResponseFromModel(setUp *admin_model.SetupOrg) *OrgSetUpResponse {
return &OrgSetUpResponse{
Org: orgFromModel(setUp.Org),
User: userFromModel(setUp.User),
}
}
func orgsFromModel(orgs []*org_model.Org) []*Org {
result := make([]*Org, len(orgs))
for i, org := range orgs {
result[i] = orgFromModel(org)
}
return result
}
func orgFromModel(org *org_model.Org) *Org {
creationDate, err := ptypes.TimestampProto(org.CreationDate)
logging.Log("GRPC-GTHsZ").OnError(err).Debug("unable to get timestamp from time")
changeDate, err := ptypes.TimestampProto(org.ChangeDate)
logging.Log("GRPC-dVnoj").OnError(err).Debug("unable to get timestamp from time")
return &Org{
Domain: org.Domain,
ChangeDate: changeDate,
CreationDate: creationDate,
Id: org.AggregateID,
Name: org.Name,
State: orgStateFromModel(org.State),
}
}
func userFromModel(user *usr_model.User) *User {
creationDate, err := ptypes.TimestampProto(user.CreationDate)
logging.Log("GRPC-8duwe").OnError(err).Debug("unable to parse timestamp")
changeDate, err := ptypes.TimestampProto(user.ChangeDate)
logging.Log("GRPC-ckoe3d").OnError(err).Debug("unable to parse timestamp")
converted := &User{
Id: user.AggregateID,
State: userStateFromModel(user.State),
CreationDate: creationDate,
ChangeDate: changeDate,
Sequence: user.Sequence,
UserName: user.UserName,
FirstName: user.FirstName,
LastName: user.LastName,
DisplayName: user.DisplayName,
NickName: user.NickName,
PreferredLanguage: user.PreferredLanguage.String(),
Gender: genderFromModel(user.Gender),
}
if user.Email != nil {
converted.Email = user.EmailAddress
converted.IsEmailVerified = user.IsEmailVerified
}
if user.Phone != nil {
converted.Phone = user.PhoneNumber
converted.IsPhoneVerified = user.IsPhoneVerified
}
if user.Address != nil {
converted.Country = user.Country
converted.Locality = user.Locality
converted.PostalCode = user.PostalCode
converted.Region = user.Region
converted.StreetAddress = user.StreetAddress
}
return converted
}
func orgStateFromModel(state org_model.OrgState) OrgState {
switch state {
case org_model.ORGSTATE_ACTIVE:
return OrgState_ORGSTATE_ACTIVE
case org_model.ORGSTATE_INACTIVE:
return OrgState_ORGSTATE_INACTIVE
default:
return OrgState_ORGSTATE_UNSPECIFIED
}
}
func genderFromModel(gender usr_model.Gender) Gender {
switch gender {
case usr_model.GENDER_FEMALE:
return Gender_GENDER_FEMALE
case usr_model.GENDER_MALE:
return Gender_GENDER_MALE
case usr_model.GENDER_DIVERSE:
return Gender_GENDER_DIVERSE
default:
return Gender_GENDER_UNSPECIFIED
}
}
func genderToModel(gender Gender) usr_model.Gender {
switch gender {
case Gender_GENDER_FEMALE:
return usr_model.GENDER_FEMALE
case Gender_GENDER_MALE:
return usr_model.GENDER_MALE
case Gender_GENDER_DIVERSE:
return usr_model.GENDER_DIVERSE
default:
return usr_model.GENDER_UNDEFINED
}
}
func userStateFromModel(state usr_model.UserState) UserState {
switch state {
case usr_model.USERSTATE_ACTIVE:
return UserState_USERSTATE_ACTIVE
case usr_model.USERSTATE_INACTIVE:
return UserState_USERSTATE_INACTIVE
case usr_model.USERSTATE_LOCKED:
return UserState_USERSTATE_LOCKED
default:
return UserState_USERSTATE_UNSPECIFIED
}
}

View File

@@ -2,17 +2,18 @@ package grpc
import (
"context"
"github.com/caos/zitadel/internal/errors"
"github.com/golang/protobuf/ptypes/empty"
pb_struct "github.com/golang/protobuf/ptypes/struct"
)
func (s *Server) Healthz(_ context.Context, e *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-ruc8e", "Not implemented")
return &empty.Empty{}, nil
}
func (s *Server) Ready(ctx context.Context, e *empty.Empty) (*empty.Empty, error) {
return nil, errors.ThrowUnimplemented(nil, "GRPC-bw3vR", "Not implemented")
return &empty.Empty{}, s.repo.Health(ctx)
}
func (s *Server) Validate(ctx context.Context, _ *empty.Empty) (*pb_struct.Struct, error) {

View File

@@ -1,28 +1,32 @@
package grpc
import (
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"google.golang.org/grpc"
admin_auth "github.com/caos/zitadel/internal/admin/auth"
"github.com/caos/zitadel/internal/admin/repository"
"github.com/caos/zitadel/internal/api/auth"
grpc_util "github.com/caos/zitadel/internal/api/grpc"
"github.com/caos/zitadel/internal/api/grpc/server/middleware"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"google.golang.org/grpc"
)
var _ AdminServiceServer = (*Server)(nil)
type Config struct {
Port string
SearchLimit int
}
type Server struct {
port string
searchLimit int
port string
org repository.OrgRepository
verifier auth.TokenVerifier
authZ auth.Config
repo repository.Repository
}
func StartServer(conf grpc_util.ServerConfig) *Server {
func StartServer(conf grpc_util.ServerConfig, authZ auth.Config, repo repository.Repository) *Server {
return &Server{
port: conf.Port,
port: conf.Port,
org: repo,
repo: repo,
authZ: authZ,
verifier: admin_auth.Start(),
}
}
@@ -36,6 +40,7 @@ func (s *Server) GRPCServer() (*grpc.Server, error) {
grpc.UnaryInterceptor(
grpc_middleware.ChainUnaryServer(
middleware.ErrorHandler(),
AdminService_Authorization_Interceptor(s.verifier, &s.authZ),
),
),
)

View File

@@ -164,7 +164,7 @@ enum OrgSearchMethod {
message OrgSetUpRequest {
CreateOrgRequest org = 1;
RegisterUserRequest user = 2;
CreateUserRequest user = 2;
}
message OrgSetUpResponse {
@@ -172,16 +172,24 @@ message OrgSetUpResponse {
User user = 2;
}
message RegisterUserRequest {
string email = 1 [(validate.rules).string.email = true];
string first_name = 2 [(validate.rules).string.min_len = 1];
string last_name = 3 [(validate.rules).string.min_len = 1];
string nick_name = 4;
string display_name = 5;
string preferred_language = 6;
message CreateUserRequest {
string user_name = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
string first_name = 2 [(validate.rules).string = {min_len: 1, max_len: 200}];
string last_name = 3 [(validate.rules).string = {min_len: 1, max_len: 200}];
string nick_name = 4 [(validate.rules).string = {max_len: 200}];
string display_name = 5 [(validate.rules).string = {max_len: 200}];
string preferred_language = 6 [(validate.rules).string = {max_len: 200}];
Gender gender = 7;
string password = 8 [(validate.rules).string.min_len = 1];
string org_id = 9 [(validate.rules).string.min_len = 1];
string email = 8 [(validate.rules).string = {min_len: 1, max_len: 200, email: true}];
bool is_email_verified = 9;
string phone = 11 [(validate.rules).string = {max_len: 20}];
bool is_phone_verified = 12;
string country = 13 [(validate.rules).string = {max_len: 200}];
string locality = 14 [(validate.rules).string = {max_len: 200}];
string postal_code = 15 [(validate.rules).string = {max_len: 200}];
string region = 16 [(validate.rules).string = {max_len: 200}];
string street_address = 17 [(validate.rules).string = {max_len: 200}];
string password = 18 [(validate.rules).string = {max_len: 72}];
}
message User {
@@ -205,6 +213,7 @@ message User {
string postal_code = 18;
string region = 19;
string street_address = 20;
uint64 sequence = 21;
}
enum UserState {