Currently it is not possible to configure the OPENID_CONNECT authentication method with the GraphQLApi object.
Currently this is only possible with the primitive Cfn objects. This means that it makes configuring subsequent schemas, datasources and resolvers more complex as they too need to use the primitive Cfn objects. Below is an example of achieving this using the primitive Cfn objects. I believe the addition needs to be made in a similar way to this https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-appsync/lib/graphqlapi.ts#L31.
auth_config = aws_appsync.CfnGraphQLApi.OpenIDConnectConfigProperty(
issuer="https://openid_privider.company.com/"
)
api = aws_appsync.CfnGraphQLApi(
self,
id="api",
name="api",
log_config=aws_appsync.CfnGraphQLApi.LogConfigProperty(
exclude_verbose_content=False,
cloud_watch_logs_role_arn=log_role.role_arn,
field_log_level="ALL",
),
open_id_connect_config=auth_config,
authentication_type="OPENID_CONNECT",
)
This is a :rocket: Feature Request
I've already implemented it. Have a look at the pull request: https://github.com/aws/aws-cdk/pull/7878
Amazing! Thank you @SachinShekhar. Will close this in favour of your PR.
@alextriaca - I don't think @SachinShekhar 's PR #7878 will be promoted anywhere unless a feature request issue exists. so please re-open.
also needed here ! Thanks for the PR
Good shout @3oris. Will leave this open until #7878 is merged.
Most helpful comment
I've already implemented it. Have a look at the pull request: https://github.com/aws/aws-cdk/pull/7878