indirizzo IP in SubjectAltName

2

È consentito specificare l'IP come nome DNS per il certificato SAN?

    
posta user3448600 30.05.2017 - 14:37
fonte

4 risposte

4

Is it allowed to specify IP as DNS name for SAN certificate ?

Prima di tutto, dovresti capire che esiste un formato di nome alternativo specifico per iPAddress, progettato per contenere quad tratteggiati (IPv4) o 16 ottetti (IPv6). Se desideri assegnare un indirizzo IP al tuo certificato, probabilmente è il modo giusto per farlo. Vedi RFC 5280 sezione 4.2.1.6 . La compatibilità browser / client varierà.

In secondo luogo, sì, è legale specificare un quadrante tratteggiato in un campo dNSName della SAN. Per citare RFC 5280,

The name MUST be in the "preferred name syntax", as specified by Section 3.5 of RFC1034 and as modified by Section 2.1 of RFC1123

Quest'ultimo suggerisce che il software dovrebbe essere tollerante nel trovare gli indirizzi IP nei campi "nome host":

Whenever a user inputs the identity of an Internet host, it SHOULD be possible to enter either (1) a host domain name or (2) an IP address in dotted-decimal ("#.#.#.#") form. The host SHOULD check the string syntactically for a dotted-decimal number before looking it up in the Domain Name System.

Ancora una volta, queste sono solo RFC, quindi il chilometraggio varia a seconda del cliente.

Si noti anche che, per RFC 5280:

Because the subject alternative name is considered to be definitively bound to the public key, all parts of the subject alternative name MUST be verified by the CA.

Quindi, se si inoltra una richiesta a una CA pubblica con, ad esempio, un indirizzo IP 1918 RFC privato (10.1.2.3), questi dovrebbe rifiutarsi di firmare tale richiesta. E come per le CA che convalidano la proprietà di un indirizzo IP - quando la "proprietà" di un indirizzo IP di solito differisce dall'utente assegnato - le cose potrebbero diventare interessanti.

    
risposta data 30.05.2017 - 15:15
fonte
3

Is it allowed to specify IP as DNS name for SAN certificate ?

Secondo RFC 5280 dNSName è un IA5String che significa in teoria che puoi inserire la stringa di un indirizzo IPv4 o IPv6 come una stringa al suo interno. E a volte è anche necessario anche se il tipo corretto per gli indirizzi IP in SAN è iPAddress poiché:

  • MSIE e MS Edge tendono a ignorare iPAddress e si aspettano il valore come stringa in dNSName. Lo stesso vale per Python 2.
  • ma Chrome, Safari, Firefox non si aspettano un indirizzo IP come dNSName ma lo richiedono come iPAddress. Lo stesso vale per Python 3.

In questo modo è possibile raggiungere la migliore compatibilità fornendo l'indirizzo IP sia come iPAddress che come dNSName.

    
risposta data 30.05.2017 - 18:37
fonte
1

Sì tecnicamente può andare nel Nome soggetto alternativo (SAN) insieme a qualsiasi nome di dominio. I sistemi in cui si utilizza il certificato possono o non possono utilizzare correttamente le informazioni (dipende dall'applicazione).

Quindi sì, è legale fare ciò che vuoi, ma potrebbe non funzionare.

    
risposta data 30.05.2017 - 14:42
fonte
0

Sì, può essere utilizzato in questo modo, ma in genere ha senso solo per l'infrastruttura a chiave privata privata. In tal caso, puoi avere un server privato che verrà utilizzato direttamente con il suo indirizzo IP, quindi ha senso utilizzarlo nel campo SAN.

Ma AFAIK è usato raramente (se usato) per PKI pubblici e server pubblici.

    
risposta data 30.05.2017 - 15:09
fonte

Leggi altre domande sui tag