<p>I am trying to implement Mutual Authentication in Kubernetes, I am able to create the certificate  and able to configure it into the cluster too, But I am getting error when I send certificate from client side.</p>

<p>So here is the problem</p>

<p>When I create the certificate I have to give Common Name. This field must contain a fully qualified domain name.
Since my domain name is very long 93 characters, it is not allowing me to enter my domain name,</p>

<p>My doubt is, is it mandatory to have full domain Name in Common Name field while generating the certificate, or do we have any workaround for this.</p>

<p>TIA</p>

Rigsby
<p>You can provide the Fully Qualified Domain Named(FQDN) in <a href="https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.6" rel="nofollow noreferrer">Subject Alternative Name</a> instead of Common Name. Subject Alternative Name don't have the limitation of 64 characters.</p>
<p>The general rule is that the domain is checked against all SANs and the common name. If the domain is found there, then the certificate is ok for connection.</p>
<p><a href="https://www.rfc-editor.org/rfc/rfc5280#section-4.1.2.6" rel="nofollow noreferrer">RFC 5280</a>, section 4.1.2.6 says &quot;The subject name MAY be carried in the subject field and/or the subjectAltName extension&quot;. This means that the domain name must be checked against both SubjectAltName extension and Subject property (namely it's common name parameter) of the certificate. These two places complement each other, and not duplicate it. And SubjectAltName is a proper place to put additional names, such as <a href="http://www.domain.com" rel="nofollow noreferrer">www.domain.com</a> or www2.domain.com</p>
<p>As per <a href="https://www.rfc-editor.org/rfc/rfc6125#section-6.4.4" rel="nofollow noreferrer">RFC 6125</a>, published in '2011 the validator must check SAN first, and if SAN exists, then CN should not be checked. Note, that the RFC 6125 is relatively recent and there still exist certificates and CAs that issue certificates, which include the &quot;main&quot; domain name in CN and alternative domain names in SAN. I.e. by excluding CN from validation if SAN is present, you can deny some otherwise valid certificate</p>
