Commit graph

57 commits

Author SHA1 Message Date
renovate[bot]
1afe0ec73a
Update dependency @theguild/prettier-config to v1 (#676)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-11-24 10:00:41 +00:00
Kamil Kisiela
2745d5d8d2
Log version id when sending schema change notification (#666) 2022-11-22 14:53:34 +00:00
Kamil Kisiela
73adb11a20
Use null when token is not found (#658) 2022-11-21 17:23:22 +01:00
Kamil Kisiela
935cc59f6a
Do not capture GraphQLError exceptions (#653) 2022-11-15 09:21:30 +00:00
Laurin Quast
bf11f56469
enable organization <-> oidc linking feature (#605) 2022-11-07 11:51:01 +01:00
Kamil Kisiela
849da7bc53
Cut short all tokens that are not 32 chars long in TokenStorage (#600) 2022-11-04 13:45:47 +01:00
Laurin Quast
991c82693b
feat: OIDC organisation integration (#524)
* feat: support login via okta

* add deployment config

* feat: automatically start okta login when visiting /auth with okta provider query parameter

* remove trailing slash from base url

* laurin pls

* ...

* adjust deployment url

* we dont need this

* docs: document how to enabled Google and GitHub social login (#511)

* docs: document how to enabled Google and GitHub social login

* Apply suggestions from code review

* Apply suggestions from code review

* docs: add Okta instructions

* fix typo

* add database migration

* feat: env decoding

* auto generate id

* add generates types for the postgres table

* implement crud graphql fields for the oidc integration entites

* add unique constraint for the oidc domain column

* use correct sql query for updating an oidc integration

* return organization from deleteOIDCIntegration ok result

* add crud forms to the settings page

* update integration test fixture value

* drop unique constraint for oidc_integrations.domain as this would allow a malicous user to block another account from using a domain

* move notice to isolated component

* apply url normalization in a central place

* implement supertokens provider and overrides for dynamic oidc provider integrations

* relocate code to correct files

* prettify oidc crud forms

* replace Query.isOIDCIntegrationFeatureEnabled with the Organization.viewerCanManageOIDCIntegration field

* do not show oidc integrations for personal organizations + disable crud endpoints if the feature is disabled

* load oidc integration for the supertokens flow via trpc from the server

* prepare encryption secret within constructor

* add user to organization upon oidc login

* login via oidc does not create a personal organization

* redirect oidc user to oidc organization

* disallow oidc users to create an organization

* disallow oidc accounts joining another organization

* add test for updating an oidc integration

* enhance ui

* add documentation for OIDC SSO

* add more tests

* import Callout component

* update snapshots

* rename field User.isLinkedToOIDCIntegration to User.canSwitchOrganization to be more decriptive

* add traling new line

* gracefully handle unique constraint

* upgrade supertokens-auth-react and adjust the code in order to remove the global preApiHook

* sync image versions with tests

* remove obsolete comment

* rename database column

* bruv

* add test for oidc user deletion
2022-11-03 16:45:17 +01:00
Kamil Kisiela
e85d8220a7
Ensure user and personal org creation after successful sign up/in (#518) 2022-10-25 16:12:43 +02:00
Kamil Kisiela
2ddc64b145
No access by default when generating tokens (#464)
Closes #458
2022-10-07 18:14:03 +02:00
Saihajpreet Singh
642daaf494
Use Envelop v3 and GraphQL Yoga v3 (#443)
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-10-06 13:48:01 +02:00
Laurin Quast
7656b7957d
feat: clean app env (#422)
* feat: document environment variables

* more env documentation

* wip

* add noop for backend env

* typo

* feat: embed environment validation/parsing in built app

* fix the sentry integration 😌

* feat: use env

* feat: decode the usage service environment

* feat: decode the webhooks service environment

* feat: disallow process.env

* feat: decode the tokens service environment

* feat: decode the stripe-billing service environment

* feat: decode server service environment

* feat: decode schema service environment

* feat: decode rate-limit service environment

* feat: decode usage-estimator service environment

* feat: decode emails service environment

* adjust env

* remove commented out code

* adjust env variable name

* use separate env variables

* env fixes

* more environmental stuff :)

* ...

* replace POSTGRES_CONNECTION_STRING with specific environment variables

* handle optional clickhouse (for now :)

* add missing POSTGRES_DB environment variable

* make ENVIRONMENT optional

* the other matters lol

* feat: support delivering mails via SMTP (#412)

* feat: optional CDN (#410)

* feat: optional CDN

* enable CDN in deployment

* enable the CDN in integration tests

* add sendmail provider

* remove unused env variables from the deployment

* only show login alert when legacy auth0 migration is enabled

* feat: make TOKENS_ENDPOINT mandatory and RATE_LIMIT_ENDPOINT optional for usage service

* feat: upgrade supertokens and enable server side email confirmation (#423)

* feat: upgrade supertokens and enable server side email confirmation

* feat: opt into required email verification

* docs: self hosting (#428)

* docs: self-hosting quick start

* Update packages/web/docs/pages/self-hosting/get-started.mdx

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>

* feat: optional GitHub and Slack environment variables (#440)

* feat: optional github integration environment variables

* feat: optional slack integration (#441)

* use latest stable supertokens

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-10-04 14:30:21 +02:00
Kamil Kisiela
da14815d10
Update operations-reader.ts (#438) 2022-10-03 20:11:34 +02:00
Kamil Kisiela
88bc274b48
Skip previews in slack messages (#404) 2022-09-24 11:20:03 +02:00
Kamil Kisiela
2931441473
Reduce the number of active connections (#388) 2022-09-21 11:38:41 +02:00
Kamil Kisiela
c1a119626a
Remove Mixpanel (#385) 2022-09-20 11:51:36 +02:00
Kamil Kisiela
6f7c51a62f
External schema composition (#373) 2022-09-16 13:30:50 +02:00
Davé
6984ef97a6
Fix URL after runnin Hive CLI Publish - Closes #361 (#362)
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-09-14 11:45:19 +02:00
Kamil Kisiela
30f11c4005
Temporary experimental_acceptBreakingChanges flag (#357) 2022-09-13 19:14:21 +02:00
Laurin Quast
7b9c2ec90a
feat: import auth0 accounts into supertokens when doing a password reset (#349)
* feat: import auth0 accounts into supertokens when doing a password reset

* refactor: more detailed error messages
2022-09-09 14:36:18 +02:00
Laurin Quast
6540155fc7
feat: replace auth0 with supertokens (#303)
* add supertoken container to docker-compose file

* yeah I am sorry this one big commit and I am ashamed of it

* use logOut function

* feat: show header on 404 page

* feat: better handling for organization cookie when not authenticated

* wrap it

* check session within server side props

* add is_admin flag user migration

* simplify and annotate the config

* fix: handle status codes + fix email/password sign up with import from auth0

* no hardcoded env pls

* decode process.env

* secure update user id mapping via a key

* fix: login form

* lol we don't need to hit the API

* fix: do graphql api authorization via authorization header instead of cookie

* implement isAdmin flag

* fix: types :)

* skipit

* yo we can run this

* set env variables

* disable because it annoys the hell out of me

* use the right host

* add not about token length

* refactor: decode environment variables

* feat: store external user id from guthub/google provider in the database

* workaround supertokens omitting null values from the token

* re-enable check

* i have no time for this shit

* add missing env variable

* fix: email test; missing domain extension

* configure pulumi deployment

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
Co-authored-by: Dotan Simha <dotansimha@gmail.com>

* configure pulumi deployment

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
Co-authored-by: Dotan Simha <dotansimha@gmail.com>

* configure pulumi deployment

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
Co-authored-by: Dotan Simha <dotansimha@gmail.com>

* configure pulumi deployment

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>

* fix: env names

* fix: link google account to the correct db record

* feat: email confirmation emails

* ?

* bump ts-node

* fix types

* omit package form the bundle

* remove it from dependencies...

* add emails apckage to dev deps

* resolve eslint issues

* remove comments

* update dev info + change env variable (no need to expose it on the frontend)

* use correct user id lol

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
Co-authored-by: Dotan Simha <dotansimha@gmail.com>
2022-09-06 09:38:31 +02:00
Kamil Kisiela
2fa97196d4
No longer detect the SchemaPublishMissingServiceError (#322) 2022-08-26 16:44:31 +02:00
Kamil Kisiela
091b75f38a
Fix calculation of total number of requests per client (#318) 2022-08-26 13:33:48 +02:00
Kamil Kisiela
d9b0aa65f9
Add "Copy Invite Link" button to invitations (#317)
* Add Copy Invite Link button to invitations
* Adjust the logic behind picking agg tables

Closes #316
2022-08-26 12:15:36 +02:00
Kamil Kisiela
8cd7a4a885
New invitation system (#315)
* New invitation system

* Fix format

* Deployment
2022-08-25 21:01:37 +02:00
Kamil Kisiela
db19282bf8
Implement new ClickHouse DB structure (#304)
FF_CLICKHOUSE_V2_TABLES
2022-08-23 12:53:22 +02:00
Kamil Kisiela
d02f9efdf0
Initial Emails service (#261)
* Initial Emails service

* Fix yarn.lock

* Metrics

* Fixes
2022-08-12 14:51:09 +02:00
Kamil Kisiela
5cb6df7be2
Do not capture schema building errors (#285)
* Do not Sentry.capture schema building errors
* To not pass originalError
2022-08-11 18:13:49 +02:00
Kamil Kisiela
854f987d20
More logs and a circuit breaker in IdempotentRunner (#284) 2022-08-11 17:19:47 +02:00
Kamil Kisiela
43f6817e1f
Schema Explorer (experimental) (#241) 2022-07-29 16:13:52 +02:00
Kamil Kisiela
5a70aee15b
One-time invitation link (#258)
Closes #250
2022-07-20 17:02:04 +02:00
Kamil Kisiela
9e90b1a53d
Client exclusions in breaking change detection (#243)
* Replace date-fns-tz with Intl.DateTimeFormat
2022-07-19 16:24:41 +02:00
Kamil Kisiela
1d449f4cab
New pricing (#231)
* Format dates
* Fetch only active products from Stripe
2022-07-11 21:37:43 +02:00
Kamil Kisiela
0fd7e9eea3
Get Started checklist (#232) 2022-07-11 18:22:07 +02:00
Kamil Kisiela
069e2ecef0
Update cleanId and make redirect when renaming target, project or org (#229) 2022-07-06 19:30:51 +02:00
Kamil Kisiela
2fe1e801ca
Reproduce and fix the error masking issue (#225) 2022-07-05 18:52:49 +02:00
Kamil Kisiela
c3e4619ba3
Publish new version if SDL is different but no changes in types and fields (#226) 2022-07-05 18:10:26 +02:00
Kamil Kisiela
25d6b0191b
Migrate X-API-Token to Authorization header (#122) 2022-07-01 11:43:27 +02:00
Laurin Quast
80358619b1
feat: always log unexpected errors (#215)
* feat: always log unexpected errors

* feat: better handling for syntax errors on CLI and API

* chore: add changesets

* Update integration-tests/tests/cli/schema.spec.ts

* chore: ignore test fixture from prettier formatting

* run prettier

Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-07-01 11:25:34 +02:00
Kamil Kisiela
77b2e24765
Expose link to the website when publishing schema in GraphQL API (#198)
* Expose link to the website when publishing schema in GraphQL API
* Print link to the website in the cli
2022-06-29 09:00:39 +02:00
Kamil Kisiela
ebddde55e5
Create production, staging and development targets by default for new projects (#196) 2022-06-28 16:41:24 +02:00
Kamil Kisiela
9cee7420a7
Pass x-request-id to tRPC (#195)
- No Sentry reporting for GraphQLErrors
- No more debugging of that sentry issue
- Passes x-request-id to tRPC and uses `fastifyRequest.log` for logging (that extracts x-request-id and shows it in the log message)
2022-06-28 15:01:44 +02:00
Kamil Kisiela
bffaf4a01d
Show rate limit error to the user (#178) 2022-06-24 22:47:47 +02:00
Kamil Kisiela
482dd426ff
Indicate an initial version in Mutation.schemaCheck (#175) 2022-06-24 20:15:58 +02:00
Dimitri POSTOLOV
bd3100d2a6
enable and fixes errors for @typescript-eslint/no-floating-promises rule (#150)
* enable rule and update eslint deps

* add return types

* fixes

* fix storage migration

* fix typecheck

* fix integrations tests

* fix last issues

* Update packages/libraries/client/src/client.ts

Co-authored-by: Laurin Quast <laurinquast@googlemail.com>

Co-authored-by: Laurin Quast <laurinquast@googlemail.com>
2022-06-23 12:04:10 +02:00
Kamil Kisiela
c82b22ac05
Simplify the schema publishing logic (#156)
- Removes the uniqueness requirement of commit it
- Makes the logic of schema publishing simpler and more readable
- Updating the service url results in a new version (previously an update of existing version)
- Introduces a requirement of defining service url in federated projects (new `SchemaPublishMissingUrlError` type)
2022-06-23 10:00:43 +02:00
Kamil Kisiela
5d0f0770d8
Revert "Simplify the schema publishing logic (#153)" (#155)
This reverts commit 38f6a92d39.
2022-06-22 15:16:36 +02:00
Dotan Simha
38f6a92d39
Simplify the schema publishing logic (#153)
- Removes the uniqueness requirement of commit it
- Makes the logic of schema publishing simpler and more readable
- Updating the service url results in a new version (previously na update of existing version)
- Introduces a requirement of defining service url in federated projects (new `SchemaPublishMissingUrlError` type)
2022-06-22 12:41:46 +02:00
Kamil Kisiela
29552a575f
Fix validation of git repository identifier in updateProjectGitRepository (#137)
Validation logic of the git repository field in the project's settings expected an URL instead of the `owner/name` format
2022-06-13 15:50:58 +02:00
Kamil Kisiela
51ba76eff6
Fix missing service url in supergraph (#134)
Fixes #133
2022-06-07 11:02:05 -07:00
Dotan Simha
42e5273542
Refactor rate-limit to support multi-targets orgs (#126) 2022-05-29 14:43:07 +03:00