italia / cie-cns-apache-docker

L'obiettivo di questo progetto è quello di fornire un template pronto all'uso che realizza un sistema di autenticazione tramite la Smart Card TS-CNS (o CNS) e la CIE (Carta d'Identità Elettronica) basato su Apache HTTP. Ognuno può poi modificare o specializzare questo progetto sulla base delle proprie esigenze Si tratta di un progetto docker per la creazione di un container che implementa un sistema di mutua autenticazione o autenticazione bilaterale SSL/TLS. Questo meccanismo di autenticazione richiede anche il certificato digitale da parte del client, certificato che in questo caso risiede all'interno della TS-CNS o della CIE.
http://bit.ly/3aJ5Gbl
MIT License
56 stars 13 forks source link

auto aggiornamento dei cerificati di CA #2

Closed lucabonuccelli closed 5 years ago

lucabonuccelli commented 5 years ago

I certificati di CA autorizzati ad emetterere CNS sono elencati qui: https://eidas.agid.gov.it/TL/TSL-IT.xml

il filtro da applicare è:

http://uri.etsi.org/TrstSvc/Svctype/IdV
amusarra commented 5 years ago

Ciao @lucabonuccelli Per scaricare tutti i certificati delle CA accreditate, certificati che per semplicità ho messo direttamente all'interno del progetto, ho utilizzato uno script il cui riferimento è il file XML da te citato e citato anche sul README, e che applica questo filtro root.findall(ns+"TrustServiceProviderList//"+ns+"TSPService/"+ns+"ServiceInformation"). A tuo avviso quest'insieme (che poi sono tutti ~358) è sbagliato? Come scrivi tu, è più corretto prendere il sottoinsieme http://uri.etsi.org/TrstSvc/Svctype/IdV?

amusarra commented 5 years ago

Ciao @lucabonuccelli Sul branch develop https://github.com/amusarra/apache-httpd-ts-cns-docker/tree/develop è disponibile la nuova funzionalità di download automatico dei certificati e installazione su Apache, al momento li scarica tutti. Fammi poi sapere se necessario scaricare solo quelli il cui ServiceTypeIdentifier è http://uri.etsi.org/TrstSvc/Svctype/IdV

lucabonuccelli commented 5 years ago

Salve Antonio, sì: i certificati da prendere in considerazione sono solamente quelli riferiti ai servizi http://uri.etsi.org/TrstSvc/Svctype/IdV.

Se ti serve per la documentazione ecco il significato di "http://uri.etsi.org/TrstSvc/Svctype/IdV" http://ec.europa.eu/transparency/regexpert/index.cfm?do=groupDetail.groupDetailDoc&id=9979&no=4 (capitolo d2) unicto a questa pagina di agid: https://www.agid.gov.it/en/platforms/qualified-electronic-signature/qualified-certification-service-providers in particolare:

The Ministry of Interior is an exception; it is the only not qualified service provider into the list. It provides (by law) only an Identity verification service that allows citizens to use the national identity card to authenticate themselves over the network. As not qualified trust service provider, the Ministry of Interior is not subject to ex ante supervision by this Agency, but only to ex post supervision: AgID will take action when informed that Ministry of Interior or the trust service it provides allegedly do not meet the requirements laid down inThe Ministry of Interior is an exception; it is the only not qualified service provider into the list. It provides (by law) only an Identity verification service that allows citizens to use the national identity card to authenticate themselves over the network. As not qualified trust service provider, the Ministry of Interior is not subject to ex ante supervision by this Agency, but only to ex post supervision: AgID will take action when informed that Ministry of Interior or the trust service it provides allegedly do not meet the requirements laid down in the eIDAS Regulation.

Other Identity verification services (not qualified services) refer to the “National Service Card”. This card, always usable by the citizens to authenticate themselves over the network, may be issued, by law, only by qualified trust service providers that have been already authorized to issue qualified electronic signature certificates. These QTSPs made this activity on behalf of a public administrations the eIDAS Regulation.

. Quindi in sintesi: sono CA che emettonoto CNS tutte quelle collegate a servizi http://uri.etsi.org/TrstSvc/Svctype/IdV meno quella della CIE

amusarra commented 5 years ago

Grazie @lucabonuccelli .Per la CIE sai qual è il Service Type?

amusarra commented 5 years ago

Ciao @lucabonuccelli Sul branch di develop c'è la versione del software che scarica il certificati filtrati per Service Type Identifier pari a http://uri.etsi.org/TrstSvc/Svctype/IdV. Ho fatto un test con la mia CNS e funziona. I certificati sulla base del filtro (allo stato attuale) sono circa 118. Direi questa issue si può chiudere.

lucabonuccelli commented 5 years ago

Eccomi, Per la cie il service type è sempre ..Idv. almeno fino a quando non sarà conclusa la fase di notifica in europa. in particolare è questo servizio: <TSPService><ServiceInformation><ServiceTypeIdentifier>http://uri.etsi.org/TrstSvc/Svctype/IdV</ServiceTypeIdentifier><ServiceName><Name xml:lang="en">C=IT, O=Ministero dell'Interno, OU=Direz. Centr. per i Servizi Demografici - CNSD, CN=National root CA for the Italian Electronic Identity Card</Name></ServiceName><ServiceDigitalIdentity><DigitalId><X509Certificate>MIIG4DCCBMigAwIBAgIIRmop7bWMajUwDQYJKoZIhvcNAQELBQAwgasxQjBABgNVBAMMOU5hdGlvbmFsIHJvb3QgQ0EgZm9yIHRoZSBJdGFsaWFuIEVsZWN0cm9uaWMgSWRlbnRpdHkgQ2FyZDE3MDUGA1UECwwuRGlyZXouIENlbnRyLiBwZXIgaSBTZXJ2aXppIERlbW9ncmFmaWNpIC0gQ05TRDEfMB0GA1UECgwWTWluaXN0ZXJvIGRlbGwnSW50ZXJubzELMAkGA1UEBhMCSVQwHhcNMTYwNjA2MTQzNzI0WhcNMzYwNjA2MTQzNzI0WjCBqzFCMEAGA1UEAww5TmF0aW9uYWwgcm9vdCBDQSBmb3IgdGhlIEl0YWxpYW4gRWxlY3Ryb25pYyBJZGVudGl0eSBDYXJkMTcwNQYDVQQLDC5EaXJlei4gQ2VudHIuIHBlciBpIFNlcnZpemkgRGVtb2dyYWZpY2kgLSBDTlNEMR8wHQYDVQQKDBZNaW5pc3Rlcm8gZGVsbCdJbnRlcm5vMQswCQYDVQQGEwJJVDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMKQoMWIoz5V+cTvVu+rAU4GXsrhCHBGSiPluVwEDwrLa4VmUYcBpKV8bJMmSelbjE8TGtCvIdb3HmrK72ts/9cKIJItgMLEH4DWIO72F1EW4oYFZ7V4QalK3x5AIk6YCIw+PLYiv+i/C/7z+OwMeOyaPDayPK7bwwBloJHS/IwHy1eQLqZ58zyCNyjBAmtWQgqP6rLTFG44hRk6jCsHSBuMSe36qs21ZaA3qruitRVL2BMIe1+VnudwI+XWhrTaoa5UuZJygE52w7xbGmpv+Q6TapjVPc7s/l7aLBAvlo/KW3zDWZ8Joj0qftAFWCRI+Qbuw8GR6lvkp7vm85ymUd9nS/Izo0iEsDyppED/CuG0+n+y7CfGlZ6PqKM0WOeG856oH/BbuMr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0rwfpB28Cb9ePNCkHaoSkJ25PtKzNgKtikkGZCMmYpdiyQELuoBZHtxJ+Jo3tmc6Wy9WF9FzPYyKrC1d+NJdF8477zCpXk8l5z5zDoFt5H30Xdz9x+toehpemDABBvbNd+jSfwpay6O7qr8cnr7O+9uBrzKYv5yjgxBQ7KVF367aEXYdplSzJzlj+dl/sqHzyeTcw7CaMptYy5XW9JbmkvaxWX2vK8/rpnLv9Y9hX1KmmFMAK3PXgTw8Bym3+nM8Qc76Sx/LOHL</X509Certificate></DigitalId><DigitalId><X509SubjectName>C=IT, O=Ministero dell'Interno, OU=Direz. Centr. per i Servizi Demografici - CNSD, CN=National root CA for the Italian Electronic Identity Card</X509SubjectName></DigitalId><DigitalId><X509SKI>R8qRudhBHPfA4cUWUD454S+L8jU=</X509SKI></DigitalId></ServiceDigitalIdentity><ServiceStatus>http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/recognisedatnationallevel</ServiceStatus><StatusStartingTime>2016-06-30T22:00:00Z</StatusStartingTime></ServiceInformation><ServiceHistory><ServiceHistoryInstance><ServiceTypeIdentifier>http://uri.etsi.org/TrstSvc/Svctype/IdV</ServiceTypeIdentifier><ServiceName><Name xml:lang="en">C=IT, O=Ministero dell'Interno, OU=Direz. Centr. per i Servizi Demografici - CNSD, CN=National root CA for the Italian Electronic Identity Card</Name></ServiceName><ServiceDigitalIdentity><DigitalId><X509SubjectName>C=IT, O=Ministero dell'Interno, OU=Direz. Centr. per i Servizi Demografici - CNSD, CN=National root CA for the Italian Electronic Identity Card</X509SubjectName></DigitalId><DigitalId><X509SKI>R8qRudhBHPfA4cUWUD454S+L8jU=</X509SKI></DigitalId></ServiceDigitalIdentity><ServiceStatus>http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/undersupervision</ServiceStatus><StatusStartingTime>2016-06-06T14:37:24Z</StatusStartingTime></ServiceHistoryInstance></ServiceHistory></TSPService>

Direi che la issue si può chiudere e complimenti ancora per l'ottimo lavoro. lo includiamo in /italia come suggerivano in slack?

amusarra commented 5 years ago

Buongiorno @lucabonuccelli . Grazie ancora anche per i tuoi preziosi consigli. Non ho nessun problema ad includere il progetto su /italia, mi fa solo piacere. Ho appena finalizzato la release 1.1.0.

amusarra commented 5 years ago

Closed. Feature inserita sulla release 1.1.0

lucabonuccelli commented 5 years ago

Buongiorno @lucabonuccelli . Grazie ancora anche per i tuoi preziosi consigli. Non ho nessun problema ad includere il progetto su /italia, mi fa solo piacere. Ho appena finalizzato la release 1.1.0.

Di nulla, sono argomenti di nicchia che per caso conosco, grazie a te di aver ascoltato un "burocrasauro" pignolo ;) e, SOPRATTUTTO, di aver fatto squadra.