Skip to content

Commit

Permalink
[TestsuiteProtocolloSPCoop]
Browse files Browse the repository at this point in the history
Aggiunti test che verificano l'identità portata nella busta rispetto alle credenziali presenti nella richiesta.
  • Loading branch information
andreapoli committed Oct 22, 2021
1 parent a662201 commit 80e7589
Show file tree
Hide file tree
Showing 7 changed files with 1,494 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3853,9 +3853,6 @@






<!-- Autorizzazione per Contenuto -->
<porta-delegata gestione-manifest="abilitato" nome="AutorizzazioneContenutoOK" autenticazione="none" autorizzazione="none" autorizzazione-contenuto="esempioOK" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
Expand Down Expand Up @@ -8137,7 +8134,24 @@




<!-- Autenticazione HTTPS sulla Porta Applicativa -->
<porta-applicativa autenticazione="ssl" autorizzazione="authenticated" gestione-manifest="abilitato" nome="PAHTTPSAutenticazione">
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa" />
<servizio-applicativo nome="govwayTestSuite" />
<soggetti>
<soggetto tipo="spc" nome="Soggetto1conCredenzialiSSL"/>
</soggetti>
</porta-applicativa>
<porta-applicativa autenticazione="ssl" autenticazione-opzionale="abilitato" autorizzazione="authenticated" gestione-manifest="abilitato" nome="PAHTTPSAutenticazioneOpzionale">
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa_opzionale" />
<servizio-applicativo nome="govwayTestSuite" />
<soggetti>
<soggetto tipo="spc" nome="Soggetto1conCredenzialiSSL"/>
<soggetto tipo="spc" nome="Soggetto2SenzaCredenziali"/>
</soggetti>
</porta-applicativa>

<!-- HTTPS Sil Consegna -->
<porta-applicativa autenticazione="none" gestione-manifest="abilitato" nome="PAHTTPSSilConsegna">
Expand Down Expand Up @@ -11394,6 +11408,72 @@

</soggetto>


<soggetto tipo="spc" nome="Soggetto1conCredenzialiSSL" >

<!-- Autenticazione HTTPS sulla Porta Applicativa -->
<porta-delegata gestione-manifest="abilitato" nome="Soggetto1conCredenzialiSSL_https_PAHTTPSAutenticazione" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa" />
</porta-delegata>
<porta-delegata gestione-manifest="abilitato" nome="Soggetto1conCredenzialiSSL_https_PAHTTPSAutenticazioneOpzionale" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa_opzionale" />
</porta-delegata>

</soggetto>

<soggetto tipo="spc" nome="Soggetto2conCredenzialiSSL" >

<!-- Autenticazione HTTPS sulla Porta Applicativa -->
<porta-delegata gestione-manifest="abilitato" nome="Soggetto2conCredenzialiSSL_https_PAHTTPSAutenticazione" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa" />
</porta-delegata>
<porta-delegata gestione-manifest="abilitato" nome="Soggetto2conCredenzialiSSL_https_PAHTTPSAutenticazioneOpzionale" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa_opzionale" />
</porta-delegata>

</soggetto>

<soggetto tipo="spc" nome="Soggetto1SenzaCredenziali" >

<!-- Autenticazione HTTPS sulla Porta Applicativa -->
<porta-delegata gestione-manifest="abilitato" nome="Soggetto1SenzaCredenziali_https_PAHTTPSAutenticazione" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa" />
</porta-delegata>
<porta-delegata gestione-manifest="abilitato" nome="Soggetto1SenzaCredenziali_https_PAHTTPSAutenticazioneOpzionale" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa_opzionale" />
</porta-delegata>

</soggetto>

<soggetto tipo="spc" nome="Soggetto2SenzaCredenziali" >

<!-- Autenticazione HTTPS sulla Porta Applicativa -->
<porta-delegata gestione-manifest="abilitato" nome="Soggetto2SenzaCredenziali_https_PAHTTPSAutenticazione" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa" />
</porta-delegata>
<porta-delegata gestione-manifest="abilitato" nome="Soggetto2SenzaCredenziali_https_PAHTTPSAutenticazioneOpzionale" autenticazione="none" autorizzazione="none" integrazione="trasporto,urlBased,soap">
<soggetto-erogatore tipo="spc" nome="MinisteroErogatore" />
<servizio tipo="spc" nome="RichiestaStatoAvanzamento" />
<azione nome="https_autenticazione_pa_opzionale" />
</porta-delegata>

</soggetto>


<!-- Start Configurazione valida solo per xml -->
<soggetto tipo="spc" nome="SoggettoNonEsistenteRegistro">
</soggetto>
Expand Down
75 changes: 75 additions & 0 deletions protocolli/spcoop/testsuite/deploy/config_file/registroServizi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@
<azione nome="https_ca_non_presente"/>
<azione nome="https_hostname_verify"/>
<azione nome="https_sil_consegna"/>
<azione nome="https_autenticazione_pa"/>
<azione nome="https_autenticazione_pa_opzionale"/>
<!-- Filtro duplicati -->
<azione nome="FiltroDuplicatiStateless" filtro-duplicati="abilitato"/>
<azione nome="FiltroDuplicatiStateful" filtro-duplicati="abilitato"/>
Expand Down Expand Up @@ -789,7 +791,37 @@
</connettore>
</soggetto>

<!-- Soggetti SPCoop in supporto per l'autorizzazione anti-spoofing tramite meccanismo di autenticazione sulla Porta -->

<soggetto tipo="spc" nome="Soggetto1conCredenzialiSSL">
<connettore tipo="http" nome="Soggetto1conCredenzialiSSL">
<property nome="location" valore="http://localhost:8080/govway/spcoop/in"/>
</connettore>
<credenziali tipo="ssl"
subject="/CN=Soggetto1/ OU=test/ L=Pisa/ O=openspcoop.org/ ST=Italy/ C=IT/ [email protected]"
issuer="/CN=Soggetto1/ OU=test/ L=Pisa/ O=openspcoop.org/ ST=Italy/ C=IT/ [email protected]"/>
</soggetto>
<soggetto tipo="spc" nome="Soggetto2conCredenzialiSSL">
<connettore tipo="http" nome="Soggetto2conCredenzialiSSL">
<property nome="location" valore="http://localhost:8080/govway/spcoop/in"/>
</connettore>
<credenziali tipo="ssl"
subject="/CN=Soggetto2/ OU=test/ L=Pisa/ O=openspcoop.org/ ST=Italy/ C=IT/ [email protected]"
issuer="/CN=Soggetto2/ OU=test/ L=Pisa/ O=openspcoop.org/ ST=Italy/ C=IT/ [email protected]"/>
</soggetto>
<soggetto tipo="spc" nome="Soggetto1SenzaCredenziali">
<connettore tipo="http" nome="Soggetto1SenzaCredenziali">
<property nome="location" valore="http://localhost:8080/govway/spcoop/in"/>
</connettore>
<credenziali tipo="ssl"
subject="/CN=soggetto1alternativo/ L=Pisa/ C=IT"
issuer="/CN=soggetto1alternativo/ L=Pisa/ C=IT"/> <!-- sono credenziali che non sono realmente mai usate e servono a verificare un antispoofing -->
</soggetto>
<soggetto tipo="spc" nome="Soggetto2SenzaCredenziali">
<connettore tipo="http" nome="Soggetto2SenzaCredenziali">
<property nome="location" valore="http://localhost:8080/govway/spcoop/in"/>
</connettore>
</soggetto>


<!-- Soggetto per esempio SoapBox -->
Expand Down Expand Up @@ -1116,6 +1148,49 @@
</connettore>
</fruitore>

<fruitore tipo="spc" nome="Soggetto1conCredenzialiSSL">
<!-- Viene utilizzato come identita il soggetto1: corretto -->
<connettore tipo="https" nome="Soggetto1conCredenzialiSSL">
<property nome="location" valore="https://127.0.0.1:8444/govway/spcoop/in"/>
<property nome="trustStoreLocation" valore="/etc/govway/keys/soggetto1.jks"/>
<property nome="trustStorePassword" valore="openspcoopjks"/>
<property nome="keyStoreLocation" valore="/etc/govway/keys/soggetto1.jks"/>
<property nome="keyStorePassword" valore="openspcoopjks"/>
<property nome="keyPassword" valore="openspcoop"/>
<property nome="hostnameVerifier" valore="false"/>
</connettore>
</fruitore>
<fruitore tipo="spc" nome="Soggetto2conCredenzialiSSL">
<!-- Viene utilizzato come identita il soggetto1: scorretto -->
<connettore tipo="https" nome="Soggetto2conCredenzialiSSL">
<property nome="location" valore="https://127.0.0.1:8444/govway/spcoop/in"/>
<property nome="trustStoreLocation" valore="/etc/govway/keys/soggetto1.jks"/>
<property nome="trustStorePassword" valore="openspcoopjks"/>
<property nome="keyStoreLocation" valore="/etc/govway/keys/soggetto1.jks"/>
<property nome="keyStorePassword" valore="openspcoopjks"/>
<property nome="keyPassword" valore="openspcoop"/>
<property nome="hostnameVerifier" valore="false"/>
</connettore>
</fruitore>
<fruitore tipo="spc" nome="Soggetto1SenzaCredenziali">
<!-- Viene utilizzata una credenziale non censita su autententicazione https: scorretto -->
<connettore tipo="https" nome="Soggetto1SenzaCredenziali">
<property nome="location" valore="https://127.0.0.1:8444/govway/spcoop/in"/>
<property nome="trustStoreLocation" valore="/etc/govway/keys/soggetto1_multipleOU.jks"/>
<property nome="trustStorePassword" valore="123456"/>
<property nome="keyStoreLocation" valore="/etc/govway/keys/soggetto1_multipleOU.jks"/>
<property nome="keyStorePassword" valore="123456"/>
<property nome="keyPassword" valore="123456"/>
<property nome="hostnameVerifier" valore="false"/>
</connettore>
</fruitore>
<fruitore tipo="spc" nome="Soggetto2SenzaCredenziali">
<!-- Non viene inviata alcuna credenziale: passerà solamente se l'autenticazione https e' opzionale -->
<connettore tipo="http" nome="Soggetto2SenzaCredenziali">
<property nome="location" valore="http://127.0.0.1:8080/govway/spcoop/in"/>
</connettore>
</fruitore>

<!-- Fruitori per test PdUrlPrefixRewriter -->
<!--
<fruitore tipo="spc" nome="TestUrlPrefixRewriter1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,17 @@ public class CostantiTestSuite {
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_SPOOFING_RILEVATO_TRAMITE_FRUIZIONE="AutorizzazioneSPCoopSpoofingRilevatoTramiteFruizione";
/** Porte Delegate per il test sull'autorizzazione spcoop: fruitore non presente nella lista dei fruitori del servizio*/
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_FRUITORE_NON_PRESENTE="AutorizzazioneSPCoopSoggetto1Fallita";

public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_SOGGETTO1 = "Soggetto1conCredenzialiSSL_https_PAHTTPSAutenticazione";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_OPZIONALE_SOGGETTO1 = "Soggetto1conCredenzialiSSL_https_PAHTTPSAutenticazioneOpzionale";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_SOGGETTO2 = "Soggetto2conCredenzialiSSL_https_PAHTTPSAutenticazione";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_OPZIONALE_SOGGETTO2 = "Soggetto2conCredenzialiSSL_https_PAHTTPSAutenticazioneOpzionale";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_SOGGETTO1_SENZA_CREDENZIALI = "Soggetto1SenzaCredenziali_https_PAHTTPSAutenticazione";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_OPZIONALE_SOGGETTO1_SENZA_CREDENZIALI = "Soggetto1SenzaCredenziali_https_PAHTTPSAutenticazioneOpzionale";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_SOGGETTO2_SENZA_CREDENZIALI = "Soggetto2SenzaCredenziali_https_PAHTTPSAutenticazione";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_SPCOOP_AUTENTICAZIONE_HTTPS_PA_OPZIONALE_SOGGETTO2_SENZA_CREDENZIALI = "Soggetto2SenzaCredenziali_https_PAHTTPSAutenticazioneOpzionale";


/** Porte Delegate per il test sull'autorizzazione per contenuto */
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_CONTENUTO_SINCRONO_OK="AutorizzazioneContenutoOK";
public static final String PORTA_DELEGATA_AUTORIZZAZIONE_CONTENUTO_SINCRONO_KO="AutorizzazioneContenutoKO";
Expand Down Expand Up @@ -997,6 +1007,46 @@ public class CostantiTestSuite {
public static final IDSoggetto SPCOOP_SOGGETTO_NON_AUTENTICATO = new IDSoggetto(CostantiTestSuite.SPCOOP_TIPO_SOGGETTO_NON_AUTENTICATO,
CostantiTestSuite.SPCOOP_NOME_SOGGETTO_NON_AUTENTICATO, CostantiTestSuite.SPCOOP_IDPORTA_SOGGETTO_NON_AUTENTICATO);

/** ENTITA SPCOOP: Tipo Soggetto 1 */
public static final String SPCOOP_TIPO_SOGGETTO_1_CON_CREDENZIALI_SSL="spc";
/** ENTITA SPCOOP: Nome Soggetto 1 */
public static final String SPCOOP_NOME_SOGGETTO_1_CON_CREDENZIALI_SSL="Soggetto1conCredenzialiSSL";
/** ENTITA SPCOOP: IdPorta Soggetto 1 */
public static final String SPCOOP_IDPORTA_SOGGETTO_1_CON_CREDENZIALI_SSL="Soggetto1conCredenzialiSSLSPCoopIT";
/** ENTITA SPCOOP: IDSoggetto */
public static final IDSoggetto SPCOOP_SOGGETTO_1_CON_CREDENZIALI_SSL = new IDSoggetto(CostantiTestSuite.SPCOOP_TIPO_SOGGETTO_1_CON_CREDENZIALI_SSL, CostantiTestSuite.SPCOOP_NOME_SOGGETTO_1_CON_CREDENZIALI_SSL,
CostantiTestSuite.SPCOOP_IDPORTA_SOGGETTO_1_CON_CREDENZIALI_SSL);

/** ENTITA SPCOOP: Tipo Soggetto 2 */
public static final String SPCOOP_TIPO_SOGGETTO_2_CON_CREDENZIALI_SSL="spc";
/** ENTITA SPCOOP: Nome Soggetto 2 */
public static final String SPCOOP_NOME_SOGGETTO_2_CON_CREDENZIALI_SSL="Soggetto2conCredenzialiSSL";
/** ENTITA SPCOOP: IdPorta Soggetto 2 */
public static final String SPCOOP_IDPORTA_SOGGETTO_2_CON_CREDENZIALI_SSL="Soggetto2conCredenzialiSSLSPCoopIT";
/** ENTITA SPCOOP: IDSoggetto */
public static final IDSoggetto SPCOOP_SOGGETTO_2_CON_CREDENZIALI_SSL = new IDSoggetto(CostantiTestSuite.SPCOOP_TIPO_SOGGETTO_2_CON_CREDENZIALI_SSL, CostantiTestSuite.SPCOOP_NOME_SOGGETTO_2_CON_CREDENZIALI_SSL,
CostantiTestSuite.SPCOOP_IDPORTA_SOGGETTO_2_CON_CREDENZIALI_SSL);

/** ENTITA SPCOOP: Tipo Soggetto 1 */
public static final String SPCOOP_TIPO_SOGGETTO_1_SENZA_CREDENZIALI="spc";
/** ENTITA SPCOOP: Nome Soggetto 1 */
public static final String SPCOOP_NOME_SOGGETTO_1_SENZA_CREDENZIALI="Soggetto1SenzaCredenziali";
/** ENTITA SPCOOP: IdPorta Soggetto 1 */
public static final String SPCOOP_IDPORTA_SOGGETTO_1_SENZA_CREDENZIALI="Soggetto1SenzaCredenzialiSPCoopIT";
/** ENTITA SPCOOP: IDSoggetto */
public static final IDSoggetto SPCOOP_SOGGETTO_1_SENZA_CREDENZIALI = new IDSoggetto(CostantiTestSuite.SPCOOP_TIPO_SOGGETTO_1_SENZA_CREDENZIALI, CostantiTestSuite.SPCOOP_NOME_SOGGETTO_1_SENZA_CREDENZIALI,
CostantiTestSuite.SPCOOP_IDPORTA_SOGGETTO_1_SENZA_CREDENZIALI);

/** ENTITA SPCOOP: Tipo Soggetto 2 */
public static final String SPCOOP_TIPO_SOGGETTO_2_SENZA_CREDENZIALI="spc";
/** ENTITA SPCOOP: Nome Soggetto 2 */
public static final String SPCOOP_NOME_SOGGETTO_2_SENZA_CREDENZIALI="Soggetto2SenzaCredenziali";
/** ENTITA SPCOOP: IdPorta Soggetto 2 */
public static final String SPCOOP_IDPORTA_SOGGETTO_2_SENZA_CREDENZIALI="Soggetto2SenzaCredenzialiSPCoopIT";
/** ENTITA SPCOOP: IDSoggetto */
public static final IDSoggetto SPCOOP_SOGGETTO_2_SENZA_CREDENZIALI = new IDSoggetto(CostantiTestSuite.SPCOOP_TIPO_SOGGETTO_2_SENZA_CREDENZIALI, CostantiTestSuite.SPCOOP_NOME_SOGGETTO_2_SENZA_CREDENZIALI,
CostantiTestSuite.SPCOOP_IDPORTA_SOGGETTO_2_SENZA_CREDENZIALI);

/** ENTITA SPCOOP: Tipo Soggetto TestUrlPrefixRewriter1 */
public static final String SPCOOP_TIPO_SOGGETTO_TEST_URL_PREFIX_REWRITER_1="spc";
/** ENTITA SPCOOP: Nome Soggetto TestUrlPrefixRewriter1 */
Expand Down Expand Up @@ -1417,6 +1467,10 @@ public class CostantiTestSuite {
public static final String SPCOOP_SERVIZIO_SINCRONO_AZIONE_HTTPS_CA_NON_PRESENTE="https_ca_non_presente";
/** ENTITA SPCOOP: Nome Azione del Servizio Sincrono con https_hostname_verify */
public static final String SPCOOP_SERVIZIO_SINCRONO_AZIONE_HTTPS_HOSTNAME_VERIFY="https_hostname_verify";
/** ENTITA SPCOOP: Nome Azione del Servizio Sincrono con https_autenticazione_pa */
public static final String SPCOOP_SERVIZIO_SINCRONO_AZIONE_HTTPS_AUTENTICAZIONE_PA="https_autenticazione_pa";
/** ENTITA SPCOOP: Nome Azione del Servizio Sincrono con https_autenticazione_pa_opzionale */
public static final String SPCOOP_SERVIZIO_SINCRONO_AZIONE_HTTPS_AUTENTICAZIONE_PA_OPZIONALE="https_autenticazione_pa_opzionale";
/** ENTITA SPCOOP: Nome Azione del Servizio Sincrono con https_sil_consegna */
public static final String SPCOOP_SERVIZIO_SINCRONO_AZIONE_HTTPS_SIL_CONSEGNA="https_sil_consegna";
/** ENTITA SPCOOP: Nome Azione del Servizio Sincrono per test Filtro Duplicati stateless */
Expand Down
Loading

0 comments on commit 80e7589

Please sign in to comment.