ALB seems to not use a Private Hosted Zone for DNS - authenticate users using an Application Load Balancer

0

Overall Goal and issue:

Context:

  • We have a multi-account strategy
  • Important for the case is: there is a central Network Account, and a de-central Application Account
  • In the central Network Account, we do have a Private Hosted zone to implement a split DNS for our PingFederate setup (you get Public IPs from Public Internet, and you get internal IPs via PHZ from AWS Landing Zone)
  • The PHZ is shared with our de-central Application account

Detailed issue:

  • We have EC2 and ALB in the same Application account, same VPC, same subnet
  • EC2 and ALB resolve DNS requests differently:
  • EC2 uses the centrally created and shared Private Hosted Zone
  • ALB does *not * use the Private Hosted Zone

Error from logs: upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.x.x, server: internal-alb-name-1111111111.eu-central-1.elb.amazonaws.com, request: "GET /oauth2/idpresponse?code=e8J8mvf2PBR2Q...%2BEyo1aL HTTP/2.0", subrequest: "/internal/oauth2/token", upstream: "https://18.111.222.33:443/as/token.oauth2 -> we would expect an internal IP / the DNS from PHZ here.

Main question:

  • Why doesn't the ALB (with settings for OIDC authentication) use the centrally created and shared Private Hosted Zone? Why does it use the Public DNS? What are we missing? Happy for any guidance.
1 Answer
5
Accepted Answer

According to the documentation the DNS records have to be public. Seems its the way the ALB has been designed to resolve DNS

The DNS entries for the endpoints must be publicly resolvable, even if they resolve to private IP addresses. https://docs.aws.amazon.com/elasticloadbalancing/latest/application/listener-authenticate-users.html#oidc-requirements

profile picture
EXPERT
answered 15 days ago
profile picture
EXPERT
reviewed a day ago
profile picture
EXPERT
reviewed 14 days ago
profile picture
EXPERT
reviewed 15 days ago
  • Thanks a lot, I did not know that. That seems to be valid for ALL kind of ALBs. I have created an internal ALB with no access to the Public internet. However, I am able to resolve the "private DNS" publicly. I amended my setup and it is working now. Thanks a lot!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions