Commit Graph
1225 Commits
Author SHA1 Message Date
09b021b257 feat: Configurable Unique Machine Identification (#3626)
* feat: Configurable Unique Machine Identification

This change fixes Segfault on AWS App Runner with v2 #3625

The change introduces two new dependencies:

* github.com/drone/envsubst for supporting AWS ECS, which has its metadata endpoint described by an environment variable
* github.com/jarcoal/jpath so that only relevant data from a metadata response is used to identify the machine.

The change ads new configuration (see `defaults.yaml`):

* `Machine.Identification` enables configuration of how machines are uniquely identified - I'm not sure about the top level category `Machine`, as I don't have anything else to add to it. Happy to hear suggestions for better naming or structure here.
* `Machine.Identifiation.PrivateId` turns on or off the existing private IP based identification. Default is on.
* `Machine.Identification.Hostname` turns on or off using the OS hostname to identify the machine. Great for most cloud environments, where this tends to be set to something that identifies the machine uniquely. Enabled by default.
* `Machine.Identification.Webhook` configures identification based on the response to an HTTP GET request.  Request headers can be configured, a JSONPath can be set for processing the response (no JSON parsing is done if this is not set), and the URL is allowed to contain environment variables in the format `"${var}"`.

The new flow for getting a unique machine id is:

1. PrivateIP (if enabled)
2. Hostname (if enabled)
3. Webhook (if enabled, to configured URL)
4. Give up and error out.

It's important that init configures machine identity first. Otherwise we could try to get an ID before configuring it. To prevent this from causing difficult to debug issues, where for example the default configuration was used, I've ensured that
the application will generate an error if the module hasn't been configured and you try to get an ID.

Misc changes:

* Spelling and gramatical corrections to `init.go::New()` long description.
* Spelling corrections to `verify_zitadel.go::newZitadel()`.
* Updated `production.md` and `development.md` based on the new build process. I think the run instructions are also out of date, but I'll leave that for someone else.
* `id.SonyFlakeGenerator` is now a function, which sets `id.sonyFlakeGenerator`, this allows us to defer initialization until configuration has been read.

* Update internal/id/config.go

Co-authored-by: Alexei-Barnes <[email protected]>

* Fix authored by @livio-a for tests

Co-authored-by: Livio Amstutz <[email protected]>
2022-05-24 16:57:57 +02:00
Livio AmstutzandGitHub e1ee89982a fix: unify commands (and remove todos for checking existence) (#3696) 2022-05-24 09:28:17 +00:00
Livio AmstutzandGitHub cf6f4d6894 fix(tracing): parsing of fraction (#3705)
* fix(tracing): parsing of fraction

* log id
2022-05-24 09:18:25 +00:00
mffapandGitHub 32ccada7a9 chore: more typos (#3688) 2022-05-21 22:41:21 +02:00
5a2ffd80dc chore: "EMail" typo (#3679)
Co-authored-by: Florian Forster <[email protected]>
2022-05-21 11:29:25 +00:00
4d30d3a7e1 chore: various typos (#3686)
* fix(cli): typo in clis

* chore: fix typos in guides and readme

* markdown lint

* readme typos

* markdown lint

* typos in security.md

* login de

* login en

* console de

* console en

* Apply suggestions from code review

E-Mail instead of Email

Co-authored-by: Florian Forster <[email protected]>

Co-authored-by: Florian Forster <[email protected]>
2022-05-21 10:44:09 +00:00
Florian ForsterandGitHub 0ba165363e chore: rename docs links (#3668) 2022-05-20 14:32:06 +00:00
Livio AmstutzandGitHub 62c4a4d08d fix: return absolute asset urls (#3676) 2022-05-20 10:30:12 +02:00
Livio AmstutzandGitHub 0906c2d513 fix: CORS on assets api (#3659) 2022-05-19 14:09:02 +00:00
SilvanandGitHub a95b1ab3d0 fix(storage): resolve deadlock occuring durring projection (#3671) 2022-05-19 11:44:16 +00:00
c71ccc8a80 fix: improve context handling in projections (#3638)
* fix: improve context handling in projections

* fix tests

* use as of system time for current sequence

* use as of system time for current sequence

Co-authored-by: Silvan <[email protected]>
2022-05-19 08:25:19 +00:00
Livio AmstutzandGitHub 5901991dd3 fix: asset service (CORS and path in console) and user init (#3655)
* fix: asset service (CORS and path in console) and user init

* fix tests

* improve comment
2022-05-18 14:10:49 +02:00
Livio AmstutzandGitHub 616b31c959 fix: token check and error unwrapping (#3648)
* fix: token check and error unwrapping

* remove unused code
2022-05-18 10:49:16 +02:00
Livio AmstutzandGitHub 3a63fb765a fix: cleanup some todos (#3642)
* cleanup todo

* fix: some todos
2022-05-16 16:35:49 +02:00
5c0f527a49 feat: restrict smtp sender address (#3637)
* fix: check if sender address is custom domain

* fix: check if sender address is custom domain

* fix: check if sender address is custom domain

Co-authored-by: Livio Amstutz <[email protected]>
2022-05-16 14:08:47 +00:00
411d7c6c5c feat: add default redirect uri and handling of unknown usernames (#3616)
* feat: add possibility to ignore username errors on first login screen

* console changes

* fix: handling of unknown usernames (#3445)

* fix: handling of unknown usernames

* fix: handle HideLoginNameSuffix on unknown users

* feat: add default redirect uri on login policy (#3607)

* feat: add default redirect uri on login policy

* fix tests

* feat: Console login policy default redirect (#3613)

* console default redirect

* placeholder

* validate default redirect uri

* allow empty default redirect uri

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

* remove wonrgly cherry picked migration

Co-authored-by: Max Peintner <[email protected]>
2022-05-16 13:39:09 +00:00
Livio AmstutzandGitHub f1fa74a2c0 fix: loginnames in login and mails (eventstore v1 queries) (#3636)
* fix: loginnames in login and mails (eventstore v1 queries)

* fix: loginnames in login and mails (eventstore v1 queries)
2022-05-16 13:10:10 +00:00
c53d5251a7 fix: V2 docs / error messages (#3611)
* docs: rewrite concept section

* docs: add instance to guides

* chore: error messages

* fix: scenarios

* docs: urls

* docs: change images

* docs: change images

* docs: change images

Co-authored-by: Livio Amstutz <[email protected]>
2022-05-16 12:00:33 +00:00
Livio AmstutzandGitHub d401439427 fix: unique constraints on instance domain events (#3635) 2022-05-16 11:52:54 +02:00
FabiandGitHub 48fbf1a28e feat: add random string to generated domain (#3634) 2022-05-16 11:26:24 +02:00
Livio AmstutzandGitHub 4fcf03c9c8 fix: email sender and template (#3633) 2022-05-16 09:52:10 +02:00
024eedc1b5 feat: enable default smtp config on setup (#3622)
* feat: enable default smtp config on setup

* fix tests

* fix channel order

Co-authored-by: Fabi <[email protected]>
2022-05-13 12:13:07 +00:00
Livio AmstutzandGitHub 5571db3e1b feat: improve console caching and provide build info (#3621)
* feat: improve console caching and provide build info

* Update info.go
2022-05-13 14:06:44 +02:00
Livio AmstutzandGitHub 734cfdddae fix: return userID on org setup (#3623) 2022-05-13 13:54:48 +02:00
Livio AmstutzandGitHub f70990709b fix: allow single parameter in org unique request (#3620) 2022-05-13 11:25:45 +02:00
a9f82529ab fix: add org member (#3599)
Co-authored-by: Livio Amstutz <[email protected]>
2022-05-12 07:34:46 +00:00
Max PeintnerandGitHub 00e042ea44 fix(login): fix avatar.js (#3614) 2022-05-11 08:52:17 +02:00
Max PeintnerandGitHub d431ccb965 feat(console, login): v2 notification settings, login avatar (#3606)
* instance routing

* instance naming

* org list

* rm isonsystem

* breadcrumb  type

* routing

* instance members

* fragment refresh org

* settings pages

* settings list, sidenav grouping, i18n

* org-settings, policy changes

* lint

* grid

* rename grid

* fallback to general

* cleanup

* general settings, remove cards

* sidenav for settings, label policy

* i18n

* header, nav backbuild

* general, project nav rehaul

* login text background adapt

* org nav anim

* org, instance settings, fix policy layout, roles

* i18n, active route for project

* lint

* notification-settings

* idp create redirect, sms provider create, i18n

* oidc configuration

* settings list

* new avatar colors for login

* cleaner js

* avatar theme login

* remove avatar elevation
2022-05-11 08:01:40 +02:00
Livio AmstutzandGitHub 94e420bb24 fix: env.json caching, readiness and unique lockerIDs (#3596)
* fix: readiness check

* disable cache for env.json

* always generate unique lockerID

* fix tests
2022-05-04 17:09:49 +02:00
Livio AmstutzandGitHub 79db247801 feat: set default language on instance (#3594) 2022-05-03 15:58:38 +02:00
06a1b52adf fix: improve interceptor handling (#3578)
* fix: improve interceptor handling

* fix: improve interceptor handling

Co-authored-by: Florian Forster <[email protected]>
2022-05-02 15:26:54 +00:00
Livio AmstutzandGitHub ef6fd5a843 fix: remove 3rd party assets from mail (#3569) 2022-05-02 14:41:57 +00:00
Livio AmstutzandGitHub 861cf07700 feat: permit all features to every instance and organisation (#3566) 2022-05-02 11:18:17 +02:00
SilvanandGitHub a9f71ba08e fix(command): reset phone on phone write model to empty if removed (#3543) 2022-05-02 11:06:30 +02:00
Livio AmstutzandGitHub dc7fdb240b fix: token verification (don't cache zitadel id system wide) (#3542) 2022-04-29 14:16:23 +02:00
Livio AmstutzandGitHub 2af3e228e4 feat: set service name in tracing (#3533) 2022-04-28 17:35:56 +02:00
Livio AmstutzandGitHub 44a2b81bef feat: enable tracing (#3528) 2022-04-28 14:44:13 +02:00
Livio AmstutzandGitHub 00f7dbe875 fix: setup instance domain handling (#3529) 2022-04-28 10:30:41 +02:00
70e98460ab fix: refactor system api (#3500)
* fix: refactor system api

* fix: search domains on get instance

* fix: search domains on get instance

* fix: return instance detail

* fix: implement user sorting column (#3469)

* fix: implement user sorting column

* fix: implement user sorting column

* fix: string column

* isOrderByLower

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

* fix: user converter import

* Update instance.go

Co-authored-by: Livio Amstutz <[email protected]>
2022-04-27 15:18:34 +00:00
Livio AmstutzandGitHub fd1150f628 fix: check http methods on specific http2 routes (#3527)
* fix: check headers lowercase

* Update .releaserc.js

* fix: check http methods on specific http2 routes
2022-04-27 13:10:44 +02:00
Livio AmstutzandGitHub 9ffd83af7d fix: header matcher of grpc-web route (#3524) 2022-04-27 08:10:54 +00:00
fa9f581d56 chore(v2): move to new org (#3499)
* chore: move to new org

* logging

* fix: org rename caos -> zitadel

Co-authored-by: adlerhurst <[email protected]>
2022-04-26 23:01:45 +00:00
Livio AmstutzandGitHub b867eff84c test: ensure consistency of update multiple sequences test (#3501) 2022-04-26 19:41:11 +00:00
Livio AmstutzandGitHub e9e332b909 feat: handle CORS for grpc-web (#3498) 2022-04-26 16:50:41 +02:00
Livio AmstutzandGitHub 32986aa60a feat: handle missing trailing slashes for console and login (#3490)
* handle calls without trailing slash

* build redirect uris correctly

* handle missing trailing slash for login

* sentry as http middleware

* import

* fix build origin
2022-04-26 12:13:16 +02:00
7a507fe63c fix: use correct encryption keys in addHuman and set primary instance domain (#3486)
Co-authored-by: Fabi <[email protected]>
2022-04-25 14:36:10 +00:00
FabiandGitHub 0b6eb07e2d fix: nil pointer on add user (missing phone) (#3487) 2022-04-25 14:30:25 +00:00
Livio AmstutzandGitHub 2c4799c223 feat: complete dynamic domain handling (#3482)
* feat: dynamic issuer

* feat: default language from context

* remove zitadel docs from defaults

* remove ConsoleOverwriteDir

* remove notification endpoints from defaults

* custom domains in emails

* remove (external) domain

* external domain completely removed, console handling fixed

* fix test

* fix defaults.yaml
2022-04-25 11:16:36 +02:00
Livio AmstutzandGitHub 75ec73ca4a feat: dynamic issuer (#3481)
* feat: dynamic issuer

* dynamic domain handling

* key rotation durations

* feat: dynamic issuer

* make webauthn displayname dynamic
2022-04-25 10:01:17 +02:00
3d5891eb11 feat: System api (#3461)
* feat: start system api

* feat: remove auth

* feat: change gitignore

* feat: run system api

* feat: remove clear view form admin api

* feat: search instances

* feat: add instance

* fix: set primary domain

* Update .gitignore

* fix: add instance

* fix: add instance

* fix: handle errors

* fix: handle instance name

* fix: test

Co-authored-by: Livio Amstutz <[email protected]>
2022-04-21 12:37:39 +02:00