diff --git a/src/__tests__/validation/__snapshots__/auth.test.ts.snap b/src/__tests__/validation/__snapshots__/auth.test.ts.snap index 5912f9c6..520b0ea0 100644 --- a/src/__tests__/validation/__snapshots__/auth.test.ts.snap +++ b/src/__tests__/validation/__snapshots__/auth.test.ts.snap @@ -32,10 +32,7 @@ exports[`Valdiation Invalid should validate a Lambda with invalid functionName a exports[`Valdiation Invalid should validate a Lambda with missing config 1`] = `"/authentication: must have required property 'config'"`; -exports[`Valdiation Invalid should validate a OIDC with empty config 1`] = ` -"/authentication/config: must have required property 'issuer' -/authentication/config: must have required property 'clientId'" -`; +exports[`Valdiation Invalid should validate a OIDC with empty config 1`] = `"/authentication/config: must have required property 'issuer'"`; exports[`Valdiation Invalid should validate a OIDC with invalid config 1`] = ` "/authentication/config/issuer: must be string diff --git a/src/__tests__/validation/auth.test.ts b/src/__tests__/validation/auth.test.ts index 13609513..6cc4cdff 100644 --- a/src/__tests__/validation/auth.test.ts +++ b/src/__tests__/validation/auth.test.ts @@ -61,6 +61,20 @@ describe('Valdiation', () => { }, } as AppSyncConfigInput, }, + { + name: 'OIDC without a clientId', + config: { + ...basicConfig, + authentication: { + type: 'OPENID_CONNECT', + config: { + issuer: 'https://auth.example.com', + iatTTL: 3600, + authTTL: 3600, + }, + }, + } as AppSyncConfigInput, + }, { name: 'IAM', config: { diff --git a/src/validation.ts b/src/validation.ts index abbf8fbe..6c10bebc 100644 --- a/src/validation.ts +++ b/src/validation.ts @@ -133,7 +133,7 @@ export const appSyncSchema = { iatTTL: { type: 'number' }, authTTL: { type: 'number' }, }, - required: ['issuer', 'clientId'], + required: ['issuer'], }, iamAuth: { type: 'object',