Commit Graph
100 Commits
Author SHA1 Message Date
SilvanandGitHub 5811a7b6a5 refactor(v2): init eventstore package (#7806)
* refactor(v2): init database package

* refactor(v2): init eventstore package

* add mock package

* test query constructors

* option based push analog to query
2024-04-26 15:05:21 +00:00
SilvanandGitHub 5131328291 refactor(v2): init database package (#7802) 2024-04-25 06:45:34 +00:00
SilvanandGitHub 25030c69b9 perf: cache auth request in memory (#7824)
* perf: cache auth request in memory
2024-04-23 11:23:50 +00:00
SilvanandGitHub 13b566e0d9 fix(query): reduce app query overhead (#7817)
* fix(query): reduce app query overhead
2024-04-22 11:30:56 +02:00
SilvanandGitHub d337668599 chore: init load tests (#7635)
* init load tests

* add machine pat

* setup app

* add introspect

* use xk6-modules repo

* logging

* add teardown

* add manipulate user

* add manipulate user

* remove logs

* convert tests to ts

* add readme

* zitadel

* review comments
2024-04-18 12:21:07 +03:00
SilvanandGitHub 9bcfa12be2 fix(middleware): init translation messages (#7778)
* fix(middleware): init translation messages

* revert change

* refactor: split loop in separate function

* add imports to ensure init of fs
2024-04-16 12:08:18 +00:00
SilvanandGitHub 386addc718 chore: remove bloating span (#7780)
* fix(query): query event editors only once per call

* remove span
2024-04-16 11:19:17 +00:00
f412687427 fix(query): query event editors only once per call (#7776)
Co-authored-by: Livio Spring <[email protected]>
2024-04-16 10:42:31 +00:00
SilvanandGitHub bed0f6293b fix: check error before using token (#7664) 2024-03-28 12:19:03 +00:00
SilvanandGitHub 56df515e5f chore: use pgx v5 (#7577)
* chore: use pgx v5

* chore: update go version

* remove direct pq dependency

* remove unnecessary type

* scan test

* map scanner

* converter

* uint8 number array

* duration

* most unit tests work

* unit tests work

* chore: coverage

* go 1.21

* linting

* int64 gopfertammi

* retry go 1.22

* retry go 1.22

* revert to go v1.21.5

* update go toolchain to 1.21.8

* go 1.21.8

* remove test flag

* go 1.21.5

* linting

* update toolchain

* use correct array

* use correct array

* add byte array

* correct value

* correct error message

* go 1.21 compatible
2024-03-27 15:48:22 +02:00
SilvanandGitHub 5b301c7f96 chore: trigger update homebrew tap on latest release (#7618) 2024-03-22 13:38:18 +01:00
SilvanandGitHub c3cb010d2a chore(build): update dependencies (#7606) 2024-03-22 07:10:34 +00:00
SilvanandGitHub 6eb982e368 fix(api): correct mapping of metadata queries (#7609) 2024-03-21 14:56:58 +00:00
SilvanandGitHub b338171585 docs: move jwt idp to guides (#7570) 2024-03-20 10:46:05 +01:00
SilvanandGitHub cc26eb1116 feat(actions): ctx.org.getMetadata() in external authentication (#7571) 2024-03-19 07:34:38 +01:00
SilvanandGitHub 150f3bddf0 docs: add azure entra saml (#7566) 2024-03-15 10:07:30 +01:00
SilvanandGitHub 30a1f4b39e docs(actions): add examples (#7494)
* docs(actions): add use cases

* docs(actions): extend available modules

* docs(actions): add example to http module

* hide code in details

* add saml response,
correct code examples

* describe internal authentication flow

* rename to code examples
2024-03-13 17:49:36 +01:00
SilvanandGitHub 4224c7ad3a chore(core): update dependencies (#7517)
* chore(core): update dependencies

* chore(core): update dependencies
2024-03-11 10:43:56 +00:00
7b537243c4 docs: describe combinations of flow and trigger types (#7519)
* docs(api): describe which flow and trigger types word together

* docs(actions): describe which flow and trigger types work together

* Update management.proto

---------

Co-authored-by: Livio Spring <[email protected]>
2024-03-11 07:24:24 +00:00
SilvanandGitHub 60ee2610f2 fix(eventstore): consider IsGlobal-flag of constraints (#7518)
* fix(eventstore): consider `IsGlobal`-flag of constraints

* fix(setup): set `instance_domain`-constraint global
2024-03-08 13:33:53 +00:00
SilvanandGitHub ec3076c3c8 fix(ListEvents): add aggregate types to filter if not set (#7490) 2024-03-05 15:44:51 +00:00
SilvanandGitHub 8f898775c9 docs: remove localhost from links (#7503) 2024-03-05 09:46:42 +00:00
SilvanandGitHub b0e3d3d912 docs(actions): add possibilities to examples text (#7418) 2024-02-29 13:41:35 +01:00
1791f46424 docs: change examples to psql (#7358)
Replaces CockroachDB as default in self hosting examples. 

* Update docs/docs/concepts/architecture/software.md

Co-authored-by: Elio Bischof <[email protected]>

* Update docs/docs/concepts/architecture/software.md

Co-authored-by: Elio Bischof <[email protected]>

---------

Co-authored-by: Elio Bischof <[email protected]>
2024-02-20 08:33:50 +00:00
aa407c3c3e fix(auth): optimise user sessions (#7199)
* fix(auth): start optimise user sessions

* reduce and query user sessions directly without gorm statements

* cleanup

* cleanup

* fix requested changes

---------

Co-authored-by: Livio Spring <[email protected]>
2024-01-30 15:17:54 +00:00
SilvanandGitHub 93f35980b8 docs(a10008): add versions 2.43.6 and 2.42.12 (#7299) 2024-01-26 14:52:34 +01:00
SilvanandGitHub 17953e9040 fix(setup): init projections (#7194)
Even though this is a feature it's released as fix so that we can back port to earlier revisions.

As reported by multiple users startup of ZITADEL after leaded to downtime and worst case rollbacks to the previously deployed version.

The problem starts rising when there are too many events to process after the start of ZITADEL. The root cause are changes on projections (database tables) which must be recomputed. This PR solves this problem by adding a new step to the setup phase which prefills the projections. The step can be enabled by adding the `--init-projections`-flag to `setup`, `start-from-init` and `start-from-setup`. Setting this flag results in potentially longer duration of the setup phase but reduces the risk of the problems mentioned in the paragraph above.
2024-01-25 17:28:20 +01:00
SilvanandGitHub 3c5fc31372 fix(handler): handle trigger err correctly (#7205) 2024-01-11 17:55:50 +00:00
SilvanandGitHub 43f1d59649 fix(auth): efficient user session projection (#7187)
* fix(auth): cache users during session projection

* fix(auth.user_sessions): add index for more efficient by user search
2024-01-09 18:36:46 +00:00
SilvanandGitHub 1f30776fc2 fix(login): correct rendering of idps (#7151) 2024-01-05 14:35:51 +00:00
a5d4b08a99 fix(cleanup): cleanup all stuck states (#7145)
* fix(setup): unmarshal of failed step

* fix(cleanup): cleanup all stuck states

* use lastRun for repeatable steps

* typo

---------

Co-authored-by: Livio Spring <[email protected]>
2024-01-05 09:01:48 +00:00
SilvanandGitHub 41215bdc0a fix(setup): unmarshal of failed step (#7144) 2024-01-05 06:29:57 +00:00
SilvanandGitHub aa2d642e97 fix(handler): updated failed events (#7146) 2024-01-04 21:36:08 +00:00
SilvanandGitHub b7d027e2fd fix(db): always use begin tx (#7142)
* fix(db): always use begin tx

* fix(handler): timeout for begin
2024-01-04 16:12:20 +00:00
SilvanandGitHub 8bc56f6fe7 fix(query): escape wildcards in text search (#7131) (#7135)
* fix(query): escape like wildcards

* test: search query wildcards

* add do nothing
2024-01-02 16:27:36 +01:00
SilvanandGitHub 9892fd92b6 refactor: cleanup unused code (#7130)
* refactor: drop unused code

* refactor: drop unused code
2024-01-02 14:26:31 +00:00
SilvanandGitHub 4e3936b5bf ci: publish sha to docker registry (#7127) 2024-01-02 14:03:23 +00:00
SilvanandGitHub a8b8c89f73 perf(query): increase speed of user queries (#7126) (#7128)
* perf(query): increase speed of user queries
2024-01-02 14:41:46 +01:00
SilvanandGitHub cc2dd8b20b fix(eventstore): increase performance on push (#7125) 2023-12-31 15:30:25 +01:00
SilvanandGitHub 6d3ce8d5ab fix(projection): correct type cast of user grant reactivated (#7123)
* fix(projection): correct type cast of user grant reactivated

* test: correct mapper
2023-12-31 14:03:23 +01:00
SilvanandGitHub 5ce542b959 fix(handler): allow uint32 offset for migration scenarios (#7103) 2023-12-21 10:40:51 +00:00
ddbea119f1 fix(query): user performance (#6537)
* start user by id

* ignore debug bin

* use new user by id

* new sql

* fix(sql): replace STRING with text for psql compatabilit

* some changes

* fix: correct user queries

* fix tests

* unify sql statements

* use specific get user methods

* search login name case insensitive

* refactor: optimise user statements

* add index

* fix queries

* fix: correct domain segregation

* return all login names

* fix queries

* improve readability

* query should be correct now

* cleanup statements

* fix username / loginname handling

* fix: psql doesn't support create view if not exists

* fix: create pre-release

* ignore release comments

* add lower fields

* fix: always to lower

* update to latest projection

---------

Co-authored-by: Livio Spring <[email protected]>
2023-12-08 13:14:22 +01:00
SilvanandGitHub 060b4ab2f0 docs(10006): clarify required crdb versions (#7012) 2023-12-04 11:24:36 +01:00
SilvanandGitHub e3d1ca4d58 fix(eventstore): improve pagination of handler filter (#6968)
* fix(setup): add filter_offset to `projections.current_states`

* fix(eventstore): allow offset in query

* fix(handler): offset for already processed events
2023-12-01 12:25:41 +00:00
SilvanandGitHub 2ca88956b4 docs: add tracing.endpoint to defaults.yaml (#6824)
* docs: add `tracing.endpoint` to defaults.yaml

* docs: describe tracing types in defaults.yaml
2023-11-24 13:38:52 +01:00
SilvanandGitHub 9ed956383f fix(eventstore): correct handling of wrong unique fields (#6961) 2023-11-23 06:15:40 +01:00
SilvanandGitHub 0948a0b9ae ci: set runner group on parallel jobs (#6916) 2023-11-14 10:48:41 +00:00
SilvanandGitHub f8bf8ea256 fix(eventstore): differentiate unique constraint error (#6832)
* fix(eventstore): differentiate unique constraint error format

* docs: add comment to eventstore vars

* fix(eventstore): return correct error type if unique constraint already exists
2023-10-27 14:10:01 +02:00
SilvanandGitHub 0187487f26 chore: correct tracing of trigger function (#6825)
* chore: correct tracing of trigger function

* refactor: remove import
2023-10-26 17:07:56 +02:00
SilvanandGitHub c8b9b0ac75 docs: replace fix cockroachdb version with latest stable (#6803) 2023-10-25 14:20:55 +00:00
SilvanandGitHub 459761d99a docs: correct title of tech advisory 06 (#6759) 2023-10-19 14:55:09 +00:00
SilvanandGitHub 4d4f649eda fix(db): allow unlimited connections (#6758) 2023-10-19 13:37:22 +00:00
SilvanandGitHub 3a01558c61 docs: add technical advisory 06 (#6756) 2023-10-19 15:13:50 +02:00
SilvanandGitHub e8b25f3143 merge 'next' into main (#6754) 2023-10-19 13:39:23 +02:00
adlerhurst cc56eeadca Merge branch 'main' into next-to-main 2023-10-19 12:41:09 +02:00
adlerhurst bd23a7a56f merge main into next 2023-10-19 12:34:00 +02:00
SilvanandGitHub b5564572bc feat(eventstore): increase parallel write capabilities (#5940)
This implementation increases parallel write capabilities of the eventstore.
Please have a look at the technical advisories: [05](https://zitadel.com/docs/support/advisory/a10005) and  [06](https://zitadel.com/docs/support/advisory/a10006).
The implementation of eventstore.push is rewritten and stored events are migrated to a new table `eventstore.events2`.
If you are using cockroach: make sure that the database user of ZITADEL has `VIEWACTIVITY` grant. This is used to query events.
2023-10-19 12:19:10 +02:00
SilvanandGitHub 259faba3f0 merge 'main' into next 2023-10-19 11:29:44 +02:00
adlerhurst 9c069806c4 ci(lint): use ref_base instead of main 2023-10-19 10:47:37 +02:00
adlerhurst 46187f7619 Merge branch 'main' into next-merge 2023-10-19 10:11:02 +02:00
adlerhurst 9a7517dd2c Merge branch 'main' into next-merge 2023-10-19 10:08:05 +02:00
SilvanandGitHub fb2bd15780 ci: allow restore errors (#6740) 2023-10-17 15:53:00 +00:00
2fba12d5c2 docs: add technical advisories for eventstore (#6702)
* docs: add technical advisories for eventstore

---------

Co-authored-by: Florian Forster <[email protected]>
2023-10-11 09:13:11 +00:00
SilvanandLivio Spring e64428b8d4 fix: TestCRDB_CreateInstance (#6522)
(cherry picked from commit 856d0d12e8)
2023-09-12 17:06:01 +02:00
SilvanandGitHub 856d0d12e8 fix: TestCRDB_CreateInstance (#6522) 2023-09-08 10:27:52 +00:00
Silvan 2d75576864 fix(scheduler): add span to trigger method (#6513) 2023-09-07 11:01:18 +02:00
SilvanandGitHub c3c2a43d46 fix(scheduler): add span to trigger method (#6513) 2023-09-07 10:59:44 +02:00
SilvanandLivio Spring f72560291e fix(eventstore): cache instances (#6501)
* fix(eventstore): cache instances

* fix: consider succeeded once during instance ids query

* fix(eventstore): return correct instances

(cherry picked from commit 0f06e84f40)
2023-09-07 06:23:28 +02:00
SilvanandGitHub 0f06e84f40 fix(eventstore): cache instances (#6501)
* fix(eventstore): cache instances

* fix: consider succeeded once during instance ids query

* fix(eventstore): return correct instances
2023-09-06 14:34:07 +00:00
SilvanandGitHub 22af4dcd97 feat(storage): read only transactions (#6417)
feat(storage): read only transactions for queries (#6415)

* fix: tests

* bastle wie en grosse

* fix(database): scan as callback

* fix tests

* fix merge failures

* remove as of system time

* refactor: remove unused test

* refacotr: remove unused lines
2023-08-22 14:49:02 +02:00
SilvanandGitHub 99e1c654a3 feat(storage): read only transactions for queries (#6415)
* fix: tests

* bastle wie en grosse

* fix(database): scan as callback

* fix tests

* fix merge failures

* remove as of system time

* refactor: remove unused test

* refacotr: remove unused lines
2023-08-22 10:49:22 +00:00
6672dcd87d fix: add spans in auth requests (#6368)
Co-authored-by: Livio Spring <[email protected]>
2023-08-18 07:21:31 +00:00
ebb7a90ca7 ci: run pipeline on every push (#6221)
* ci: run pipeline on every push

* ci: run pipeline on every push on all branches

---------

Co-authored-by: Stefan Benz <[email protected]>
2023-07-18 14:32:23 +02:00
SilvanandGitHub ecf9835cb8 ci: run pipeline on every push (#6219) 2023-07-17 10:55:41 +02:00
SilvanandGitHub 1c354ca977 ci: improve performance (#5953)
* pipeline runs on ubuntu instead of docker
* added Makefile to build zitadel core (backend) and console (frontend)
* pipeline runs in parallel where possible
* pipeline is split into multiple jobs
* removed goreleaser
* added command to check if zitadel instance is running
2023-07-17 10:08:20 +02:00
SilvanandGitHub d0cda1b479 fix(migration): speed up step 11 (#6086) 2023-06-27 11:56:17 +02:00
SilvanandGitHub 9020c9d94f fix(migration): speed up step 11 (#6085) 2023-06-27 08:48:49 +00:00
adlerhurst c8b4ef28bd fix(migration): speed up update and add logs 2023-06-24 09:06:21 +02:00
SilvanandGitHub 55d589cd44 chore: merge rc into next (#6037)
### Definition of Ready

- [ ] I am happy with the code
- [ ] Short description of the feature/issue is added in the pr
description
- [ ] PR is linked to the corresponding user story
- [ ] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [ ] No debug or dead code
- [ ] My code has no repetitions
- [ ] Critical parts are tested automatically
- [ ] Where possible E2E tests are implemented
- [ ] Documentation/examples are up-to-date
- [ ] All non-functional requirements are met
- [ ] Functionality of the acceptance criteria is checked manually on
the dev system.
2023-06-15 17:29:20 +02:00
adlerhurst 6e510505a1 Merge branch 'main' into rc 2023-06-09 08:49:16 +02:00
adlerhurst 8c0db9a611 fix: empty commit 2023-06-08 10:19:47 +02:00
adlerhurst 0c561bbbf7 Merge branch 'next' into rc 2023-06-08 10:15:53 +02:00
SilvanandGitHub eee4450a05 chore: merge main (#5991)
### Definition of Ready

- [ ] I am happy with the code
- [ ] Short description of the feature/issue is added in the pr
description
- [ ] PR is linked to the corresponding user story
- [ ] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [ ] No debug or dead code
- [ ] My code has no repetitions
- [ ] Critical parts are tested automatically
- [ ] Where possible E2E tests are implemented
- [ ] Documentation/examples are up-to-date
- [ ] All non-functional requirements are met
- [ ] Functionality of the acceptance criteria is checked manually on
the dev system.
2023-06-08 10:14:43 +02:00
adlerhurst b43f32eba1 chore: merge main 2023-06-08 10:13:25 +02:00
adlerhurst c39193b1ed Merge branch 'next' into rc 2023-06-08 09:46:04 +02:00
adlerhurst 8d05a0d6d8 Merge branch 'main' into rc 2023-06-08 09:30:12 +02:00
Silvan 9af066d53c fix(setup): steps 10 and 11 (#5987)
* fix(step10): count amount of wrong_events manually

* fix(step11): create index for better performance
2023-06-08 08:11:50 +02:00
adlerhurst 6a3ed2f8f7 chore: merge branch 'main' into rc 2023-06-08 08:04:19 +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 743c77a729 fix(setup): update chunks in step 11 (#5965) (#5966) 2023-06-02 10:04:03 +00:00
SilvanandGitHub ebca7b6e3d fix(setup): update chunks in step 11 (#5965) 2023-06-02 09:31:18 +00:00
SilvanandGitHub 91f4f99957 chore: merge rc in next (#5963) 2023-06-01 14:34:57 +02:00
adlerhurst e3987d6555 Merge branch 'rc' into next-rc 2023-06-01 13:12:00 +02:00
adlerhurst f41f9a0b02 chore: rc as prerelease 2023-05-25 08:32:51 +02:00
adlerhurst c20cfd5a2c Merge branch 'main' into rc 2023-05-25 08:31:04 +02:00
Silvan 32d33d3145 fix: render authrequest id only if possible (#5823) 2023-05-11 18:08:34 +02: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