Skip to content

Commit 90dbfb5

Browse files
authored
fix(iam): oidc-provider can't pull from hosts requiring SNI (#13397)
This enables SNI when the oidcProvider tries to pull the thumbprint from a server in the downloadThumbprint function. This fixes issues when trying to add an oidcProvider that is using SNI. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent b3fba43 commit 90dbfb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@aws-cdk/aws-iam/lib/oidc-provider/external.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function downloadThumbprint(issuerUrl: string) {
2828
if (!purl.host) {
2929
return ko(new Error(`unable to determine host from issuer url ${issuerUrl}`));
3030
}
31-
const socket = tls.connect(port, purl.host, { rejectUnauthorized: false });
31+
const socket = tls.connect(port, purl.host, { rejectUnauthorized: false, servername: purl.host });
3232
socket.once('error', ko);
3333
socket.once('secureConnect', () => {
3434
const cert = socket.getPeerCertificate();

0 commit comments

Comments
 (0)