When setting a DNS SRV record like _service._proto.example.com. IN SRV 0 0 443 service.example.com.
, why has the TLS certificate name on service.example.com:443
to be example.com
and not service.example.com
?
I've read on what names for TLS certificates when using SRV records that it's to prevent man in the middle attacks but I'm not sure to understand why: MITM attacks on the DNS would be prevented using DNSSEC.
The problem whith this design is the following. Consider one has the following DNS SRV records:
_service1._proto.example.com. IN SRV 0 0 443 service1.example.com.
_service2._proto.example.com. IN SRV 0 0 443 service2.example.com.
_service3._proto.example.com. IN SRV 0 0 443 service.provider.com.
One has to give a TLS certificate which name is example.com
to the teams managing service1 and service2 and to the external service provider's team. This way, a compromise of any of the services can lead to the compromise of all the services.
This seems like a flaw in the design of DNS SRV records. Is it?