Skip to content

Conversation

@marcoandredinis
Copy link
Contributor

When IP Pinning is enabled, the certificate's pinned IP and the IP presented by the client in the connection must be the same.

For AWS Console access which uses an integration, we don't use an Application Service to proxy connections, the Proxy Service is used instead.

In this situation, it uses a net.Pipe which sets both Local/Remote addrs to pipe.

When validating whether that's the same IP as the one present in the certificate's pinned IP, it fails because that's the address of an intermediate connection.

This PR fixes this by wrapping the connection with an overrided RemoteAddr method which returns the true client's IP extracted from the context.

Backporting to v17 because, even tho Roles Anywhere is v18, this also affects AWS OIDC integration which is present in v17.

Fixes #61437

Changelog: Fixed AWS Console access when using AWS IAM Roles Anywhere or AWS OIDC integrations, when IP Pinning is enabled.

When IP Pinning is enabled, the certificate's pinned IP and the IP
presented by the client in the connection must be the same.

For AWS Console access which uses an integration, we don't use an
Application Service to proxy connections, the Proxy Service is used
instead.

In this situation, it uses a `net.Pipe` which sets both Local/Remote
addrs to `pipe`.

When validating whether that's the same IP as the one present in the
certificate's pinned IP, it fails because that's the address of an
intermediate connection.

This PR fixes this by wrapping the connection with an overrided
`RemoteAddr` method which returns the true client's IP extracted from
the context.
@marcoandredinis marcoandredinis force-pushed the marco/fix-integration-awsaccess-ip-pinning branch from fb62f59 to 1b10e5b Compare November 21, 2025 09:10
@marcoandredinis marcoandredinis added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@marcoandredinis marcoandredinis added this pull request to the merge queue Nov 21, 2025
Merged via the queue into master with commit 7bc1b28 Nov 21, 2025
42 checks passed
@marcoandredinis marcoandredinis deleted the marco/fix-integration-awsaccess-ip-pinning branch November 21, 2025 10:13
@backport-bot-workflows
Copy link
Contributor

@marcoandredinis See the table below for backport results.

Branch Result
branch/v17 Create PR
branch/v18 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS Web Console Access fails when using Roles Anywhere, with IP Pinning enabled

4 participants