-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(elasticloadbalancingv2): ALB auth return internal server error (#…
…24510) ## Summary Allow HTTPS outbound traffic for security groups attached to the Application Load Balancer if the Application Load Balancer is configured with an authentication configuration. ## Why is this PR needed? Application Load Balancer authentication requires HTTPS outbound traffic. However, the security group attached to the ApplicationLoadBalancer does not allow traffic to the outside, so the code as described in the documentation will not work by itself. <img width="593" alt="image" src="https://user-images.githubusercontent.com/49480575/223705838-a047e14c-95f5-4c8e-9003-0bbdf6b9d281.png"> This issue is also documented. https://aws.amazon.com/premiumsupport/knowledge-center/elb-configure-authentication-alb/?nc1=h_ls ## Related issues Following opened issues were fixed by #21939, but related this PR. Closes #19035 #18944. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
1 parent
6e73e66
commit 75212eb
Showing
37 changed files
with
9,406 additions
and
164 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...rk-integ/test/aws-elasticloadbalancingv2-actions/test/alb-cognito-signin-handler/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint-disable @typescript-eslint/no-require-imports */ | ||
import { execSync } from 'child_process'; | ||
|
||
const url = process.env.TEST_URL; | ||
const setupBrowser = async () => { | ||
execSync('HOME=/tmp npm install puppeteer-core @sparticuz/chromium --omit=dev --no-package-lock --no-save --prefix /tmp'); | ||
const puppeteer = require('/tmp/node_modules/puppeteer-core'); | ||
const chromium = require('/tmp/node_modules/@sparticuz/chromium'); | ||
const browser = await puppeteer.launch({ | ||
args: chromium.args, | ||
defaultViewport: chromium.defaultViewport, | ||
executablePath: await chromium.executablePath(), | ||
headless: chromium.headless, | ||
}); | ||
return browser; | ||
}; | ||
|
||
export const handler: AWSLambda.Handler = async (_event) => { | ||
const browser = await setupBrowser(); | ||
const page = await browser.newPage(); | ||
await page.goto(url, { | ||
waitUntil: ['load', 'networkidle0'], | ||
timeout: 30000, | ||
}); | ||
await page.type("div.visible-lg input[name='username']", process.env.TEST_USERNAME); | ||
await page.type("div.visible-lg input[name='password']", process.env.TEST_PASSWORD); | ||
await page.click("div.visible-lg input[type='submit']"); | ||
const body = await page.waitForSelector('body'); | ||
const textContent = await body.evaluate((el: any) => el.textContent); | ||
return textContent; | ||
}; |
1 change: 1 addition & 0 deletions
1
...napshot/asset.1832f4c7bb54fe8f4eb5677dc53ae4204e4b27b12077ddd397a6755206864302/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const handler: AWSLambda.Handler; |
34 changes: 34 additions & 0 deletions
34
....snapshot/asset.1832f4c7bb54fe8f4eb5677dc53ae4204e4b27b12077ddd397a6755206864302/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
....snapshot/asset.1832f4c7bb54fe8f4eb5677dc53ae4204e4b27b12077ddd397a6755206864302/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint-disable @typescript-eslint/no-require-imports */ | ||
import { execSync } from 'child_process'; | ||
|
||
const url = process.env.TEST_URL; | ||
const setupBrowser = async () => { | ||
execSync('HOME=/tmp npm install puppeteer-core @sparticuz/chromium --omit=dev --no-package-lock --no-save --prefix /tmp'); | ||
const puppeteer = require('/tmp/node_modules/puppeteer-core'); | ||
const chromium = require('/tmp/node_modules/@sparticuz/chromium'); | ||
const browser = await puppeteer.launch({ | ||
args: chromium.args, | ||
defaultViewport: chromium.defaultViewport, | ||
executablePath: await chromium.executablePath(), | ||
headless: chromium.headless, | ||
}); | ||
return browser; | ||
}; | ||
|
||
export const handler: AWSLambda.Handler = async (_event) => { | ||
const browser = await setupBrowser(); | ||
const page = await browser.newPage(); | ||
await page.goto(url, { | ||
waitUntil: ['load', 'networkidle0'], | ||
timeout: 30000, | ||
}); | ||
await page.type("div.visible-lg input[name='username']", process.env.TEST_USERNAME); | ||
await page.type("div.visible-lg input[name='password']", process.env.TEST_PASSWORD); | ||
await page.click("div.visible-lg input[type='submit']"); | ||
const body = await page.waitForSelector('body'); | ||
const textContent = await body.evaluate((el: any) => el.textContent); | ||
return textContent; | ||
}; |
256 changes: 256 additions & 0 deletions
256
....snapshot/asset.a9d3d4d1afa000946b9863b3e7578a5a5ad86d88274b3639938aa2baebf822ce/index.js
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.