mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-03 12:55:43 +00:00
docs(contributing): Update contributing guide (#3729)
* docs(contributing): Update contributing guide * update link for login interface texts * move gfi to main section * contributing docs * typos, links Co-authored-by: Florian Forster <florian@caos.ch> * chore(console): contributing to console (#3891) * fix: return absolute url for avatar in user sessions (#3724) * fix: return absolute url for avatar in user sessions * fix: refresh token unique constraint * feat: system api requires authenticated requests (#3570) * begin auth * feat: system api requires authenticated requests * fix tests * feat: directly specify factors/idps on addCustomLoginPolicy and return on LoginPolicy responses (#3711) * 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 Co-authored-by: Max Peintner <max@caos.ch> Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * fix: read key data for system api users from config (#3731) * chore: make docs searchable (#3734) * chore: make docs searchable * Update netlify.toml * fix: SMTP config in defaults (#3736) * fix(command): create smtp provider cmds after domains * chore(defaults): add smtp configuration * fix(console): Idp settings, settings reset warn dialog, Accept-Language header interceptor, i18n (#3727) * fix idp table, settings reset warn dialog, fix i18n interceptor, i18n * fix label policy on org change * fallback * fix preview button styles * footer, login-policy null check * org create btn alignment * show error with toast * error toast * fix(console): header image fallback (#3735) fix: fallback icon in header Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix(login): checkbox, label, container styles (#3732) fix: checkbox, label styles * docs: add java sample project (#3738) Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * fix: use issuer for jwt profile check on system api (#3741) * fix(current_sequence): no error if not found (#3740) * fix: login checkbox contrast, login policy factors, asset urls (#3742) * checkbox contrast * idp create before remove, add, asset service * login policy events Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * fix(query): show views and failed events (#3743) * fix(system): show views and failed events * fix: set correct database on failed events and views * fix(console): application grid overflow (#3744) * fix: use css grid instead of flex * ellipsis overflow Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * fix(projection): add missing col to idp login policy links (#3745) * fix(projection): add missing col to projection * refactor: method naming * fix(console): get idps from login policy, add policy if not existent (#3746) * fix: return correct empty flow if not found (#3749) * feat: get current label and privacy policies (#3748) * chore(console): dependencies (#3730) * cli, core * material, cdk * chore(deps-dev): bump karma-jasmine-html-reporter from 1.7.0 to 2.0.0 in /console (#3722) chore(deps-dev): bump karma-jasmine-html-reporter in /console Bumps [karma-jasmine-html-reporter](https://github.com/dfederm/karma-jasmine-html-reporter) from 1.7.0 to 2.0.0. - [Release notes](https://github.com/dfederm/karma-jasmine-html-reporter/releases) - [Commits](https://github.com/dfederm/karma-jasmine-html-reporter/compare/v1.7.0...v2.0.0) --- updated-dependencies: - dependency-name: karma-jasmine-html-reporter dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump @typescript-eslint/parser from 5.25.0 to 5.26.0 in /console (#3717) chore(deps-dev): bump @typescript-eslint/parser in /console Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.25.0 to 5.26.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.26.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump libphonenumber-js from 1.10.4 to 1.10.6 in /console (#3716) Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.10.4 to 1.10.6. - [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags) - [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md) - [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.10.4...v1.10.6) --- updated-dependencies: - dependency-name: libphonenumber-js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * jasmine * lock Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: compatibility for cockroach v22.1 (#3754) * fix: compatability for cockroach v22.1 * update cr version in docs and compose * bind dev cockroach to 127.0.0.1 * Revert "bind dev cockroach to 127.0.0.1" This reverts commit 1c7c6304ae6682801f8475a8eac91569442b6b8d. * remove --listen-addr flag * use v2.0.0-v2-alpha.16 * use v2.0.0-v2-alpha.17 Co-authored-by: Elio Bischof <eliobischof@gmail.com> * fix: render only base language in html (#3759) * fix: sql error check (#3762) * docs: Docs v2 (#3733) * fix: change images * fix: change images, add policies * fix: change images, add policies * docs: add customer portal docs * docs: add customer portal docs * docs: add customer portal docs * docs: add customer portal docs * docs: organization creation * docs: policy docs * docs: change password * docs: verify domain * docs: profile page * docs: profile page * docs: profile page * docs: login page * docs: login page * docs: fix broken links * docs: customer portal users * docs: instance detail * docs: instance detail * docs: getting started * Update organizations.mdx Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix(console, login): Idp detail and create layout optimization, login - sub formfield link spacing (#3755) * idp detail, create layout * fat finger fix Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: handle default org id (#3769) * fix: update user sessions after avatar or primary domain change (#3768) * fix: grpc gateway interceptors (#3767) * fix: improve oidc issuer / endpoints (#3753) * fix: improve oidc issuer / endpoints * docs: update endpoints * fix(console): datepicker, formfield cleanup, member role help, domain layout (#3765) * key datepicker, formfield cleanup, member role help, domain layout * accounts card template overlay * fix account card trigger * chore(deps-dev): bump @typescript-eslint/parser from 5.26.0 to 5.27.0 in /console (#3752) chore(deps-dev): bump @typescript-eslint/parser in /console Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.26.0 to 5.27.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.27.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps, i18n, feature info section * lint Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(console, login): console - ensure permission is available, login - i18n fixes, input borders, lgn-touched script to add class on blur (#3760) * permission restriction, member, login i18n input borders, secondary text * add touched js * test: ensure consistency of TestSpooler_awaitError (#3750) * docs: add gitlab and auth0 (#3700) * docs: add gitlab and auth0 * Apply suggestions from code review * fix wrong domain * Apply suggestions from code review Co-authored-by: mffap <mpa@zitadel.com> * fix redirect-uris * typos * replace image wip * smaller typos * Update docs/docs/guides/basics/applications.mdx Co-authored-by: mffap <mpa@zitadel.com> * Update docs/docs/guides/basics/applications.mdx Co-authored-by: mffap <mpa@zitadel.com> Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> Co-authored-by: mffap <mpa@zitadel.com> Co-authored-by: Maximilian Panne <mpa@caos.ch> Co-authored-by: Livio Spring <livio.a@gmail.com> * feat: return instance domains on list instances, fix: login policy and avatar url in oidc responses (#3785) * feat: return instance domains on list instances * fix: filter login policy idps correctly * remove debug * fix: absolute avatar url in oidc responses * fix: allow project grants without roles in database (#3786) * fix: password check policy correctly (#3787) * fix: password check policy correctly * fix: password check policy correctly * docs: Identity providers and customer portal (#3790) * docs: identity provider and customer portal page * docs: identity provider and customer portal page * docs: identity provider and customer portal page * docs: urls * fix: add smtp config, remove smtp and sms provider, console adaptations (#3792) * fix: add AddSMTPConfig to admin api * addsmtpconfig * fix: add RemoveSMTPConfig and RemoveSMSProvider to admin api * update twilio, token fcn * fix account switcher, twilio token set, cleanup dialog * cleanup * buttons Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix(console, login): label policy and privacy policy from authservice, login - remove double footer element, mobile (#3795) fix: cnsl auth policy, lgn footer mobile * docs: change architecture graphic (#3794) * fix(console): configWithPrompt cleanup (#3796) * fix: configWithPrompt cleanup * code dialog text Co-authored-by: Livio Spring <livio.a@gmail.com> * fix: set instanceID correctly in org project mapping (#3789) * fix: idp styling (#3797) * fix: idp styling * escape idp a color * elevation on hover * css gen Co-authored-by: Max Peintner <max@caos.ch> * fix: allow env vars to override setup defaults (#3800) * fix: sms providers (#3801) * fix(login): idp, link font color (#3814) fix: idp, a font color * fix(console): remove basepath from statehandler (#3815) fix: remove basepath from statehandler * 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 <livio.a@gmail.com> Co-authored-by: Max Peintner <max@caos.ch> * fix(system): search for existing domain globally (#3822) * docs(legal): Updated agreements and policies v2 (#3823) * tos * adds cloud service * cloud service description WIP * action minute * service level description * SAML and last revised * tos credit and payment * dpa basic, profile, and payment data * service description: authenticated requests * cloud service description: ui * add notification box * sla description * support services * removes dedicated instance annex * remove dedicated instance annex sidebar, links * update dedicated terms * merge additional terms in sidebar * privacy formatting * pp update piid table * remove cloudflare cookies * privacy customer portal cookies * revert editing guides * dates * docs: test * modification of services * Apply suggestions from code review Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * add disclaimer to regions list Co-authored-by: Maximilian Panne <mpa@caos.ch> Co-authored-by: Maximilian Panne <maximilian.panne@gmail.com> Co-authored-by: mffap <mpa@zitadel.com> * fix(notify): fail if required fields are empty (#3831) * fix(login): text color for idp, footer (#3830) Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * fix(auth): read user if not found after create (#3835) * fix(notify): correct get user (#3836) * feat: enable insecure console for custom domains (#3819) * fix: enable insecure console * Revert "fix: enable insecure console" This reverts commit e6c10ae937a04e14da9aede4ef1b1ea9b16612d1. * don't require HTTPS for non-localhost domains Co-authored-by: Max Peintner <max@caos.ch> * docs: update ZITADEL cloud readme (#3849) * docs: update ZITADEL cloud readme * Update README.md * Update README.md Co-authored-by: mffap <mpa@zitadel.com> Co-authored-by: mffap <mpa@zitadel.com> * docs: add curl for introspection_endpoint with basic auth (#3851) * docs: update api introduction (#3781) * fix: update oidc pkg (state and redirect_uri handling) (#3853) * chore(console): add customer portal link (#3837) * feat: add customer portal link * add customer portal to environment.json from backend Co-authored-by: Livio Amstutz <livio.a@gmail.com> * feat: TLS support (#3862) * feat: TLS support * add comment * fix comment * chore: set tleMode disabled in docker compose (#3865) * chore(docs): fix typo (#3866) * fix: primary domain scope (handle context correctly) (#3872) * feat: provide instance info on admin api and return version on instances responses (admin and system api) (#3802) * feat: provide instance info on admin api and return version on instances responses (admin and system api) * fix GetMyInstance * fix: enable env vars in setup steps (and deprecate admin subcommand) (#3871) * fix: enable env vars in setup steps (and deprecate admin subcommand) * fix tests and error text * chore(console): angular 14 (#3799) * eslint schematics * cli, core migrations * material * schematics * ng-qrcode update * fix input, formfield errorstatemixin * other packages * downgrade codemirror * codemirror * @next of alphas Co-authored-by: Livio Spring <livio.a@gmail.com> * docs(installation): improve guides (#3817) * split config descriptions * install and configure * custom domains * typo * remove comments * try compose with secure crdb * secure crdb with compose * describe ExternalSecure restriction * add near production example * add login credentials * fix configure compose * make the docs more transparent * name archive amd64 * Revert "name archive amd64" This reverts commit 0d4dae551b47e6bc7584a27a05f290ae92648966. * fix download url * extract archives * fix dawin download * fix start zitadel commands * add helm installation docs * remove windows * make downloaded files description friendlier * link to github raw * link login process * remove healthcheck from compose * remove compose healthchecks * use --tlsMode external for lb example * uname -i * disable tls mode locally * Update docs/docs/guides/installation/get-started/macos.mdx Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> * docs(guides): user metadata (#3838) * docs(guides): user metadata * add python * export to BASIC_AUTH * add js * add alternative with id_token * fix img path * adds reserved scopes, and info about opaque token * Apply suggestions from code review Co-authored-by: Elio Bischof <eliobischof@gmail.com> * Apply suggestions from code review Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Maximilian Panne <mpa@caos.ch> Co-authored-by: Elio Bischof <eliobischof@gmail.com> * docs(installation): knative (#3860) * added initial knative docu * added menu bar * simplified installation * normalized versions to latest * update envs * update envs * Update zitadel-knative-service.yaml * Update knative.mdx * Update knative.mdx * move knative into correct folder Co-authored-by: Livio Spring <livio.a@gmail.com> * docs(installation): fix overview items (#3880) * docs(installation): fix overview items * installation after getting started * fix broken links * fix broken links * fix broken link * docs(installation): fix guides (#3878) * docs(installation): download traefik config * docs(installation): remove unnecessary zitadel user certs * docs(installation): fix broken link (#3883) * docs: edit instance docs (#3885) * chore: contributing console Co-authored-by: Livio Amstutz <livio.a@gmail.com> Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Silvan <silvan.reusser@gmail.com> Co-authored-by: mffap <mpa@zitadel.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Maximilian Panne <mpa@caos.ch> Co-authored-by: Maximilian Panne <maximilian.panne@gmail.com> Co-authored-by: Nicolas Hedger <649677+nhedger@users.noreply.github.com> Co-authored-by: Christian Jakob <47860090+thesephirot@users.noreply.github.com> * describe local frontend development * finish local frontend dev * ignore environment.json * redirect environment.json to file * add context and teardown information * omit installation of dev dependencies * unskip remove project tests * build base image * use network_mode host for e2e container * quote uid * add backend contribution guide * typo * note on cypress xserver with wsl2 * add links * build custom cypress image * remove --help * Revert "remove --help" This reverts commit 14b50bc48b21438c2c844548d087632f34c7892d. * Revert "build custom cypress image" This reverts commit bc2caaac9ceea361554d30e95863b44c7ccaad68. * remove dot * Update CONTRIBUTING.md Co-authored-by: Florian Forster <florian@zitadel.com> Co-authored-by: Maximilian Panne <mpa@caos.ch> Co-authored-by: Florian Forster <florian@caos.ch> Co-authored-by: Max Peintner <max@caos.ch> Co-authored-by: Livio Amstutz <livio.a@gmail.com> Co-authored-by: Fabi <38692350+hifabienne@users.noreply.github.com> Co-authored-by: Silvan <silvan.reusser@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Nicolas Hedger <649677+nhedger@users.noreply.github.com> Co-authored-by: Christian Jakob <47860090+thesephirot@users.noreply.github.com> Co-authored-by: Florian Forster <florian@zitadel.com>
This commit is contained in:
parent
64f589c435
commit
dd53f70fd5
2
.github/workflows/test-code.yml
vendored
2
.github/workflows/test-code.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
install-only: true
|
||||
version: v1.8.3
|
||||
- name: Build and Unit Test
|
||||
run: GOOS="linux" GOARCH="amd64" goreleaser build --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel
|
||||
run: GOOS="linux" GOARCH="amd64" goreleaser build --id prod --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel
|
||||
- name: Publish go coverage
|
||||
uses: codecov/codecov-action@v3.1.0
|
||||
with:
|
||||
|
@ -24,7 +24,8 @@ before:
|
||||
- sh -c "cp -r .artifacts/console/* internal/api/ui/console/static/"
|
||||
|
||||
builds:
|
||||
- env:
|
||||
- id: prod
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
@ -35,7 +36,13 @@ builds:
|
||||
- arm64
|
||||
ldflags:
|
||||
-s -w -X github.com/zitadel/zitadel/cmd/build.version={{.Version}} -X github.com/zitadel/zitadel/cmd/build.commit={{.Commit}} -X github.com/zitadel/zitadel/cmd/build.date={{.Date}}
|
||||
|
||||
- id: dev
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
binary: zitadel-debug
|
||||
gcflags: all=-N -l
|
||||
ldflags: ""
|
||||
|
||||
dist: .artifacts/goreleaser
|
||||
|
||||
dockers:
|
||||
@ -47,6 +54,8 @@ dockers:
|
||||
dockerfile: build/Dockerfile
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
ids:
|
||||
- prod
|
||||
- image_templates:
|
||||
- ghcr.io/zitadel/zitadel:{{ .Tag }}-arm64
|
||||
- ghcr.io/zitadel/zitadel:{{ .ShortCommit }}-arm64
|
||||
@ -55,6 +64,8 @@ dockers:
|
||||
dockerfile: build/Dockerfile
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm64"
|
||||
ids:
|
||||
- prod
|
||||
|
||||
docker_manifests:
|
||||
- id: zitadel-latest
|
||||
@ -73,6 +84,8 @@ docker_manifests:
|
||||
|
||||
archives:
|
||||
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
||||
builds:
|
||||
- prod
|
||||
replacements:
|
||||
darwin: Darwin
|
||||
linux: Linux
|
||||
|
277
CONTRIBUTING.md
277
CONTRIBUTING.md
@ -32,64 +32,247 @@ Follow [@zitadel](https://twitter.com/zitadel) on twitter
|
||||
|
||||
## How to contribute
|
||||
|
||||
We strongly recommend to talk to us before you start contributing to streamline our and your work.
|
||||
We strongly recommend to [talk to us](https://zitadel.com/contact) before you start contributing to streamline our and your work.
|
||||
|
||||
We accept contributions through pull requests. You need a github account for that. If you are unfamiliar with git have a look at Github's documentation on [creating forks](https://help.github.com/articles/fork-a-repo) and [creating pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). Please draft the pull request as soon as possible. Go through the following checklist before you submit the final pull request:
|
||||
|
||||
1. Create a feature branch from the `main`-branch
|
||||
1. Make your changes on the new branch
|
||||
1. [Merge](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging) the latest commit of the `main`-branch
|
||||
1. Use [Semantic Release commit messages](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type) to simplify creation of release notes. In the title of the pull request correct tagging is required and will be requested by the reviewers.
|
||||
1. Request a [review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) from one of the authors. The reviewers will provide you feedback and approve your changes as soon as they are satisfied.
|
||||
### Submit a Pull Request (PR)
|
||||
|
||||
1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [zitadel/zitadel](https://github.com/zitadel/zitadel) repository on GitHub
|
||||
2. On your fork, commit your changes to a new branch
|
||||
|
||||
`git checkout -b my-fix-branch main`
|
||||
|
||||
3. Make your changes following the [guidelines](#contribute) in this guide. Make sure that all tests pass.
|
||||
|
||||
4. Commit the changes on the new branch
|
||||
|
||||
`git commit --all`
|
||||
|
||||
5. [Merge](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging) the latest commit of the `main`-branch
|
||||
|
||||
6. Push the changes to your branch on Github
|
||||
|
||||
`git push origin my-fix-branch`
|
||||
|
||||
7. Use [Semantic Release commit messages](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type) to simplify creation of release notes. In the title of the pull request [correct tagging](#commit-messages) is required and will be requested by the reviewers.
|
||||
|
||||
8. On GitHub, [send a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to `zitadel:main`. Request review from one of the maintainers.
|
||||
|
||||
### Reviewing a Pull Request
|
||||
|
||||
The reviewers will provide you feedback and approve your changes as soon as they are satisfied. If we ask you for changes in the code, you can follow the [GitHub Guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request) to incorporate feedback in your pull request.
|
||||
|
||||
<!-- TODO: how to do this via git -->
|
||||
<!-- TODO: change commit message via git -->
|
||||
|
||||
### Commit Messages
|
||||
|
||||
Make sure you use [semantic release messages format](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type).
|
||||
|
||||
`<type>(<scope>): <short summary>`
|
||||
|
||||
#### Type
|
||||
|
||||
Must be one of the following:
|
||||
|
||||
- **feat**: New Feature
|
||||
- **fix**: Bug Fix
|
||||
- **docs**: Documentation
|
||||
|
||||
#### Scope
|
||||
|
||||
This is optional to indicate which component is affected. In doubt, leave blank (`<type>: <short summary>`)
|
||||
|
||||
#### Short Summary
|
||||
|
||||
Provide a brief description of the change.
|
||||
|
||||
## Contribute
|
||||
|
||||
The code consists of the following parts:
|
||||
|
||||
| name | description | language | where to find |
|
||||
|---|---|---|---|
|
||||
| backend | Service that serves the grpc(-web) and RESTful API | [go](https://go.dev) | [API implementation](./internal/api/grpc) |
|
||||
| console | Frontend the user interacts with after he is logged in | [Angular](https://angular.io), [Typescript](https://www.typescriptlang.org) | [./console](./console) |
|
||||
| login | Server side rendered frontend the user interacts with during login | [go](https://go.dev), [go templates](https://pkg.go.dev/html/template) | [./internal/api/ui/login](./internal/api/ui/login) |
|
||||
| API definitions | Specifications of the API | [Protobuf](https://developers.google.com/protocol-buffers) | [./proto/zitadel](./proto/zitadel) |
|
||||
| docs | Project documentation made with docusaurus | [Docusaurus](https://docusaurus.io/) | [./docs](./docs) |
|
||||
| name | description | language | where to find |
|
||||
| --------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------- | -------------------------------------------------- |
|
||||
| backend | Service that serves the grpc(-web) and RESTful API | [go](https://go.dev) | [API implementation](./internal/api/grpc) |
|
||||
| console | Frontend the user interacts with after he is logged in | [Angular](https://angular.io), [Typescript](https://www.typescriptlang.org) | [./console](./console) |
|
||||
| login | Server side rendered frontend the user interacts with during login | [go](https://go.dev), [go templates](https://pkg.go.dev/html/template) | [./internal/api/ui/login](./internal/api/ui/login) |
|
||||
| API definitions | Specifications of the API | [Protobuf](https://developers.google.com/protocol-buffers) | [./proto/zitadel](./proto/zitadel) |
|
||||
| docs | Project documentation made with docusaurus | [Docusaurus](https://docusaurus.io/) | [./docs](./docs) |
|
||||
|
||||
Please validate and test the code before you contribute.
|
||||
|
||||
### Backend / Login
|
||||
|
||||
To keep the code clean and understandable we use [golangci-lint](https://golangci-lint.run). We recommend to format the code with this linter while working on ZITADEL to simplify the review process. The configuration is located [here](./.golangci.yaml).
|
||||
|
||||
To start the backend with a debugger run the [`main.go`-file](./main.go) located in the root of ZITADEL and provide the arguments and env-variables from below. Ensure that the database is running by running `docker compose -f ./build/local/docker-compose.yml up db`. For additional information please use the documentation of your IDE.
|
||||
|
||||
Make sure to use the following configurations:
|
||||
|
||||
TODO document workflow
|
||||
|
||||
### Console
|
||||
|
||||
<!-- TODO: ask maxpe for infos -->
|
||||
|
||||
### API Definitions
|
||||
|
||||
Ensure the provided code meets the [official style guide](https://developers.google.com/protocol-buffers/docs/style).
|
||||
|
||||
The following docker command builds the grpc stub into the correct folders:
|
||||
|
||||
```bash
|
||||
docker build -f build/grpc/Dockerfile -t zitadel-base:local . \
|
||||
&& docker build -f build/zitadel/Dockerfile . -t zitadel-go-base --target go-copy -o .
|
||||
```
|
||||
|
||||
## Contribute Docs
|
||||
|
||||
<!-- TODO: ask maxpe for infos -->
|
||||
|
||||
We add the label "good first issue" for problems we think are a good starting point to contribute to ZITADEL.
|
||||
|
||||
- [Issues for first time contributors](https://github.com/zitadel/zitadel/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
|
||||
- [All issues](https://github.com/zitadel/zitadel/issues)
|
||||
|
||||
|
||||
### Backend / Login
|
||||
|
||||
By executing the commands from this section, you run everything you need to develop the ZITADEL backend locally.
|
||||
Using [Docker Compose](https://docs.docker.com/compose/), you run a [CockroachDB](https://www.cockroachlabs.com/docs/v22.1/start-a-local-cluster-in-docker-mac.html) on your local machine.
|
||||
With [goreleaser](https://opencollective.com/goreleaser), you build a debuggable ZITADEL binary and run it using [delve](https://github.com/go-delve/delve).
|
||||
Then, you test your changes via the console your binary is serving at http://<span because="breaks the link"></span>localhost:8080 and by verifying the database.
|
||||
Once you are happy with your changes, you run end-to-end tests and tear everything down.
|
||||
|
||||
The commands in this section are tested against the following software versions:
|
||||
- [Docker version 20.10.17](https://docs.docker.com/engine/install/)
|
||||
- [Goreleaser version v1.8.3](https://goreleaser.com/install/)
|
||||
- [Go version 1.19](https://go.dev/doc/install)
|
||||
- [Delve 1.9.1](https://github.com/go-delve/delve/tree/v1.9.1/Documentation/installation)
|
||||
|
||||
<!-- TODO: Describe linting (@adlerhurst) -->
|
||||
|
||||
Make some changes to the source code, then run the database locally.
|
||||
|
||||
```bash
|
||||
# You just need the db service to develop the backend against.
|
||||
docker compose --file ./e2e/docker-compose.yaml up --detach db
|
||||
```
|
||||
|
||||
Build the binary. This takes some minutes, but you can speed up rebuilds.
|
||||
|
||||
```bash
|
||||
# You just need goreleasers build part (--snapshot) and you just need to target your current platform (--single-target)
|
||||
goreleaser build --id dev --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel
|
||||
```
|
||||
|
||||
> Note: With this command, several steps are executed.
|
||||
> For speeding up rebuilds, you can reexecute only specific steps you think are necessary based on your changes.
|
||||
> Generating gRPC stubs: `DOCKER_BUILDKIT=1 docker build -f build/zitadel/Dockerfile . --target go-copy -o .`
|
||||
> Running unit tests: `DOCKER_BUILDKIT=1 docker build -f build/zitadel/Dockerfile . --target go-codecov`
|
||||
> Generating the console: `DOCKER_BUILDKIT=1 docker build -f build/console/Dockerfile . -t zitadel-npm-console --target angular-export -o internal/api/ui/console/static/`
|
||||
> Build the binary: `goreleaser build --id dev --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel --skip-before`
|
||||
|
||||
You can now run and debug the binary in .artifacts/zitadel/zitadel using your favourite IDE, for example GoLand.
|
||||
You can test if ZITADEL does what you expect by using the UI at http://localhost:8080/ui/console.
|
||||
Also, you can verify the data by running `cockroach sql --database zitadel --insecure` and running SQL queries.
|
||||
|
||||
As soon as you are ready to battle test your changes, run the end-to-end tests.
|
||||
|
||||
```bash
|
||||
# Build the production binary (unit tests are executed, too)
|
||||
goreleaser build --id prod --snapshot --single-target --rm-dist --output .artifacts/zitadel/zitadel
|
||||
|
||||
# Pack the binary into a docker image
|
||||
DOCKER_BUILDKIT=1 docker build --file build/Dockerfile .artifacts/zitadel -t zitadel:local
|
||||
|
||||
# Run the tests
|
||||
ZITADEL_IMAGE=zitadel:local docker compose --file ./e2e/docker-compose.yaml run e2e
|
||||
```
|
||||
|
||||
When you are happy with your changes, you can cleanup your environment.
|
||||
|
||||
```bash
|
||||
# Stop and remove the docker containers for zitadel and the database
|
||||
docker compose --file ./e2e/docker-compose.yaml down
|
||||
```
|
||||
|
||||
### Console
|
||||
|
||||
By executing the commands from this section, you run everything you need to develop the console locally.
|
||||
Using [Docker Compose](https://docs.docker.com/compose/), you run [CockroachDB](https://www.cockroachlabs.com/docs/v22.1/start-a-local-cluster-in-docker-mac.html) and the [latest release of ZITADEL](https://github.com/zitadel/zitadel/releases/latest) on your local machine.
|
||||
You use the ZITADEL container as backend for your console.
|
||||
The console is run in your [Node](https://nodejs.org/en/about/) environment using [a local development server for Angular](https://angular.io/cli/serve#ng-serve), so you have fast feedback about your changes.
|
||||
Once you are happy with your changes, you run end-to-end tests and tear everything down.
|
||||
|
||||
The commands in this section are tested against the following software versions:
|
||||
|
||||
- [Docker version 20.10.17](https://docs.docker.com/engine/install/)
|
||||
- [Node version v16.17.0](https://nodejs.org/en/download/)
|
||||
- [npm version 8.18.0](https://docs.npmjs.com/try-the-latest-stable-version-of-npm)
|
||||
- [Cypress runtime dependencies](https://docs.cypress.io/guides/continuous-integration/introduction#Dependencies)
|
||||
- [curl version 7.58.0](https://curl.se/download.html)
|
||||
|
||||
<details>
|
||||
<summary>Note for WSL2 on Windows 10</summary>
|
||||
Following the suggestions <a href="https://stackoverflow.com/questions/62641553/setup-cypress-on-wsl-ubuntu-for-windows-10">here </a> subsequently <a href="https://github.com/microsoft/WSL/issues/4106">here </a> may need to XLaunch and configure your DISPLAY variable. Use at your own risk.
|
||||
|
||||
1. Install `VcXsrv Windows X Server`
|
||||
2. Set the target of your shortcut to `"C:\Program Files\VcXsrv\xlaunch.exe" -ac`
|
||||
3. In WSL2 run `export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0` to set your DISPLAY variable
|
||||
4. When starting XLaunch, make sure to disable access control
|
||||
</details>
|
||||
|
||||
Run the database and the latest backend locally.
|
||||
|
||||
```bash
|
||||
# Change to the console directory
|
||||
cd ./console
|
||||
|
||||
# You just need the db and the zitadel services to develop the console against.
|
||||
docker compose --file ../e2e/docker-compose.yaml up --detach db zitadel
|
||||
```
|
||||
|
||||
When the backend is ready, you have the latest zitadel exposed at http://localhost:8080.
|
||||
You can now run a local development server with live code reloading at http://localhost:4200.
|
||||
To allow console access via http://localhost:4200, you have to configure the ZITADEL backend.
|
||||
|
||||
1. Navigate to http://localhost:8080/ui/console/projects.
|
||||
2. When prompted, login with *zitadel-admin@<span because="breaks the mailto"></span>zitadel.localhost* and *Password1!*
|
||||
3. Select the *ZITADEL* project.
|
||||
3. Select the *Console* application.
|
||||
4. Select *Redirect Settings*
|
||||
5. Add *http://<span because="breaks the link"></span>localhost:4200/auth/callback* to the *Redirect URIs*
|
||||
6. Add *http://<span because="breaks the link"></span>localhost:4200/signedout* to the *Post Logout URIs*
|
||||
7. Select the *Save* button
|
||||
|
||||
You can run the local console development server now.
|
||||
|
||||
```bash
|
||||
# Console loads its target environment from the file console/src/assets/environment.json.
|
||||
# Load it from the backend.
|
||||
curl http://localhost:8080/ui/console/assets/environment.json > ./src/assets/environment.json
|
||||
|
||||
# Generate source files from Protos
|
||||
npm run generate
|
||||
|
||||
# Install npm dependencies
|
||||
npm install
|
||||
|
||||
# Start the server
|
||||
npm start
|
||||
```
|
||||
|
||||
Navigate to http://localhost:4200/.
|
||||
Make some changes to the source code and see how the browser is automatically updated.
|
||||
After making changes to the code, you should run the end-to-end-tests.
|
||||
Open another shell.
|
||||
|
||||
```bash
|
||||
# Change to the e2e directory
|
||||
cd .. && cd e2e/
|
||||
|
||||
# Install npm dependencies
|
||||
npm install
|
||||
|
||||
# Run all tests in a headless browser
|
||||
npm run e2e:dev
|
||||
```
|
||||
|
||||
You can also open the test suite interactively for fast success feedback on specific tests.
|
||||
|
||||
```bash
|
||||
# Run all tests in a headless browser
|
||||
npm run open:dev
|
||||
```
|
||||
|
||||
When you are happy with your changes, you can cleanup your environment
|
||||
|
||||
```bash
|
||||
# Stop and remove the docker containers for zitadel and the database
|
||||
docker compose down
|
||||
```
|
||||
|
||||
## Contribute Docs
|
||||
|
||||
Project documentation is made with docusaurus and is located under [./docs](./docs).
|
||||
Please refer to the [README](./docs/README.md) for more information and local testing.
|
||||
|
||||
When making a pull request use `docs(<scope>): <short summary>` as title for the semantic release.
|
||||
Scope can be left empty (omit the brackets) or refer to the top navigation sections.
|
||||
|
||||
## Contribute Internationalization
|
||||
|
||||
ZITADEL loads translations from four files:
|
||||
@ -101,16 +284,6 @@ ZITADEL loads translations from four files:
|
||||
|
||||
You may edit the texts in these files or create a new file for additional language support. Make sure you set the locale (ISO 639-1 code) as the name of the new language file.
|
||||
|
||||
### Make a PR
|
||||
|
||||
If you like to contribute fork the ZITADEL repository. After you implemented the new feature create a PullRequest in the ZITADEL repository.
|
||||
|
||||
Make sure you use semantic release:
|
||||
|
||||
- feat: New Feature
|
||||
- fix: Bug Fix
|
||||
- docs: Documentation
|
||||
|
||||
## Want to start ZITADEL?
|
||||
|
||||
You can find an installation guide for all the different environments here:
|
||||
|
@ -6,7 +6,8 @@
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"prodbuild": "ng build --configuration production --base-href=/ui/console/",
|
||||
"lint": "ng lint && stylelint './src/**/*.scss' --syntax scss"
|
||||
"lint": "ng lint && stylelint './src/**/*.scss' --syntax scss",
|
||||
"generate": "DOCKER_BUILDKIT=1 docker build -f ../build/grpc/Dockerfile -t zitadel-base:local .. && DOCKER_BUILDKIT=1 docker build -f ../build/console/Dockerfile .. --target npm-copy -o .."
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="max-width-container">
|
||||
<div class="home-wrapper enlarged-container">
|
||||
<div class="header">
|
||||
<h1 class="title">{{ 'HOME.WELCOME' | translate }}</h1>
|
||||
<h1 class="title" data-e2e="authenticated-welcome">{{ 'HOME.WELCOME' | translate }}</h1>
|
||||
</div>
|
||||
|
||||
<cnsl-shortcuts></cnsl-shortcuts>
|
||||
|
@ -17,11 +17,12 @@ export default defineConfig({
|
||||
defaultCommandTimeout: 10000,
|
||||
|
||||
env: {
|
||||
ORGANIZATION: process.env.CYPRESS_ORGANIZATION || 'zitadel'
|
||||
ORGANIZATION: process.env.CYPRESS_ORGANIZATION || 'zitadel',
|
||||
BACKEND_URL: process.env.CYPRESS_BACKEND_URL || baseUrl().replace("/ui/console", "")
|
||||
},
|
||||
|
||||
e2e: {
|
||||
baseUrl: process.env.CYPRESS_BASE_URL || 'http://localhost:8080',
|
||||
baseUrl: baseUrl(),
|
||||
experimentalSessionAndOrigin: true,
|
||||
setupNodeEvents(on, config) {
|
||||
|
||||
@ -39,3 +40,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
function baseUrl(){
|
||||
return process.env.CYPRESS_BASE_URL || 'http://localhost:8080/ui/console'
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ describe('applications', () => {
|
||||
apiAuth().then(api => {
|
||||
ensureProjectExists(api, testProjectName).then(projectID => {
|
||||
ensureProjectResourceDoesntExist(api, projectID, Apps, testAppName).then(() => {
|
||||
cy.visit(`/ui/console/projects/${projectID}`)
|
||||
cy.visit(`/projects/${projectID}`)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
import { loginname } from "../../support/login/users";
|
||||
|
||||
describe.skip("humans", () => {
|
||||
const humansPath = `/ui/console/users?type=human`;
|
||||
const humansPath = `/users?type=human`;
|
||||
const testHumanUserNameAdd = "e2ehumanusernameadd";
|
||||
const testHumanUserNameRemove = "e2ehumanusernameremove";
|
||||
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
import { loginname } from "../../support/login/users";
|
||||
|
||||
describe.skip("machines", () => {
|
||||
const machinesPath = `/ui/console/users?type=machine`;
|
||||
const machinesPath = `/users?type=machine`;
|
||||
const testMachineUserNameAdd = "e2emachineusernameadd";
|
||||
const testMachineUserNameRemove = "e2emachineusernameremove";
|
||||
|
||||
|
@ -24,7 +24,7 @@ describe.skip('permissions', () => {
|
||||
beforeEach(()=> {
|
||||
apiAuth().then((api)=> {
|
||||
ensureProjectResourceDoesntExist(api, projectId, Roles, testRoleName)
|
||||
cy.visit(`/ui/console/projects/${projectId}?id=roles`)
|
||||
cy.visit(`/projects/${projectId}?id=roles`)
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -14,7 +14,7 @@ describe("projects", () => {
|
||||
apiAuth().then((api) => {
|
||||
ensureProjectDoesntExist(api, testProjectNameCreate);
|
||||
});
|
||||
cy.visit(`/ui/console/projects`);
|
||||
cy.visit(`/projects`);
|
||||
});
|
||||
|
||||
it("should add a project", () => {
|
||||
@ -27,13 +27,13 @@ describe("projects", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe.skip("remove project", () => {
|
||||
describe("remove project", () => {
|
||||
describe("list view", () => {
|
||||
beforeEach("ensure it exists", () => {
|
||||
apiAuth().then((api) => {
|
||||
ensureProjectExists(api, testProjectNameDeleteList);
|
||||
});
|
||||
cy.visit(`/ui/console/projects`);
|
||||
cy.visit(`/projects`);
|
||||
});
|
||||
|
||||
it("removes the project", () => {
|
||||
@ -42,7 +42,7 @@ describe("projects", () => {
|
||||
cy.contains("tr", testProjectNameDeleteList, { timeout: 1000 })
|
||||
.find('[data-e2e="delete-project-button"]')
|
||||
.click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').type(
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().type(
|
||||
testProjectNameDeleteList
|
||||
);
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
@ -57,7 +57,7 @@ describe("projects", () => {
|
||||
apiAuth().then((api) => {
|
||||
ensureProjectExists(api, testProjectNameDeleteGrid);
|
||||
});
|
||||
cy.visit(`/ui/console/projects`);
|
||||
cy.visit(`/projects`);
|
||||
});
|
||||
|
||||
it("removes the project", () => {
|
||||
@ -65,7 +65,7 @@ describe("projects", () => {
|
||||
.find('[data-e2e="delete-project-button"]')
|
||||
.trigger("mouseover")
|
||||
.click();
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').type(
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().type(
|
||||
testProjectNameDeleteGrid
|
||||
);
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
|
@ -4,7 +4,7 @@ import { login, User } from "../../support/login/users";
|
||||
|
||||
describe("login policy", ()=> {
|
||||
|
||||
const orgPath = `/ui/console/org`
|
||||
const orgPath = `/org`
|
||||
|
||||
;[User.OrgOwner].forEach(user => {
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { login, User } from "../../support/login/users";
|
||||
|
||||
describe("password complexity", ()=> {
|
||||
|
||||
const orgPath = `/ui/console/org`
|
||||
const orgPath = `/org`
|
||||
const testProjectName = 'e2eproject'
|
||||
|
||||
;[User.OrgOwner].forEach(user => {
|
||||
|
@ -3,7 +3,7 @@ import { Policy, resetPolicy } from '../../support/api/policies';
|
||||
import { login, User } from '../../support/login/users';
|
||||
|
||||
describe('private labeling', () => {
|
||||
const orgPath = `/ui/console/org`;
|
||||
const orgPath = `/org`;
|
||||
|
||||
[User.OrgOwner].forEach((user) => {
|
||||
describe(`as user "${user}"`, () => {
|
||||
|
@ -9,7 +9,7 @@ export function apiAuth(): Cypress.Chainable<apiCallProperties> {
|
||||
return login(User.IAMAdminUser, 'Password1!', false, true).then(token => {
|
||||
return <apiCallProperties>{
|
||||
authHeader: `Bearer ${token}`,
|
||||
mgntBaseURL: `/management/v1/`,
|
||||
mgntBaseURL: `${Cypress.env("BACKEND_URL")}/management/v1/`,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -22,95 +22,20 @@ export function login(
|
||||
|
||||
const loginUrl: string = '/ui/login';
|
||||
const issuerUrl: string = '/oauth/v2';
|
||||
const otherZitadelIdpInstance: boolean = Cypress.env('otherZitadelIdpInstance');
|
||||
|
||||
return cy.session(
|
||||
creds.username,
|
||||
() => {
|
||||
const cookies = new Map<string, string>();
|
||||
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'GET',
|
||||
url: `${loginUrl}*`,
|
||||
times: 1,
|
||||
},
|
||||
(req) => {
|
||||
req.headers['cookie'] = requestCookies(cookies);
|
||||
req.continue((res) => {
|
||||
updateCookies(res.headers['set-cookie'] as string[], cookies);
|
||||
});
|
||||
},
|
||||
).as('login');
|
||||
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'POST',
|
||||
url: `${loginUrl}/loginname*`,
|
||||
times: 1,
|
||||
},
|
||||
(req) => {
|
||||
req.headers['cookie'] = requestCookies(cookies);
|
||||
req.continue((res) => {
|
||||
updateCookies(res.headers['set-cookie'] as string[], cookies);
|
||||
});
|
||||
},
|
||||
).as('loginName');
|
||||
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'POST',
|
||||
url: `${loginUrl}/password*`,
|
||||
times: 1,
|
||||
},
|
||||
(req) => {
|
||||
req.headers['cookie'] = requestCookies(cookies);
|
||||
req.continue((res) => {
|
||||
updateCookies(res.headers['set-cookie'] as string[], cookies);
|
||||
});
|
||||
},
|
||||
).as('password');
|
||||
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'GET',
|
||||
url: `${loginUrl}/success*`,
|
||||
times: 1,
|
||||
},
|
||||
(req) => {
|
||||
req.headers['cookie'] = requestCookies(cookies);
|
||||
req.continue((res) => {
|
||||
updateCookies(res.headers['set-cookie'] as string[], cookies);
|
||||
});
|
||||
},
|
||||
).as('success');
|
||||
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'GET',
|
||||
url: `${issuerUrl}/authorize/callback*`,
|
||||
times: 1,
|
||||
},
|
||||
(req) => {
|
||||
req.headers['cookie'] = requestCookies(cookies);
|
||||
req.continue((res) => {
|
||||
updateCookies(res.headers['set-cookie'] as string[], cookies);
|
||||
});
|
||||
},
|
||||
).as('callback');
|
||||
|
||||
cy.intercept(
|
||||
{
|
||||
method: 'GET',
|
||||
url: `${issuerUrl}/authorize*`,
|
||||
times: 1,
|
||||
},
|
||||
(req) => {
|
||||
req.continue((res) => {
|
||||
updateCookies(res.headers['set-cookie'] as string[], cookies);
|
||||
});
|
||||
},
|
||||
);
|
||||
cy.intercept({
|
||||
times: 6
|
||||
}, req => {
|
||||
req.headers['cookie'] = requestCookies(cookies);
|
||||
req.continue((res) => {
|
||||
updateCookies(res.headers['set-cookie'] as string[], cookies);
|
||||
});
|
||||
})
|
||||
|
||||
let userToken: string
|
||||
cy.intercept({
|
||||
@ -122,14 +47,18 @@ export function login(
|
||||
)
|
||||
}).as('token')
|
||||
|
||||
cy.intercept({
|
||||
method: 'POST',
|
||||
url: `${loginUrl}/password*`,
|
||||
times: 1,
|
||||
}).as('password');
|
||||
|
||||
cy.visit(loginUrl, { retryOnNetworkFailure: true });
|
||||
|
||||
otherZitadelIdpInstance && cy.wait('@login');
|
||||
onUsernameScreen ? onUsernameScreen() : null;
|
||||
cy.get('#loginName').type(creds.username);
|
||||
cy.get('#submit-button').click();
|
||||
|
||||
otherZitadelIdpInstance && cy.wait('@loginName');
|
||||
onPasswordScreen ? onPasswordScreen() : null;
|
||||
cy.get('#password').type(creds.password);
|
||||
cy.get('#submit-button').click();
|
||||
@ -153,9 +82,7 @@ export function login(
|
||||
|
||||
onAuthenticated ? onAuthenticated() : null;
|
||||
|
||||
otherZitadelIdpInstance && cy.wait('@callback');
|
||||
|
||||
cy.location('pathname', { timeout: 5 * 1000 }).should('eq', '/ui/console/');
|
||||
cy.get("[data-e2e=authenticated-welcome]");
|
||||
},
|
||||
{
|
||||
validate: () => {
|
||||
|
@ -2,8 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"target": "es5",
|
||||
"lib": ["es5", "dom"],
|
||||
"types": ["cypress"]
|
||||
"lib": ["es5", "dom", "es2015"],
|
||||
"types": ["cypress", "node"]
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
|
@ -3,30 +3,26 @@ version: '3.8'
|
||||
services:
|
||||
zitadel:
|
||||
restart: 'always'
|
||||
networks:
|
||||
- 'zitadel'
|
||||
image: '${ZITADEL_IMAGE:-ghcr.io/zitadel/zitadel:latest}'
|
||||
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled'
|
||||
environment:
|
||||
ZITADEL_DATABASE_COCKROACH_HOST: db
|
||||
ZITADEL_EXTERNALSECURE: false
|
||||
ZITADEL_EXTERNALDOMAIN: zitadel
|
||||
ZITADEL_FIRSTINSTANCE_CUSTOMDOMAIN: zitadel
|
||||
ZITADEL_DATABASE_COCKROACH_HOST: db
|
||||
|
||||
depends_on:
|
||||
db:
|
||||
condition: 'service_healthy'
|
||||
ports:
|
||||
- '8080:8080'
|
||||
networks:
|
||||
- zitadel
|
||||
|
||||
db:
|
||||
restart: 'always'
|
||||
networks:
|
||||
- 'zitadel'
|
||||
image: 'cockroachdb/cockroach:v22.1.0'
|
||||
command: 'start-single-node --insecure'
|
||||
command: 'start-single-node --insecure --http-addr :9090'
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9090/health?ready=1"]
|
||||
interval: '10s'
|
||||
timeout: '30s'
|
||||
retries: 5
|
||||
@ -34,18 +30,19 @@ services:
|
||||
ports:
|
||||
- '9090:8080'
|
||||
- '26257:26257'
|
||||
networks:
|
||||
- zitadel
|
||||
|
||||
npm-install:
|
||||
image: node:18-alpine3.15
|
||||
working_dir: /e2e
|
||||
user: "$UID"
|
||||
volumes:
|
||||
- .:/e2e
|
||||
command: "npm ci"
|
||||
command: "npm ci --omit=dev"
|
||||
|
||||
e2e:
|
||||
image: cypress/included:10.3.0
|
||||
environment:
|
||||
CYPRESS_BASE_URL: http://zitadel:8080
|
||||
depends_on:
|
||||
zitadel:
|
||||
condition: 'service_started'
|
||||
@ -54,10 +51,10 @@ services:
|
||||
npm-install:
|
||||
condition: 'service_completed_successfully'
|
||||
working_dir: /e2e
|
||||
user: "$UID"
|
||||
volumes:
|
||||
- .:/e2e
|
||||
networks:
|
||||
- zitadel
|
||||
network_mode: host
|
||||
|
||||
networks:
|
||||
zitadel:
|
||||
|
690
e2e/package-lock.json
generated
690
e2e/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -2,14 +2,20 @@
|
||||
"name": "zitadel-e2e",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"start": "npx cypress open",
|
||||
"run": "npx cypress run"
|
||||
},
|
||||
"open": "npx cypress open",
|
||||
"e2e": "npx cypress run",
|
||||
"open:dev": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 npm run open",
|
||||
"e2e:dev": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 npm run e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"mochawesome": "^7.1.3",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.7.13",
|
||||
"cypress": "^10.3.0"
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"target": "es5",
|
||||
"lib": ["es5", "dom"],
|
||||
"types": ["cypress"]
|
||||
"lib": ["es5", "dom", "es2015"],
|
||||
"types": ["cypress", "node"]
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user