-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(apigatewayv2): defaultAuthorizer cannot be applied to HttpRoute #27576
Changes from 22 commits
21785e2
de950c7
1efb3d6
1e10a0d
21e4aee
ebacc8e
aa00748
afb9bda
df3155b
9062e3a
4fc75f4
5c2208f
81bcb9c
4e76464
ae2a40c
2a76067
5df276c
e3e3f9e
afd941c
5f248aa
4e5942f
0a188ee
9e09c7c
40819a1
ee11394
7ea3c89
0bb478e
375b130
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -22,6 +22,20 @@ export interface IHttpApi extends IApi { | |||||||||
*/ | ||||||||||
readonly httpApiId: string; | ||||||||||
|
||||||||||
/** | ||||||||||
* Default Authorizer to applied to all routes in the gateway | ||||||||||
* @attribute | ||||||||||
* @default - No authorizer | ||||||||||
*/ | ||||||||||
readonly defaultAuthorizer?: IHttpRouteAuthorizer; | ||||||||||
|
||||||||||
/** | ||||||||||
* Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Can you please align this as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please provide documentation that describes the usage with a JWT authorizer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh... I tried in the integ.lambda with defaultAuthorizationScopes in httpApiWithDefaultAuthorizer, CFn occurred the following error message. I'll see if I can find any documentation.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is I guess this CFn message represents What should we do in CDK doc? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found only this article. https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-jwt-authorizer.html There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm starting to feel that COGNITO_USER_POOLS is all I need. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the meantime, please review again as I have added only COGNITO_USER_POOLS for the message. |
||||||||||
* @attribute | ||||||||||
* @default - no default authorization scopes | ||||||||||
*/ | ||||||||||
readonly defaultAuthorizationScopes?: string[]; | ||||||||||
|
||||||||||
/** | ||||||||||
* Metric for the number of client-side errors captured in a given period. | ||||||||||
* | ||||||||||
|
@@ -340,8 +354,8 @@ export class HttpApi extends HttpApiBase { | |||||||||
|
||||||||||
private readonly _apiEndpoint: string; | ||||||||||
|
||||||||||
private readonly defaultAuthorizer?: IHttpRouteAuthorizer; | ||||||||||
private readonly defaultAuthorizationScopes?: string[]; | ||||||||||
public readonly defaultAuthorizer?: IHttpRouteAuthorizer; | ||||||||||
public readonly defaultAuthorizationScopes?: string[]; | ||||||||||
|
||||||||||
constructor(scope: Construct, id: string, props?: HttpApiProps) { | ||||||||||
super(scope, id); | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please align this as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check.
40819a1