console/codegen.yml
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

138 lines
6.6 KiB
YAML

schema: ./packages/services/api/src/modules/*/module.graphql.ts
emitLegacyCommonJSImports: true
generates:
# API
./packages/services/api/src/modules:
preset: graphql-modules
presetConfig:
baseTypesPath: ../__generated__/types.ts
filename: __generated__/types.ts
encapsulateModuleTypes: namespace
config:
immutableTypes: true
contextType: GraphQLModules.ModuleContext
enumValues:
OrganizationType: ../shared/entities#OrganizationType
ProjectType: ../shared/entities#ProjectType
TargetAccessScope: ../modules/auth/providers/target-access#TargetAccessScope
ProjectAccessScope: ../modules/auth/providers/project-access#ProjectAccessScope
OrganizationAccessScope: ../modules/auth/providers/organization-access#OrganizationAccessScope
scalars:
DateTime: string
SafeInt: number
mappers:
SchemaChangeConnection: ../shared/mappers#SchemaChangeConnection as SchemaChangeConnectionMapper
SchemaErrorConnection: ../shared/mappers#SchemaErrorConnection as SchemaErrorConnectionMapper
OrganizationConnection: ../shared/mappers#OrganizationConnection as OrganizationConnectionMapper
UserConnection: ../shared/mappers#UserConnection as UserConnectionMapper
ActivityConnection: ../shared/mappers#ActivityConnection as ActivityConnectionMapper
MemberConnection: ../shared/mappers#MemberConnection as MemberConnectionMapper
ProjectConnection: ../shared/mappers#ProjectConnection as ProjectConnectionMapper
TargetConnection: ../shared/mappers#TargetConnection as TargetConnectionMapper
SchemaConnection: ../shared/mappers#SchemaConnection as SchemaConnectionMapper
TokenConnection: ../shared/mappers#TokenConnection as TokenConnectionMapper
OperationStatsConnection: ../shared/mappers#OperationStatsConnection as OperationStatsConnectionMapper
ClientStatsConnection: ../shared/mappers#ClientStatsConnection as ClientStatsConnectionMapper
OperationsStats: ../shared/mappers#OperationsStats as OperationsStatsMapper
DurationStats: ../shared/mappers#DurationStats as DurationStatsMapper
SchemaComparePayload: ../shared/mappers#SchemaComparePayload as SchemaComparePayloadMapper
SchemaCompareResult: ../shared/mappers#SchemaCompareResult as SchemaCompareResultMapper
SchemaVersionConnection: ../shared/mappers#SchemaVersionConnection as SchemaVersionConnectionMapper
SchemaVersion: ../shared/mappers#SchemaVersion as SchemaVersionMapper
Schema: ../shared/mappers#Schema as SchemaMapper
PersistedOperationConnection: ../shared/mappers#PersistedOperationConnection as PersistedOperationMapper
Organization: ../shared/entities#Organization as OrganizationMapper
Project: ../shared/entities#Project as ProjectMapper
Target: ../shared/entities#Target as TargetMapper
Member: ../shared/entities#Member as MemberMapper
Token: ../shared/entities#Token as TokenMapper
TokenInfo: ../shared/entities#Token as TokenInfoMapper
Activity: ../shared/entities#ActivityObject as ActivityMapper
AlertChannel: ../shared/entities#AlertChannel as AlertChannelMapper
AlertSlackChannel: AlertChannelMapper
AlertWebhookChannel: AlertChannelMapper
Alert: ../shared/entities#Alert as AlertMapper
AdminQuery: '{}'
AdminStats: '{ daysLimit?: number | null }'
AdminGeneralStats: '{ daysLimit?: number | null }'
AdminOrganizationStats: ../shared/entities#AdminOrganizationStats as AdminOrganizationStatsMapper
UsageEstimation: '../shared/mappers#TargetsEstimationFilter'
UsageEstimationScope: '../shared/mappers#TargetsEstimationDateFilter'
BillingPaymentMethod: 'StripeTypes.PaymentMethod.Card'
BillingDetails: 'StripeTypes.PaymentMethod.BillingDetails'
BillingInvoice: 'StripeTypes.Invoice'
OrganizationGetStarted: ../shared/entities#OrganizationGetStarted as OrganizationGetStartedMapper
SchemaExplorer: ../shared/mappers#SchemaExplorerMapper
GraphQLObjectType: ../shared/mappers#GraphQLObjectTypeMapper
GraphQLInterfaceType: ../shared/mappers#GraphQLInterfaceTypeMapper
GraphQLUnionType: ../shared/mappers#GraphQLUnionTypeMapper
GraphQLEnumType: ../shared/mappers#GraphQLEnumTypeMapper
GraphQLInputObjectType: ../shared/mappers#GraphQLInputObjectTypeMapper
GraphQLScalarType: ../shared/mappers#GraphQLScalarTypeMapper
GraphQLUnionTypeMember: ../shared/mappers#GraphQLUnionTypeMemberMapper
GraphQLEnumValue: ../shared/mappers#GraphQLEnumValueMapper
GraphQLField: ../shared/mappers#GraphQLFieldMapper
GraphQLInputField: ../shared/mappers#GraphQLInputFieldMapper
GraphQLArgument: ../shared/mappers#GraphQLArgumentMapper
OrganizationInvitation: ../shared/entities#OrganizationInvitation as OrganizationInvitationMapper
OIDCIntegration: '../shared/entities#OIDCIntegration as OIDCIntegrationMapper'
User: '../shared/entities#User as UserMapper'
plugins:
- add:
content: "import { StripeTypes } from '@hive/stripe-billing';"
- typescript
- typescript-resolvers
# App
./packages/web/app/src/graphql/index.ts:
documents:
- ./packages/web/app/src/graphql/*.graphql
- './packages/web/app/src/(components|lib)/**/*.ts(x)?'
config:
dedupeFragments: true
scalars:
DateTime: string
SafeInt: number
plugins:
- typescript
- typescript-operations
- typed-document-node
./packages/web/app/src/gql/:
documents:
- './packages/web/app/src/(components|lib)/**/*.ts(x)?'
- './packages/web/app/pages/v2/**/*.ts(x)?'
- './packages/web/app/pages/**/*.ts(x)?'
- './packages/web/app/src/graphql'
- '!./packages/web/app/pages/api/github/setup-callback.ts'
preset: gql-tag-operations-preset
config:
dedupeFragments: true
presetConfig:
augmentedModuleName: '@urql/core'
# CLI
packages/libraries/cli/src/sdk.ts:
documents: ./packages/libraries/cli/src/**/*.graphql
config:
flattenGeneratedTypes: true
plugins:
- typescript
- typescript-operations
- typescript-graphql-request
# Client
packages/libraries/client/src/__generated__/types.ts:
documents: ./packages/libraries/client/src/**/*.ts
config:
flattenGeneratedTypes: true
onlyOperationTypes: true
plugins:
- typescript
- typescript-operations
# Integration tests
./integration-tests/testkit/gql:
documents: ./integration-tests/(testkit|tests)/**/*.ts
preset: gql-tag-operations-preset