Commit Graph
100 Commits
Author SHA1 Message Date
SilvanandGitHub d0cda1b479 fix(migration): speed up step 11 (#6086) 2023-06-27 11:56:17 +02:00
SilvanandGitHub 6be41ea257 fix(setup): steps 10 and 11 (#5987)
* fix(step10): count amount of wrong_events manually

* fix(step11): create index for better performance
2023-06-07 16:30:19 +00:00
SilvanandGitHub ebca7b6e3d fix(setup): update chunks in step 11 (#5965) 2023-06-02 09:31:18 +00:00
SilvanandGitHub 098c27d3da fix: render authrequest id only if possible (#5823) 2023-05-11 16:02:34 +00:00
adlerhurst 4d7a733e11 fix(step11): execute step 10 to make sure events are in correct order 2023-05-11 11:53:52 +02:00
SilvanandGitHub defa429eb7 Merge branch 'main' into eventstore-created-at 2023-05-11 11:24:23 +02:00
adlerhurst b9a3fac3d2 fix(eventstore): backfill column 2023-05-11 11:14:42 +02:00
adlerhurst 5a3d09d3a3 fix(eventstore): use creation_date for existing columns 2023-05-11 10:31:33 +02:00
adlerhurst c6d29fc201 fix(eventstore): new column to test clock_timestamp() 2023-05-11 10:04:35 +02:00
SilvanandGitHub 40bf7e49cc fix: correct tracing in access interceptor (#5766) 2023-05-02 08:46:44 +00:00
39bdef35e7 chore: merge (#5773)
* feat: allow skip of success page for native apps (#5627)

add possibility to return to callback directly after login without rendering the successful login page

* build next

* fix(console): disallow inline fonts, critical styles (#5714)

fix: disallow inline

* fix(setup): step 10 for postgres (#5717)

* fix(setup): smaller transactions (#5743)

* fix: order by sequence by default

* test: add allowCreationDateFilter

* fix(step10): separate executions (#5754)

* feat: allow skip of success page for native apps (#5627)

add possibility to return to callback directly after login without rendering the successful login page

* build next

* fix(console): disallow inline fonts, critical styles (#5714)

fix: disallow inline

* fix(setup): step 10 for postgres (#5717)

* fix(setup): smaller transactions (#5743)

* fix(step10): split statements

* fix(step10): split into separate execs

* chore: prerelease

* add truncate before insert

* fix: add truncate

* Merge branch 'main' into optimise-step-10

* chore: reset release definition

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Max Peintner <[email protected]>

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
2023-04-28 14:56:51 +00:00
SilvanandGitHub c8c5cf3c5f feat(cli): add setup cleanup sub command (#5770)
* feat(cli): add `setup cleanup` sub command

* chore: logging

* chore: logging
2023-04-28 11:55:35 +00:00
86f4477ae1 fix(step10): separate executions (#5754)
* feat: allow skip of success page for native apps (#5627)

add possibility to return to callback directly after login without rendering the successful login page

* build next

* fix(console): disallow inline fonts, critical styles (#5714)

fix: disallow inline

* fix(setup): step 10 for postgres (#5717)

* fix(setup): smaller transactions (#5743)

* fix(step10): split statements

* fix(step10): split into separate execs

* chore: prerelease

* add truncate before insert

* fix: add truncate

* Merge branch 'main' into optimise-step-10

* chore: reset release definition

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
2023-04-27 08:28:26 +00:00
SilvanandGitHub 13f6b4686a fix(setup): smaller transactions (#5742) 2023-04-25 08:12:53 +00:00
095ec21678 feat: user v2alpha email API (#5708)
* chore(proto): update versions

* change protoc plugin

* some cleanups

* define api for setting emails in new api

* implement user.SetEmail

* move SetEmail buisiness logic into command

* resuse newCryptoCode

* command: add ChangeEmail unit tests

Not complete, was not able to mock the generator.

* Revert "resuse newCryptoCode"

This reverts commit c89e90ae35ae924a3f706a0a7394f933910c2e65.

* undo change to crypto code generators

* command: use a generator so we can test properly

* command: reorganise ChangeEmail

improve test coverage

* implement VerifyEmail

including unit tests

* add URL template tests

* proto: change context to object

* remove old auth option

* remove old auth option

* fix linting errors

run gci on modified files

* add permission checks and fix some errors

* comments

* comments

---------

Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Tim Möhlmann <[email protected]>
2023-04-25 09:02:29 +02:00
SilvanandGitHub 5d6399da24 fix(projection): implement GoStringer for postgres (#5716) 2023-04-21 06:58:04 +00:00
SilvanandGitHub e083092605 docs(azure): update tenant id (#5720) 2023-04-20 10:55:19 +02:00
SilvanandGitHub 41025271f4 fix(setup): step 10 for postgres (#5717) 2023-04-20 07:31:18 +02:00
SilvanandGitHub 3cd2cecfdf chore: releaserc 2023-04-19 10:01:27 +02:00
SilvanandGitHub 85054e8d2b chore: next as pre release 2023-04-19 09:41:33 +02:00
SilvanandGitHub 8da8fbe6ce fix(eventstore): correct creation date of events (#5683)
* fix: add setup step to correct creation dates

* fix(eventstore): replace now with statement ts

* fix(step10): correct number

* fix: handle wrong instance domain removed events
2023-04-18 19:29:04 +02:00
SilvanandGitHub ed2588f13d fix(idp): handle scopes in azureAD (#5665) 2023-04-12 07:27:07 +02:00
SilvanandGitHub c216d6effd fix(mfa): correct change url (#5663) 2023-04-11 19:27:18 +02:00
SilvanandGitHub 698f46fe6a chore: update dependencies (#5401)
* chore(backend): update dependencies

* chore(pipeline): update golangci-lint
2023-04-06 06:29:55 +00:00
SilvanandGitHub 5c8748d769 chore: change action timeout (#5604) 2023-04-05 16:27:48 +02:00
SilvanandGitHub 8b5217c06d fix(query): only active by org by primary domain (#5610) 2023-04-05 12:06:26 +00:00
SilvanandGitHub d981f0d348 fix(saml): correct handling of remove (#5606) 2023-04-05 11:42:00 +00:00
4c1169b562 feat(eventstore): order by creation_date and sequence (#5568)
* feat(eventstore): order by `creation_date` and `sequence`

* fix(logstore): use correct event type

---------

Co-authored-by: Livio Spring <[email protected]>
2023-04-05 09:34:24 +00:00
SilvanandGitHub d515e1a004 docs(actions): correct tokens in post authentication (#5600)
* docs(actions): correct tokens in post authentication

* docs(actions): correct context fields in complement token
2023-04-03 15:32:40 +00:00
SilvanandGitHub dd84b93ac3 fix(token): filter users by instance id (#5596)
* fix(token): filter users by instance id
2023-04-03 12:56:37 +00:00
SilvanandGitHub e688954308 feat: role claims for service user tokens (#5577)
tokens of service users can now contain role claims by requesting them through scopes
2023-04-03 14:26:51 +02:00
a3b36a0138 refactor(changes): use queries.SearchEvents (#5388)
* refactor(changes): use `queries.SearchEvents`

---------

Co-authored-by: Livio Spring <[email protected]>
2023-03-17 09:14:06 +00:00
9ff810eb92 fix(roles): remove org.create permission from org owner (#5444)
Co-authored-by: Livio Spring <[email protected]>
2023-03-14 16:48:39 +00:00
SilvanandGitHub eb4f7c5d7c fix(auth): update user grants before check (#5406) 2023-03-13 08:03:49 +01:00
SilvanandGitHub c8f206c438 fix(setup): check if indexes exist in step 9 (#5400)
* fix(setup): check if indexes exist in step 9

* fix(setup09): ignore the inverted index
2023-03-08 15:19:12 +00:00
SilvanandGitHub 20e4f1ce57 feat(actions): add fields to complement token flow (#5336)
* deprecated `ctx.v1.userinfo`-field in "pre userinfo creation" trigger in favour of `ctx.v1.claims`. The trigger now behaves the same as "pre access token creation"
* added `ctx.v1.claims` to "complement tokens" flow
* added `ctx.v1.grants` to "complement tokens" flow
* document `ctx.v1.getUser()` in "complement tokens" flow

* feat(actions): add getUser() and grant

* map user grants

* map claims

* feat(actions): claims in complement token ctx

* docs(actions): add new fields of complement token

* docs(actions): additions to complement token

* docs(actions): correct field names
2023-03-08 15:26:28 +01:00
SilvanandGitHub c8142030e9 fix(postgres): set dbname=postgres in admin mode (#5346) 2023-03-03 09:26:50 +00:00
SilvanandGitHub ed4983d3fd fix: emit only if data and marshal invalid metadata
* fix(emitter): only emit if there are log records

* fix(actions): marshal invalid metadata value into string
2023-03-01 17:05:12 +00:00
SilvanandGitHub 3dbb6f7c67 fix(setup): optimise events indexes (#5316) 2023-03-01 00:11:23 +00:00
SilvanandGitHub e38abdcdf3 perf: query data AS OF SYSTEM TIME (#5231)
Queries the data in the storage layser at the timestamp when the call hit the API layer
2023-02-27 22:36:43 +01:00
SilvanandGitHub 94116fa04b fix(storage): add indexes for auth.tokens (#5259)
* fix(storage): add indexes for `auth.tokens`

* refactor: naming
2023-02-21 14:46:47 +00:00
SilvanandGitHub 5cf27d7959 fix(defaults): tracing fraction as float (#5194)
Changes the type of the default tracing fraction to float so that it can get changed to less than every trace in the configuration
2023-02-17 14:32:52 +00:00
SilvanandGitHub c54ddc71a2 feat(actions): local users (#5089)
Actions are extended to to local users. It's possible to run custom code during registration and authentication of local users.
2023-01-25 13:08:01 +00:00
SilvanandGitHub 7b5135e637 fix(adminAPI): localize event type (#5059)
* fix(adminAPI): localisation of event types, aggregate types
* fix(adminAPI): validations of ListEvent request
* implement caching of editor user information
2023-01-19 15:50:05 +00:00
SilvanandGitHub 71bd19d690 fix: login name case insensitive (#5032)
checks for login names case insensitive during login
2023-01-16 13:07:31 +00:00
SilvanandGitHub 1bf1f335dc feat(admin-api): list events (#4989)
* docs: update cockroachdb version to 22.2
* feat(adminAPI): ListEventTypes returns the list of event types ZITADEL implements
* feat(adminAPI): ListAggregateTypes returns the list of aggregate types ZITADEL implements
* feat(adminAPI): ListEvents allows `IAM_OWNERS` to search for events
2023-01-16 11:30:03 +00:00
SilvanandGitHub 74c1c39207 fix: org unique check (#5033)
- all verified of domains are checked
- domains are checked case insensitive
- name is checked case insensitive
2023-01-16 09:55:19 +00:00
SilvanandGitHub 5c8cfa4167 docs(self-hosting): add env vars for proxy configuration (#4916) 2022-12-22 13:42:44 +01:00
SilvanandGitHub 188ff2be53 docs(scopes): improve description of org:id scope (#4911) 2022-12-21 11:33:31 +01:00
SilvanandGitHub fabecca4e4 fix(database): add MaxIdleConns configuration (#4856) 2022-12-08 15:22:39 +00:00
SilvanandGitHub e7137dba60 fix(projection): new version of oidc_settings (#4811)
There was a field delete some commits back but the projection version was not updated, that's why we update now
2022-12-02 12:54:28 +00:00
SilvanandGitHub 384cc34303 chore: cockroach version (#4775)
* chore: cockroach version for tests
2022-12-02 09:42:27 +00:00
SilvanandGitHub 62b7352a29 fix(setup): create indexes only if not exists (#4801) 2022-12-01 14:31:01 +01:00
SilvanandGitHub 28760ab4b3 fix(query): add tracing for each method (#4777)
* fix(query): add tracing for each method
2022-12-01 09:18:53 +01:00
f3e6f3b23b feat: remove org (#4148)
* feat(command): remove org

* refactor: imports, unused code, error handling

* reduce org removed in action

* add org deletion to projections

* add org removal to projections

* add org removal to projections

* org removed projection

* lint import

* projections

* fix: table names in tests

* fix: table names in tests

* logging

* add org state

* fix(domain): add Owner removed to object details

* feat(ListQuery): add with owner removed

* fix(org-delete): add bool to functions to select with owner removed

* fix(org-delete): add bools to user grants with events to determine if dependencies lost owner

* fix(org-delete): add unit tests for owner removed and org removed events

* fix(org-delete): add handling of org remove for grants and members

* fix(org-delete): correction of unit tests for owner removed

* fix(org-delete): update projections, unit tests and get functions

* fix(org-delete): add change date to authnkeys and owner removed to org metadata

* fix(org-delete): include owner removed for login names

* fix(org-delete): some column fixes in projections and build for queries with owner removed

* indexes

* fix(org-delete): include review changes

* fix(org-delete): change user projection name after merge

* fix(org-delete): include review changes for project grant where no project owner is necessary

* fix(org-delete): include auth and adminapi tables with owner removed information

* fix(org-delete): cleanup username and orgdomain uniqueconstraints when org is removed

* fix(org-delete): add permissions for org.remove

* remove unnecessary unique constraints

* fix column order in primary keys

* fix(org-delete): include review changes

* fix(org-delete): add owner removed indexes and chang setup step to create tables

* fix(org-delete): move PK order of instance_id and change added user_grant from review

* fix(org-delete): no params for prepareUserQuery

* change to step 6

* merge main

* fix(org-delete): OldUserName rename to private

* fix linting

* cleanup

* fix: remove org test

* create prerelease

* chore: delete org-delete as prerelease

Co-authored-by: Stefan Benz <[email protected]>
Co-authored-by: Livio Spring <[email protected]>
Co-authored-by: Fabi <[email protected]>
Co-authored-by: Stefan Benz <[email protected]>
2022-11-30 17:01:17 +01:00
5a1f4c387c docs(action): specify docs (#4709)
* docs: add actions section

* docs(actions): add modules

* docs: actions

* docs(actions): start with register flows

* add calls

* docs: all actions documented

* docs(actions): unify

* docs(actions): unify texts

* docs: apply suggestions from code review

Co-authored-by: mffap <[email protected]>

* docs(actions): clarifications

* docs: return values italic

* docs: fix broken links

* docs: fix broken links

* docs: fix broken links

* docs: fix broken links

* Update docs/docs/apis/actions/introduction.md

Co-authored-by: mffap <[email protected]>

* docs(actions): link actions examples

* docs: remove unused section

Co-authored-by: mffap <[email protected]>
Co-authored-by: Florian Forster <[email protected]>
2022-11-28 09:20:33 +01:00
SilvanandGitHub dbb18342a1 chore(linting): add golang-ci lint config (#3899)
* chore(linting): add golang-ci lint config

* more linters

* document more linters

* describe more linters

* describe more linters

* add descriptions

* add descriptions

* config is now valid

* try in action

* add runs on

* dont change out format

* make a change

* make a change

* add timeout

* maybe this way?

* oupsi

* only new issues

* chore: linter settings

* chore: concurRency

* docs(contrib): add linter

* chore: rename github job

* chore: rename github job

* chore(linter): use latest

* chore(linter): version

* chore(action): add working directory

* chore(linting): remove generated files

* build cache

* docs(contrib): recommend golangci-lint as linter in IDE
2022-11-16 11:43:24 +01:00
SilvanandGitHub 7c6ed19ab3 feat(cmd): add version flag (#4678) 2022-11-10 11:24:00 +00:00
43fb3fd1a6 feat(actions): add token customization flow and extend functionally with modules (#4337)
* fix: potential memory leak

* feat(actions): possibility to parse json
feat(actions): possibility to perform http calls

* add query call

* feat(api): list flow and trigger types
fix(api): switch flow and trigger types to dynamic objects

* fix(translations): add action translations

* use `domain.FlowType`

* localizers

* localization

* trigger types

* options on `query.Action`

* add functions for actions

* feat: management api: add list flow and trigger  (#4352)

* console changes

* cleanup

* fix: wrong localization

Co-authored-by: Max Peintner <[email protected]>

* id token works

* check if claims not nil

* feat(actions): metadata api

* refactor(actions): modules

* fix: allow prerelease

* fix: test

* feat(actions): deny list for http hosts

* feat(actions): deny list for http hosts

* refactor: actions

* fix: different error ids

* fix: rename statusCode to status

* Actions objects as options (#4418)

* fix: rename statusCode to status

* fix(actions): objects as options

* fix(actions): objects as options

* fix(actions): set fields

* add http client to old actions

* fix(actions): add log module

* fix(actions): add user to context where possible

* fix(actions): add user to ctx in external authorization/pre creation

* fix(actions): query correct flow in claims

* test: actions

* fix(id-generator): panic if no machine id

* tests

* maybe this?

* fix linting

* refactor: improve code

* fix: metadata and usergrant usage in actions

* fix: appendUserGrant

* fix: allowedToFail and timeout in action execution

* fix: allowed to fail in token complement flow

* docs: add action log claim

* Update defaults.yaml

* fix log claim

* remove prerelease build

Co-authored-by: Max Peintner <[email protected]>
Co-authored-by: Livio Spring <[email protected]>
2022-10-06 14:23:59 +02:00
SilvanandGitHub a7646d5a78 fix(translations): language options and init user (#4449)
fix(translations): add chinese to language options
fix(translations): correct key for password confirm label
2022-09-23 17:24:06 +02:00
SilvanandGitHub 2bc19f55b5 fix(projections): unique index names (#4439) 2022-09-22 15:18:52 +02:00
84b20bc4e1 fix(auth): always get token by id and user id (#4371)
Co-authored-by: Florian Forster <[email protected]>
2022-09-15 12:59:40 +00:00
SilvanandGitHub f71d158fb0 fix(cli): no more panics during startup (#4333)
* fix(cli): configure id generator

* fix(cli): use correct viper environment
2022-09-07 08:35:12 +00:00
8a5c3b0fa1 fix: postgreSQL version spec (#4301)
* fix(cli): log error in `init zitadel`

* docs: specify postgres version

Co-authored-by: Livio Spring <[email protected]>
2022-09-05 09:24:31 +00:00
2f647ce9a2 fix: initial failures (#4291)
* fix(cmd): read configuration correctly

* fix(database): read weakly typed config

* fix(database): correct handling of update columns

Co-authored-by: Livio Spring <[email protected]>
2022-09-01 07:24:26 +00:00
b9795b5c57 fix(amr): add pwd because password is wrong (#4284)
* fix(amr): add pwd because password is wrong

* docs: deprecation notice

* docs: nicer wording

* Update docs/docs/apis/openidoauth/claims.md

Co-authored-by: Livio Spring <[email protected]>

Co-authored-by: Livio Spring <[email protected]>
2022-08-31 08:16:31 +00:00
77b4fc5487 feat(database): support for postgres (#3998)
* beginning with postgres statements

* try pgx

* use pgx

* database

* init works for postgres

* arrays working

* init for cockroach

* init

* start tests

* tests

* TESTS

* ch

* ch

* chore: use go 1.18

* read stmts

* fix typo

* tests

* connection string

* add missing error handler

* cleanup

* start all apis

* go mod tidy

* old update

* switch back to minute

* on conflict

* replace string slice with `database.StringArray` in db models

* fix tests and start

* update go version in dockerfile

* setup go

* clean up

* remove notification migration

* update

* docs: add deploy guide for postgres

* fix: revert sonyflake

* use `database.StringArray` for daos

* use `database.StringArray` every where

* new tables

* index naming,
metadata primary key,
project grant role key type

* docs(postgres): change to beta

* chore: correct compose

* fix(defaults): add empty postgres config

* refactor: remove unused code

* docs: add postgres to self hosted

* fix broken link

* so?

* change title

* add mdx to link

* fix stmt

* update goreleaser in test-code

* docs: improve postgres example

* update more projections

* fix: add beta log for postgres

* revert index name change

* prerelease

* fix: add sequence to v1 "reduce paniced"

* log if nil

* add logging

* fix: log output

* fix(import): check if org exists and user

* refactor: imports

* fix(user): ignore malformed events

* refactor: method naming

* fix: test

* refactor: correct errors.Is call

* ci: don't build dev binaries on main

* fix(go releaser): update version to 1.11.0

* fix(user): projection should not break

* fix(user): handle error properly

* docs: correct config example

* Update .releaserc.js

* Update .releaserc.js

Co-authored-by: Livio Amstutz <[email protected]>
Co-authored-by: Elio Bischof <[email protected]>
2022-08-31 07:52:43 +00:00
SilvanandGitHub 60b2092d2c fix(import): check exists (#4268)
* fix(import): check if org exists and user

* refactor: imports

* fix(user): ignore malformed events

* refactor: method naming

* fix: test

* refactor: correct errors.Is call
2022-08-29 17:09:07 +02:00
0b742233f9 fix: clarify instances in steps and config (#4003)
* fix: clarify instances in steps and config

* docs: update setup step

Co-authored-by: Fabi <[email protected]>
Co-authored-by: Livio Amstutz <[email protected]>
2022-07-27 10:22:20 +02:00
2707461ea6 fix(login): trigger bulk on reset password (#3970)
Co-authored-by: Livio Spring <[email protected]>
2022-07-19 09:07:37 +02:00
SilvanandGitHub d7988563e5 fix: update login names on user trigger bulk (#3934) 2022-07-08 11:04:29 +00:00
9271623ec9 fix: load auth users (#3907)
* fix: load auth users

* fix: add triggerbulk

* fix: build pre-release

* fix even more french translations

* fix: build version

Co-authored-by: Livio Spring <[email protected]>
2022-07-07 14:58:00 +02:00
SilvanandGitHub 3bea2bcffb chore: set tleMode disabled in docker compose (#3865) 2022-06-24 18:38:13 +02:00
SilvanandGitHub c244dcaffd fix(notify): correct get user (#3836) 2022-06-16 13:49:45 +00:00
SilvanandGitHub e1cfc242ab fix(auth): read user if not found after create (#3835) 2022-06-16 13:06:17 +00:00
SilvanandGitHub d1bc4a9bc5 fix(notify): fail if required fields are empty (#3831) 2022-06-15 16:22:48 +00:00
SilvanandGitHub 72b696ccb2 fix(system): search for existing domain globally (#3822) 2022-06-14 15:45:19 +02:00
dd2f31683c fix(query): realtime data on defined requests (#3726)
* feat: directly specify factors on addCustomLoginPolicy and return on LoginPolicy responses

* fix proto

* update login policy

* feat: directly specify idp on addCustomLoginPolicy and return on LoginPolicy responses

* fix: tests

* fix(projection): trigger bulk

* refactor: clean projection pkg

* instance should bulk

* fix(query): should trigger bulk on id calls

* tests

* build prerelease

* fix: add shouldTriggerBulk

* fix: test

Co-authored-by: Livio Amstutz <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
2022-06-14 07:51:00 +02:00
SilvanandGitHub fb93085430 fix(projection): add missing col to idp login policy links (#3745)
* fix(projection): add missing col to projection

* refactor: method naming
2022-05-31 20:39:37 +02:00
SilvanandGitHub ed36680ea1 fix(query): show views and failed events (#3743)
* fix(system): show views and failed events

* fix: set correct database on failed events and views
2022-05-31 16:33:50 +02:00
SilvanandGitHub 16c86149be fix(current_sequence): no error if not found (#3740) 2022-05-31 11:50:51 +00:00
SilvanandGitHub 3513148cf6 fix: SMTP config in defaults (#3736)
* fix(command): create smtp provider cmds after domains

* chore(defaults): add smtp configuration
2022-05-30 17:39:18 +02:00
SilvanandGitHub ecbb140c79 Update README.md (#3684) 2022-05-20 18:11:59 +00:00
SilvanandGitHub a95b1ab3d0 fix(storage): resolve deadlock occuring durring projection (#3671) 2022-05-19 11:44:16 +00:00
SilvanandGitHub a9f71ba08e fix(command): reset phone on phone write model to empty if removed (#3543) 2022-05-02 11:06:30 +02:00
SilvanandGitHub 8e7f73c6a6 fix(cli): error if no sub command set on zitadel admin (#3565) 2022-05-02 10:55:50 +02:00
388ef6b93b fix(cli): overwrite setups (#3488)
* fix(cli): possibility to overwrite setup steps

* chore: update cockroach version in go-dep

* fix(cli): init masterkey flags once

Co-authored-by: Livio Amstutz <[email protected]>
2022-04-25 15:05:20 +00:00
SilvanandGitHub db554536a1 fix: v2 setup sequence (#3437)
* add/register human command done

* validations

* crypto

* move clientid

* keys

* fix: clientID

* remove v2 package

* tests

* tests running

* fix: add init instance to eventstore

* fix: mig

* test(eventstore): create instance

* revert old code

* instance domain from ctx

* chore: rename zitadel app ids

* comments

* fix: test

* fix: mock

* fix: test
2022-04-13 05:42:48 +00:00
SilvanandGitHub cea2567e22 fix: v2 human command (#3435)
* add/register human command done

* validations

* crypto

* move clientid

* keys

* fix: clientID

* remove v2 package

* tests

* tests running

* revert old code

* instance domain from ctx

* chore: rename zitadel app ids

* comments

* fix: test
2022-04-12 16:20:17 +02:00
c5b99274d7 feat(cli): setup (#3267)
* commander

* commander

* selber!

* move to packages

* fix(errors): implement Is interface

* test: command

* test: commands

* add init steps

* setup tenant

* add default step yaml

* possibility to set password

* merge v2 into v2-commander

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: search query builder can filter events in memory

* fix: filters for add member

* fix(setup): add `ExternalSecure` to config

* chore: name iam to instance

* fix: matching

* remove unsued func

* base url

* base url

* test(command): filter funcs

* test: commands

* fix: rename orgiampolicy to domain policy

* start from init

* commands

* config

* fix indexes and add constraints

* fixes

* fix: merge conflicts

* fix: protos

* fix: md files

* setup

* add deprecated org iam policy again

* typo

* fix search query

* fix filter

* Apply suggestions from code review

* remove custom org from org setup

* add todos for verification

* change apps creation

* simplify package structure

* fix error

* move preparation helper for tests

* fix unique constraints

* fix config mapping in setup

* fix error handling in encryption_keys.go

* fix projection config

* fix query from old views to projection

* fix setup of mgmt api

* set iam project and fix instance projection

* imports

Co-authored-by: Livio Amstutz <[email protected]>
Co-authored-by: fabi <[email protected]>
2022-03-28 10:05:09 +02:00
4272ea6fe1 fix: init sub commands (#3218)
* fix(init): add sub commands

* fix(init): admin user in config,
test(init): verify functions

* refactor: config, remove second commands

* refactor: init steps

* chore: fix link in readme

* chore: numerate sql files

* Update cmd/admin/initialise/sql/README.md

Co-authored-by: Livio Amstutz <[email protected]>

* Update cmd/admin/initialise/sql/README.md

Co-authored-by: Livio Amstutz <[email protected]>

* fix(init): remove unused index

* user

* fix database username in defaults.yaml

Co-authored-by: Livio Amstutz <[email protected]>
2022-02-16 12:30:49 +00:00
SilvanandGitHub c086c4fd55 fix(init): add sub commands (#3194) 2022-02-11 14:07:32 +01:00
SilvanandGitHub b44b48fa1e fix(init): flags (#3192) 2022-02-11 11:52:50 +01:00
SilvanandGitHub e8ab237ada fix(init): prepare database (#3191)
* fix(init): prepare database

* fix(defaults): cockroach local defaults
2022-02-11 11:02:47 +01:00
9d471d0d30 feat(cli): init cli (#3186)
* feat(cli): initilize cli

* fix(config): allow multiple files

* refactor(cli): constructor naming

* go mod tidy

* refactor: move code out of v2 package

* chore: logging v0.1

* chore: remove old gitignore

* fix func

Co-authored-by: Livio Amstutz <[email protected]>
2022-02-09 15:01:19 +01:00
SilvanandGitHub 77de5bf97a fix(database): update to version 21.2.4 (#3106) 2022-01-25 11:34:28 +01:00
c542cab4f8 feat(queries): user grants (#2838)
* refactor(domain): add user type

* fix(projections): start with login names

* fix(login_policy): correct handling of user domain claimed event

* fix(projections): add members

* refactor: simplify member projections

* add migration for members

* add metadata to member projections

* refactor: login name projection

* fix: set correct suffixes on login name projections

* test(projections): login name reduces

* fix: correct cols in reduce member

* test(projections): org, iam, project members

* member additional cols and conds as opt,
add project grant members

* fix(migration): members

* fix(migration): correct database name

* migration version

* migs

* better naming for member cond and col

* split project and project grant members

* prepare member columns

* feat(queries): membership query

* test(queries): membership prepare

* fix(queries): multiple projections for latest sequence

* fix(api): use query for membership queries in auth and management

* feat: org member queries

* fix(api): use query for iam member calls

* fix(queries): org members

* fix(queries): project members

* fix(queries): project grant members

* fix(query): member queries and user avatar column

* member cols

* fix(queries): membership stmt

* fix user test

* fix user test

* fix(projections): add user grant projection

* fix(user_grant): handle state changes

* add state to migration

* fix(management): use query for user grant requests

* merge eventstore-naming into user-grant-projection

* feat(queries): user grants

* fix(migrations): version

* fix(api): user query for user grants

* fix(query): event mappers for usergrant aggregate

* fix(projection): correct aggregate for user grants

* fix(queries): user grant roles as list contains

* cleanup reducers

* fix avater_key to avatar_key

* tests

* cleanup

* cleanup

* add resourceowner query

* fix: user grant project name search query

Co-authored-by: Livio Amstutz <[email protected]>
Co-authored-by: fabi <[email protected]>
2022-01-14 09:45:50 +00:00
a63a995269 fix(projections): add user grant projection (#2837)
* refactor(domain): add user type

* fix(projections): start with login names

* fix(login_policy): correct handling of user domain claimed event

* fix(projections): add members

* refactor: simplify member projections

* add migration for members

* add metadata to member projections

* refactor: login name projection

* fix: set correct suffixes on login name projections

* test(projections): login name reduces

* fix: correct cols in reduce member

* test(projections): org, iam, project members

* member additional cols and conds as opt,
add project grant members

* fix(migration): members

* fix(migration): correct database name

* migration version

* migs

* better naming for member cond and col

* split project and project grant members

* prepare member columns

* feat(queries): membership query

* test(queries): membership prepare

* fix(queries): multiple projections for latest sequence

* fix(api): use query for membership queries in auth and management

* feat: org member queries

* fix(api): use query for iam member calls

* fix(queries): org members

* fix(queries): project members

* fix(queries): project grant members

* fix(query): member queries and user avatar column

* member cols

* fix(queries): membership stmt

* fix user test

* fix user test

* fix(projections): add user grant projection

* fix(user_grant): handle state changes

* add state to migration

* merge eventstore-naming into user-grant-projection

* fix(migrations): version

* fix(query): event mappers for usergrant aggregate

* fix(projection): correct aggregate for user grants

* cleanup reducers

* add tests for projection

Co-authored-by: Livio Amstutz <[email protected]>
2022-01-13 11:02:39 +01:00
b8bec25129 fix: use query side for requests (#2818)
* refactor(domain): add user type

* fix(projections): start with login names

* fix(login_policy): correct handling of user domain claimed event

* fix(projections): add members

* refactor: simplify member projections

* add migration for members

* add metadata to member projections

* refactor: login name projection

* fix: set correct suffixes on login name projections

* test(projections): login name reduces

* fix: correct cols in reduce member

* test(projections): org, iam, project members

* member additional cols and conds as opt,
add project grant members

* fix(migration): members

* fix(migration): correct database name

* migration version

* migs

* better naming for member cond and col

* split project and project grant members

* prepare member columns

* feat(queries): membership query

* test(queries): membership prepare

* fix(queries): multiple projections for latest sequence

* fix(api): use query for membership queries in auth and management

* feat: org member queries

* fix(api): use query for iam member calls

* fix(queries): org members

* fix(queries): project members

* fix(queries): project grant members

* refactor: remove unsued methods in repo-interfaces

* start

* fix(query): membership

* fix(auth): list my project orgs

* fix(query): member queries and user avatar column

* refactor(auth): MyProjectOrgs

* fix(queries): member and membership stmts

* fix user test

* fix(management): use query for project (-grant) members

* fix(admin): use query for member calls

* fix(api): add domain to org mapping

* remove old idp

* membership

* refactor: remove old files

* idp

* refactor: use query for idps and idp user links

* refactor(eventstore): rename EventPusher to Command, EventReader to Event, PushEvents to Push and FilterEvents to Filter

* gloabl org check for org roles

Co-authored-by: Livio Amstutz <[email protected]>
2022-01-13 08:58:14 +01:00
SilvanandGitHub 5640a0ef33 refactor: remove unused code (#2798)
* refactor(domain): add user type

* fix(projections): start with login names

* fix(login_policy): correct handling of user domain claimed event

* fix(projections): add members

* refactor: simplify member projections

* add migration for members

* add metadata to member projections

* refactor: login name projection

* fix: set correct suffixes on login name projections

* test(projections): login name reduces

* fix: correct cols in reduce member

* test(projections): org, iam, project members

* member additional cols and conds as opt,
add project grant members

* fix(migration): members

* fix(migration): correct database name

* migration version

* migs

* better naming for member cond and col

* split project and project grant members

* prepare member columns

* feat(queries): membership query

* test(queries): membership prepare

* fix(queries): multiple projections for latest sequence

* fix(api): use query for membership queries in auth and management

* feat: org member queries

* fix(api): use query for iam member calls

* fix(queries): org members

* fix(queries): project members

* fix(queries): project grant members

* refactor: remove unsued methods in repo-interfaces

* refactor(eventstore): rename EventPusher to Command, EventReader to Event, PushEvents to Push and FilterEvents to Filter
2022-01-03 11:50:38 +01:00