Commit Graph
100 Commits
Author SHA1 Message Date
e4a4b7cfbe feat(api): add user creation to user service (#5745)
* 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

* begin user creation

* change protos

* implement metadata and move context

* merge commands

* 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

* update email requests

* rename proto requests

* cleanup and docs

* simplify

* simplify

* fix setup

* remove unused proto messages / fields

---------

Co-authored-by: adlerhurst <[email protected]>
Co-authored-by: Tim Möhlmann <[email protected]>
2023-04-26 07:47:57 +02:00
Livio SpringandGitHub 429a91518b fix: remove idp templates when using old / deprecated delete method (#5685)
* fix: remove idp templates when using old / deprecated delete method

* fix: projection version
2023-04-17 08:20:49 +00:00
4c482619da fix: ensure minimal scope for azure ad (#5686)
* fix: ensure minimal scope for azure ad

* docs(idps): mention scopes which are always sent

---------

Co-authored-by: adlerhurst <[email protected]>
2023-04-17 07:02:16 +00:00
Livio SpringandGitHub 8e19f0f6c3 fix: set displayname correctly in EnsureDisplayName (#5702)
fix: EnsureDisplayName
2023-04-17 06:26:40 +00:00
Livio SpringandGitHub 8bf36301ed 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
2023-04-11 15:07:32 +00:00
b3d8787921 feat: add new api services (#5619)
* feat: add new services

* improve demos and comments

* remove unused field

* add comment to demo proto calls

* Apply suggestions from code review

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

---------

Co-authored-by: Silvan <[email protected]>
2023-04-11 15:37:42 +02:00
Livio SpringandGitHub 23e6cc325e fix: update correct current sequence for refresh tokens (#5608) 2023-04-05 21:31:51 +02:00
ea9223a2b0 fix: remove instance IDPs correctly from org policies (#5609)
Co-authored-by: Silvan <[email protected]>
2023-04-05 11:18:00 +00:00
Livio SpringandGitHub 991a56341b fix: role claims mapping (#5601)
* fix: role claims mapping

* update oidc pkg

* update oidc pkg
2023-04-04 12:36:39 +00:00
Livio SpringandGitHub 99e8c5c175 chore: update stable to 2.21.3 (#5514) 2023-03-29 14:07:23 +00:00
Livio SpringandGitHub 1cf84b5a56 fix: map metadata correctly in actions (#5526) 2023-03-23 14:28:53 +01:00
Livio SpringandGitHub fca6dd9613 fix: reduce correct type for jwt idps (#5519) 2023-03-22 15:46:59 +00:00
Livio SpringandGitHub a6c471b2e4 fix: possible nil pointer in actions (#5510) 2023-03-21 11:19:49 +01:00
Livio SpringandGitHub 4ca50e0802 fix: check for empty applicationID on assertRoles (#5509)
* fix: check for empty applicationID on assertRoles

* remove unintended added file
2023-03-21 08:59:44 +01:00
Livio SpringandGitHub 1896f13952 fix: use idToken for mapping when using old configs (#5458)
* fix: use idToken for mapping when using old configs

* fix events and add tests
2023-03-16 16:47:22 +01:00
Livio SpringandGitHub a8a2edadc2 fix: use correct resource owner in checkExternalUserLogin (#5457) 2023-03-16 13:14:08 +00:00
Livio SpringandGitHub 5a307afe62 feat: add azure provider templates (#5441)
Adds possibility to manage and use Microsoft Azure template based providers
2023-03-15 07:48:37 +01:00
c0843e6b4c feat: add gitlab provider templates (#5405)
* feat(api): add google provider template

* refactor reduce functions

* handle removed event

* linting

* fix projection

* feat(api): add generic oauth provider template

* feat(api): add github provider templates

* feat(api): add github provider templates

* fixes

* proto comment

* fix filtering

* requested changes

* feat(api): add generic oauth provider template

* remove wrongly committed message

* increase budget for angular build

* fix linting

* fixes

* fix merge

* fix merge

* fix projection

* fix merge

* updates from previous PRs

* enable github providers in login

* fix merge

* fix test and add github styling in login

* cleanup

* feat(api): add gitlab provider templates

* fix: merge

* fix display of providers in login

* implement gitlab in login and make prompt `select_account` optional since gitlab can't handle it

* fix merge

* fix merge and add tests for command side

* requested changes

* requested changes

* Update internal/query/idp_template.go

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

* fix merge

* requested changes

---------

Co-authored-by: Silvan <[email protected]>
2023-03-13 17:34:29 +01:00
Livio SpringandGitHub 1ec6c451ca chore: update stable to 2.19.4 (#5269)
* chore: update stable to 2.19.3

* 2.19.4
2023-03-10 15:31:10 +01:00
Livio SpringandGitHub 26fdc3e84e fix(api): return id_attribute of oauth provider (#5397) 2023-03-09 06:13:43 +00:00
Livio SpringandGitHub 8cbde57047 fix(api): allow HTTP/1.1 for grpc-web (#5376)
Handles grpc-web on HTTP/1.1 with H2C for HTTP/2, but does not enforce it.
2023-03-08 18:33:43 +00:00
Livio SpringandGitHub 3042d7ef5c feat: add github provider template (#5334)
Adds possibility to manage and use GitHub (incl. Enterprise Server) template based providers
2023-03-08 10:17:28 +00:00
Livio SpringandGitHub b2786d8c68 fix: handling of (old) IDPConfigChangedEvent projection (#5384) 2023-03-07 11:35:47 +01:00
Livio SpringandGitHub 2efa305e10 fix: use of generic oauth provider (#5345)
Adds a id_attribute to the GenericOAuthProvider, which is used to map the external User. Further mapping can be done in actions by using the `rawInfo` of the new `ctx.v1.providerInfo` field.
2023-03-03 10:38:49 +00:00
Livio SpringandGitHub 966df56026 fix(providers): set prompt select_account again (#5329) 2023-03-01 07:17:51 +00:00
Livio SpringandGitHub 48f9815b7c feat(login): use new IDP templates (#5315)
The login uses the new template based IDPs with backwards compatibility for old IDPs
2023-02-28 21:20:58 +01:00
Livio SpringandGitHub 80003939ad feat(api): add oidc and jwt provider template (#5290)
Adds possibility to manage OIDC and JWT template based providers
2023-02-27 16:32:18 +01:00
82ffd6dffb fix(actions): provide browser info and handle nil pointer (#5277)
* fix(actions): provide browser info and handle nil pointer

* fix(actions): use correct user id in post registration

---------

Co-authored-by: adlerhurst <[email protected]>
2023-02-24 16:13:11 +01:00
Livio SpringandGitHub 737d14e81b feat(api): add generic oauth provider template (#5260)
adds functionality to manage templates based OIDC IDPs
2023-02-24 15:16:06 +01:00
Livio SpringandGitHub 40e7356f3e feat(api): add google provider template (#5247)
add functionality to manage templates based Google IDP
2023-02-21 17:18:28 +00:00
Livio SpringandGitHub c5d0c109da fix: allow "org.read" and "policy.read" on ORG_USER_MANAGER (#5256) 2023-02-21 08:31:35 +00:00
Livio SpringandGitHub fa1e6c0bb2 chore(workflow): update actions (node 16) (#5177) 2023-02-17 12:31:55 +01:00
Livio SpringandGitHub b9b0e5dead chore: set 2.18.2 as stable (#5168)
* chore: set 2.18.1 as stable

* Update release-channels.yaml

* prevent rebuilding / retesting binary on stable channel change
2023-02-17 10:56:15 +01:00
Livio SpringandGitHub f6a320a9dd fix(api): correct http methods for provider templates endpoints (#5228)
fix(api): correct http methods for provider templates endpoints
2023-02-16 08:24:05 +01:00
Livio SpringandGitHub 8ef13d77e7 fix(actions): check for nil pointer on set claims in access_token (#5172) 2023-02-09 06:27:39 +00:00
Livio SpringandGitHub 44a995c660 fix: only remove idp links from users of own organisation (#5156)
ensure linked users of the (instance) idp are only affected if they are part of the organisation where the idp is removed from the login policy
2023-02-03 14:56:19 +07:00
Livio SpringandGitHub 598a4d2d4b feat: add basic structure of idp templates (#5053)
add basic structure and implement first providers for IDP templates to be able to manage and use them in the future
2023-01-23 08:11:40 +01:00
Livio SpringandGitHub e9368d28f7 chore(release channel): update stable to 2.16.4 (#5024) 2023-01-10 16:29:22 +00:00
Livio SpringandGitHub 2482bb8700 Merge pull request from GHSA-6rrr-78xp-5jp8 2023-01-10 15:58:10 +01:00
Livio SpringandGitHub 0a30e39b46 fix(CORS): add X-Requested-With to Access-Control-Request-Headers (#5009)
allows clients with `X-Requested-With` header to succeed with their CORS request
2023-01-09 13:37:10 +01:00
5651f98600 feat(auth api): expose login policy of authenticated user (#4979)
Co-authored-by: Silvan <[email protected]>
2023-01-05 13:04:38 +00:00
0530f19d94 feat: allow usernames without @ when UserMustBeDomain false (#4852)
* feat: allow usernames without @ when UserMustBeDomain false

* e2e

* test(e2e): table driven tests for humans and machines

* cleanup

* fix(e2e): ensure there are no username conflicts

* e2e: make awaitDesired async

* rm settings mapping

* e2e: make awaitDesired async

* e2e: parse sequence as int

* e2e: ensure test fails if awaitDesired fails

Co-authored-by: Max Peintner <[email protected]>
2022-12-22 11:16:17 +00:00
Livio SpringandGitHub a99da4f8e4 fix: user queries (#4920) 2022-12-22 09:22:08 +00:00
Livio SpringandGitHub 6093440747 fix(import): activate label policy after creation (#4879) 2022-12-21 08:46:05 +00:00
d21bb902f1 fix: push timeout (#4882) (#4885)
* push with timeout

* test: config for eventstore

(cherry picked from commit b9156da76d0f03075589b50eafbf9f48160a0301)

Co-authored-by: Silvan <[email protected]>
2022-12-15 09:40:13 +00:00
Livio SpringandGitHub d3e4281bb6 fix: protect default and zitadel project org from remove (#4875) 2022-12-14 10:44:43 +00:00
632639ae7f feat: enable iframe use (#4766)
* feat: enable iframe use

* cleanup

* fix mocks

* fix linting

* docs: add iframe usage to solution scenarios configurations

* improve api

* feat(console): security policy

* description

* remove unnecessary line

* disable input button and urls when not enabled

* add image to docs

Co-authored-by: Max Peintner <[email protected]>
Co-authored-by: Fabi <[email protected]>
2022-12-14 07:17:36 +01:00
Livio SpringandGitHub 33e973f015 fix: ensure domain policy is read for the correct org (#4872) 2022-12-13 06:37:50 +00:00
c5ebeea590 fix: compute usernames in auth views correctly after domain policy change (#4860)
* fix: compute usernames in auth views correctly after domain policy change

* userloginmustbedomain hint

Co-authored-by: Max Peintner <[email protected]>
2022-12-09 12:10:20 +00:00
Livio SpringandGitHub 48f535afa1 fix: remove domain and user correctly in DomainPolicyUsernamesWriteModel (#4850)
fix: remove Domain and User correctly in DomainPolicyUsernamesWriteModel
2022-12-08 08:11:49 +01:00
Livio SpringandGitHub 3539418a4a fix: handle UserLoginMustBeDomain changes correctly (#4765)
* fix: handle UserLoginMustBeDomain changes correctly

* fix: remove verified domains (and not only primary) as suffix

* fix: ensure testability by changing map to slice

* cleanup

* reduce complexity of DomainPolicyUsernamesWriteModel.Reduce()

* add test for removed org policy
2022-12-06 09:01:31 +01:00
062887269b fix(login): check user state before ignoreUnknownUsernames setting (#4759)
Co-authored-by: Fabi <[email protected]>
2022-11-24 09:13:19 +00:00
Livio SpringandGitHub f86d057a92 fix: ensure setup steps are done in order and one at a time (#4749)
* fix: ensure setup steps are done in order and one at a time

* fix err handling
2022-11-23 15:31:59 +00:00
Livio SpringandGitHub 6a1a907874 fix: change index names to work with postgres (#4740) 2022-11-23 11:25:49 +00:00
Livio SpringandGitHub e8babf1048 fix: reduce load on view tables (#4716)
* fix: reduce load on view tables

* create prerelease

* linting: pass context to view handlers

* fix error handling of refresh token handler

* fix: improve processing of successful instanceIDs on views

* fix revert intended change in .golangci.yaml

* fix: set timeout for processInstances in spooler

* fix: reduce update to active tokens on profile change

* change token expiration query to db now()

* remove branch from .releaserc.js
2022-11-22 07:36:48 +01:00
29441ce4b6 feat: save last occurrence of failed events and fix instance filtering (#4710)
* fix: filter failed events and current sequence correctly

* fix failed events sorting column

* feat: save last occurrence of failed event

* fix failedEvents query and update sql statements

* change sql statement to only create index

* fix linting

* fix linting

* Update internal/query/failed_events.go

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

* update job name on test-docs to match the one from test-code

Co-authored-by: Silvan <[email protected]>
2022-11-18 13:49:38 +01:00
Livio SpringandGitHub 6d787bfd62 fix: ensure actions execution on idp flows (#4711) 2022-11-18 12:49:17 +01:00
Livio SpringandGitHub d190567a20 fix issue template (#4690) 2022-11-11 12:40:25 +00:00
Livio SpringandGitHub 5b4b29f8ce fix issue template (#4689) 2022-11-10 15:55:21 +00:00
Livio SpringandGitHub 78ae64471a fix: improve performance by reducing full table scans (#4684)
* use instance id on update in projections

* create index on domain in instance_domain projection

* add missing instanceID filter to app queries
2022-11-10 11:59:33 +01:00
eba602e064 feat: allow import of federated users in ImportHumanUser (#4675)
Co-authored-by: Fabi <[email protected]>
2022-11-09 08:33:50 +00:00
Livio SpringandGitHub 4eb8ad8777 fix: redirect / to login UI (#4669) 2022-11-09 07:19:05 +00:00
Livio SpringandGitHub 5ac956b0f1 fix: allow version to be overwritten by build again (#4656) 2022-11-07 09:50:44 +00:00
41c043bcd9 fix: remove userid unique constraint and fix user list query (#4632)
* fix: remove userid unique constraint and fix user list query

* fix: improve instances query

* improve user queries

Co-authored-by: Silvan <[email protected]>
2022-11-07 10:33:22 +01:00
Livio SpringandGitHub c791f6de58 fix: improve startup times by initializing projection tables during setup (#4642)
* fix: improve startup times by initializing projections table during setup

* add missing file
2022-11-04 09:21:58 +00:00
Livio SpringandGitHub b45e5b0adc fix: nil pointer on jwt idps in actions (#4619) 2022-10-27 14:53:40 +02:00
Livio SpringandGitHub 441f215513 fix: join on instanceIDs in queries (#4612) 2022-10-27 06:08:36 +00:00
Livio SpringandGitHub d721f725fd fix: instance remove (#4602) 2022-10-26 13:06:48 +00:00
27e7dc68a8 feat: allow disabling the mfa setup prompt (#4575)
* feat: allow disabling the mfa setup prompt

* e2e: disable mfa prompt

Co-authored-by: Max Peintner <[email protected]>
2022-10-26 10:20:01 +02:00
Livio SpringandGitHub 3270a94291 fix: idp usage (#4571)
* fix: send email verification instead of init code for idp users

* fix: select single idp of external only users

* fix: use single idp on login
2022-10-18 14:48:26 +00:00
Livio SpringandGitHub b0b1e94090 feat(login): additionally use email/phone for authentication (#4563)
* feat: add ability to disable login by email and phone

* feat: check login by email and phone

* fix: set verified email / phone correctly on notify users

* update projection version

* fix merge

* fix email/phone verified reduce tests

* fix user tests

* loginname check

* cleanup

* fix: update user projection version to handle fixed statement
2022-10-17 19:19:15 +00:00
Livio SpringandGitHub 9ae58b62fd fix(email): set sender address as return-path header (#4569) 2022-10-17 15:05:03 +00:00
Livio SpringandGitHub 6daf44a34a fix: clear potentially existing user information on auth request for domain discovery (#4528) 2022-10-11 11:12:07 +02:00
Livio SpringandGitHub 3b03ad82bf fix: registration allowed check and pass loginname to registration (#4507) 2022-10-07 12:17:17 +00:00
Livio SpringandGitHub d775020a32 fix: login for initial users (#4506) 2022-10-07 13:56:50 +02:00
bffb10a4b4 feat: allow domain discovery for unknown usernames (#4484)
* fix: wait for projection initialization to be done

* feat: allow domain discovery for unknown usernames

* fix linting

* Update console/src/assets/i18n/de.json

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

* Update console/src/assets/i18n/en.json

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

* Update console/src/assets/i18n/it.json

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

* Update console/src/assets/i18n/fr.json

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

* fix zh i18n text

* fix projection table name

Co-authored-by: Fabi <[email protected]>
2022-10-06 13:30:14 +02:00
fcb36cd406 fix: wait for projection initialization to be done (#4473)
* fix: wait for projection initialization to be done

* close channel

Co-authored-by: Silvan <[email protected]>
2022-10-03 14:09:59 +00:00
df624f0de5 fix: change default log level to info (#4470)
Co-authored-by: Silvan <[email protected]>
2022-10-03 13:20:16 +00:00
Livio SpringandGitHub 2d6281ce5b docs: JWT IDP (#2475)
* docs: first draft for jwt idp

* update to v2 and fix typos
2022-09-27 15:42:13 +02:00
7dfa1925cc feat: restrict login to specific org by id (scope) (#4294)
* feat: add new org scope

* change default of UserLoginMustBeDomain to false

* return resource owner claims

* fix: use email style for first user

* fix: ensure email style for default users (backwards compatibility)

* change to external domain (as it was before UserLoginMustBeDomain change)

* update e2e tests to use email style usernames

* document new scope

* lint e2e

Co-authored-by: Fabi <[email protected]>
2022-09-23 12:08:10 +00:00
Livio SpringandGitHub 7aef0ccfee fix(email): set correct logo url (#4426) 2022-09-21 14:18:55 +00:00
05cb672cff fix(login): custom texts for pages called directly form mail link (#4415)
* fix(login): translate init password correctly

* refactor: no error return params

* fix(login): custom texts for pages called directly form mail link

* fix custom text on registration pages

Co-authored-by: adlerhurst <[email protected]>
2022-09-20 07:22:47 +00:00
Livio SpringandGitHub 8505eb4cc9 docs(oidc): clarify project roles scope and claim (#4411) 2022-09-19 14:17:48 +02:00
Livio SpringandGitHub aa4df33b62 docs(oidc): use correct audience (issuer) for JWT Profile (#4336) 2022-09-07 15:27:29 +02:00
Livio SpringandGitHub 04ce8b2479 fix: remove idps from org login policy after reset (#4327) 2022-09-07 14:17:52 +02:00
Livio SpringandGitHub 4723e911f4 fix: provider type column in idp_login_policy_links projection (#4325) 2022-09-06 06:39:03 +00:00
Livio SpringandGitHub 279b487961 fix: use correct db schema (#4308) 2022-09-05 08:29:32 +00:00
Livio SpringandGitHub 5aa91ad105 fix: improve performance (#4300)
## Note

This release requires a setup step to fully improve performance.
Be sure to start ZITADEL with an appropriate command (zitadel start-from-init / start-from-setup)

## Changes

- fix: only run projection scheduler on active instances
- fix: set default for concurrent instances of projections to 1 (for scheduling)
- fix: create more indexes on eventstore.events table
- fix: get current sequence for token check (improve reread performance)
2022-09-02 14:05:13 +00:00
adb5394ae3 fix: login text changes (#4269)
* fix: omit empty (zero) dates

* overwrite current date on save

* update date on reset

* smtp

* disable reset

Co-authored-by: Max Peintner <[email protected]>
2022-09-02 10:29:06 +02:00
Livio SpringandGitHub bee616c11a fix: SMTP config setup (#4272)
* fix: change default for SMTPSenderAddressMatchesInstanceDomain to false

* fix: handle error in console
2022-09-02 09:04:29 +02:00
Livio SpringandGitHub 32b751a3a0 fix: WebAuthN (registration / login) and list on users (#4290)
* fix: WebAuthN when running under non default port

* fix: remove notification schema from list of views / failed events

* fix: auth method column type in user auth methods
2022-09-01 09:10:07 +02:00
Livio SpringandGitHub 64f589c435 fix: read custom texts for pages called directly form mail link (#4255)
* fix: read custom texts for pages called directly form mail link

* log errors
2022-08-26 08:53:11 +00:00
Livio SpringandGitHub e1a981928c fix: action query (#4257) 2022-08-26 08:38:41 +00:00
Livio SpringandGitHub 47930c6a85 fix: handle instanceID correctly in auth projections (#4252) 2022-08-25 13:38:35 +00:00
Livio SpringandGitHub cb8e6c9f24 chore: update stable to 2.2.0 (#4246) 2022-08-25 11:17:47 +02:00
Livio SpringandGitHub 4c26665b93 fix: improve user grants precondition checks (#4237)
* fix: improve user grants precondition checks

* build rc

* fix prerelease

* fix: build image

* remove branch from releaserc
2022-08-24 11:38:59 +02:00
Livio SpringandGitHub 06fd70d457 chore: always push docker image (#4236)
(only skip latest manifest on prereleases)
2022-08-24 09:53:14 +02:00
69534a2f7a feat: allow JWT for ZITADEL APIs (#4206)
* feat: allow JWT for ZITADEL APIs

* improve getTokenIDAndSubject

* comment

Co-authored-by: Silvan <[email protected]>
2022-08-23 08:02:36 +02:00
Livio SpringandGitHub cc612fed07 fix: trim spaces for usernames and organization names (#4217) 2022-08-19 15:00:14 +02:00
Livio SpringandGitHub d656b3f3c9 fix: instance interceptors return NotFound (404) error for unknown hosts (#4184)
* fix: instance interceptors return "NotFound" (404) error for unknown hosts

* fix tests
2022-08-17 06:07:41 +00:00