@@ -319,7 +319,7 @@ export class McpAuthStack extends cdk.Stack {
319319 "oauth-authorization-server"
320320 ) ;
321321
322- oauthServerResource . addMethod (
322+ const oauthMetadataMethod = oauthServerResource . addMethod (
323323 "GET" ,
324324 new MockIntegration ( {
325325 passthroughBehavior : PassthroughBehavior . NEVER ,
@@ -350,6 +350,40 @@ export class McpAuthStack extends cdk.Stack {
350350 }
351351 ) ;
352352
353+ // Add NAG suppressions
354+ NagSuppressions . addResourceSuppressions ( api , [
355+ {
356+ id : "AwsSolutions-APIG2" ,
357+ reason : "No request validation needed - just doing a redirect" ,
358+ } ,
359+ ] ) ;
360+
361+ NagSuppressions . addResourceSuppressions ( api . deploymentStage , [
362+ {
363+ id : "AwsSolutions-APIG1" ,
364+ reason : "Access logging is not enabled for this example" ,
365+ } ,
366+ {
367+ id : "AwsSolutions-APIG3" ,
368+ reason : "WAF is not enabled for this example" ,
369+ } ,
370+ {
371+ id : "AwsSolutions-APIG6" ,
372+ reason : "CloudWatch logging is not enabled for this example" ,
373+ } ,
374+ ] ) ;
375+
376+ NagSuppressions . addResourceSuppressions ( oauthMetadataMethod , [
377+ {
378+ id : "AwsSolutions-APIG4" ,
379+ reason : "OAuth discovery endpoint must be unauthenticated per RFC 8414" ,
380+ } ,
381+ {
382+ id : "AwsSolutions-COG4" ,
383+ reason : "OAuth discovery endpoint must be unauthenticated per RFC 8414" ,
384+ } ,
385+ ] ) ;
386+
353387 // Stack outputs
354388 new cdk . CfnOutput ( this , "AuthorizationServerUrl" , {
355389 value : `https://${ domainName } /` ,
0 commit comments