Skip to content

Commit

Permalink
Release 5.3.0 (#2)
Browse files Browse the repository at this point in the history
* [skip ci] Update project to latest tag sacerws-5.3.0

* Update pom.xml

* Fix scm

* [maven-release-plugin] prepare release sacerws-5.3.0

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: parerworker <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
3 people authored Jul 12, 2024
1 parent 195d9ec commit 7a0713c
Show file tree
Hide file tree
Showing 24 changed files with 108 additions and 132 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

## 5.3.0 (07-06-2024)

### Bugfix: 1
- [#32033](https://parermine.regione.emilia-romagna.it/issues/32033) Aggiornamento metadati: gestire errore dovuto all'aggiornamento errato del TipoConservazione

### Novità: 1
- [#32653](https://parermine.regione.emilia-romagna.it/issues/32653) Gestione invocazione microservice di verifica firma

## 5.2.0 (06-05-2024)

### Bugfix: 3
Expand Down
13 changes: 5 additions & 8 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
## 5.2.0 (06-05-2024)
## 5.3.0 (07-06-2024)

### Bugfix: 3
- [#32027](https://parermine.regione.emilia-romagna.it/issues/32027) Aggiornamento metadati: errore 666 se si tenta di aggiornare i Dati Specifici dei componenti
- [#31821](https://parermine.regione.emilia-romagna.it/issues/31821) Correzione gestione data scadenza in caso di "certificato scaduto" (verifica firma eidas)
- [#31285](https://parermine.regione.emilia-romagna.it/issues/31285) Correzione messaggio di errore di aggiornamento metadati
### Bugfix: 1
- [#32033](https://parermine.regione.emilia-romagna.it/issues/32033) Aggiornamento metadati: gestire errore dovuto all'aggiornamento errato del TipoConservazione

### Novità: 2
- [#31672](https://parermine.regione.emilia-romagna.it/issues/31672) Introduzione TAG "temporany" su bucket staging (con lifecycle)
- [#29276](https://parermine.regione.emilia-romagna.it/issues/29276) Salvataggio diretto su OS di Aggiornamento metadati UD
### Novità: 1
- [#32653](https://parermine.regione.emilia-romagna.it/issues/32653) Gestione invocazione microservice di verifica firma
Binary file added pdfdocs/CHANGELOG.pdf
Binary file not shown.
Binary file added pdfdocs/JBoss7_configurazione_generale.pdf
Binary file not shown.
Binary file added pdfdocs/JBoss7_configurazione_sacerws.pdf
Binary file not shown.
Binary file added pdfdocs/RELEASE-NOTES.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>sacerws</artifactId>
<version>5.2.1-SNAPSHOT</version>
<version>5.3.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>sacerws</name>
<description>Progetto SACERWS</description>
Expand Down Expand Up @@ -55,7 +55,7 @@
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sacerws-jpa</artifactId>
<version>${project.version}</version>
Expand Down
2 changes: 1 addition & 1 deletion sacerws-ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>sacerws</artifactId>
<groupId>it.eng.parer</groupId>
<version>5.2.1-SNAPSHOT</version>
<version>5.3.1-SNAPSHOT</version>
</parent>

<artifactId>sacerws-ear</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sacerws-ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sacerws</artifactId>
<groupId>it.eng.parer</groupId>
<version>5.2.1-SNAPSHOT</version>
<version>5.3.1-SNAPSHOT</version>
</parent>

<artifactId>sacerws-ejb</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* If not, see <https://www.gnu.org/licenses/>.
*/

package it.eng.parer.firma.crypto.verifica;
package it.eng.parer.firma.ejb;

import java.io.File;
import java.net.URI;
Expand Down Expand Up @@ -52,12 +52,11 @@
import it.eng.parer.crypto.model.verifica.input.CryptoProfiloVerifica;
import it.eng.parer.crypto.model.verifica.input.TipologiaDataRiferimento;
import it.eng.parer.entity.constraint.DecServizioVerificaCompDoc.CdServizioVerificaCompDoc;
import it.eng.parer.firma.crypto.helper.CryptoRestConfiguratorHelper;
import it.eng.parer.firma.ejb.IVerificaFirmaInvoker;
import it.eng.parer.firma.exception.VerificaFirmaConnectionException;
import it.eng.parer.firma.exception.VerificaFirmaGenericInvokeException;
import it.eng.parer.firma.exception.VerificaFirmaWrapperGenericException;
import it.eng.parer.firma.exception.VerificaFirmaWrapperResNotFoundException;
import it.eng.parer.firma.helper.CryptoRestConfiguratorHelper;
import it.eng.parer.firma.strategy.CryptoWrapperResultStrategy;
import it.eng.parer.firma.util.CryptoErrorHandler;
import it.eng.parer.firma.xml.VerificaFirmaWrapper;
Expand Down Expand Up @@ -233,12 +232,14 @@ public VerificaFirmaWrapper verificaAndWrapIt(ComponenteVers componenteVers,

final boolean hasFirmeDetached = sottoComponentiFirma != null && !sottoComponentiFirma.isEmpty();
CryptoAroCompDoc output;
if (isComponenteSuObjectStorage(componenteVers)) {
if (isComponenteSuObjectStorage(componenteVers) && !restInvoker.isEnableMultipartRequest().booleanValue()) {
LOG.debug("Invocazione verifica firma CRYPTO (application/json)");

CryptoDataToValidateDataUri data = buildDataUri(componenteVers, sottoComponentiFirma, sottoComponentiMarca);
output = verificaCrypto(data, metadata);

} else {
LOG.debug("Invocazione verifica firma CRYPTO (multipart/form-data)");

// File firme detached (o null)
List<File> sottoComponentiMarcaFile = compilaFileDetached(sottoComponentiMarca);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
import it.eng.parer.eidas.model.EidasWSReportsDTOTree;
import it.eng.parer.eidas.model.EidasValidationResponse;
import it.eng.parer.entity.constraint.DecServizioVerificaCompDoc.CdServizioVerificaCompDoc;
import it.eng.parer.firma.crypto.helper.EidasRestConfiguratorHelper;
import it.eng.parer.firma.exception.VerificaFirmaConnectionException;
import it.eng.parer.firma.exception.VerificaFirmaGenericInvokeException;
import it.eng.parer.firma.exception.VerificaFirmaWrapperGenericException;
import it.eng.parer.firma.exception.VerificaFirmaWrapperResNotFoundException;
import it.eng.parer.firma.helper.EidasRestConfiguratorHelper;
import it.eng.parer.firma.strategy.EidasWrapperResultStrategy;
import it.eng.parer.firma.util.EidasErrorHandler;
import it.eng.parer.firma.util.EidasUtils;
Expand Down Expand Up @@ -212,10 +212,12 @@ public VerificaFirmaWrapper verificaAndWrapIt(ComponenteVers componenteVers,
sottoComponentiFirma, controlliAbilitati, dataDiRiferimento, uuid);

// file from o.s.
if (isComponenteSuObjectStorage(componenteVers)) {
if (isComponenteSuObjectStorage(componenteVers) && !restInvoker.isEnableMultipartRequest().booleanValue()) {
LOG.debug("Invocazione verifica firma EIDAS (application/json)");
// call
esito = verificaEidasJson(dto);
} else {
LOG.debug("Invocazione verifica firma EIDAS (multipart/form-data)");
// file from multipart
final boolean hasFirmeDetached = sottoComponentiFirma != null && !sottoComponentiFirma.isEmpty();
File signed = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
import it.eng.parer.entity.DecFormatoFileDoc;
import it.eng.parer.entity.DecFormatoFileStandard;
import it.eng.parer.entity.OrgStrut;
import it.eng.parer.firma.crypto.verifica.VerFormatiEnums;
import it.eng.parer.firma.crypto.verifica.VerFormatiEnums.EsitoControlloFormato;
import it.eng.parer.firma.crypto.verifica.VerFormatiEnums.FormatiStandardFirme;
import it.eng.parer.firma.crypto.verifica.VerFormatiEnums.IdoneitaFormato;
import it.eng.parer.firma.dto.CompDocMock;
import it.eng.parer.firma.dto.input.InvokeVerificaInput;
import it.eng.parer.firma.dto.input.InvokeVerificaRule;
import it.eng.parer.firma.exception.VerificaFirmaException;
import it.eng.parer.firma.util.VerificaFormatiEnums;
import it.eng.parer.firma.util.VerificaFormatiEnums.EsitoControlloFormato;
import it.eng.parer.firma.util.VerificaFormatiEnums.FormatiStandardFirme;
import it.eng.parer.firma.util.VerificaFormatiEnums.IdoneitaFormato;
import it.eng.parer.firma.xml.VFAdditionalInfoBustaType;
import it.eng.parer.firma.xml.VFFirmaCompType;
import it.eng.parer.firma.xml.VFMarcaCompType;
Expand Down Expand Up @@ -391,18 +391,20 @@ private void extractFormatInfo(ComponenteVers componenteVers, long idTipoUd, Ver

if (formatoStd == null) {
formatoRapprBuilder.put(busta.getPgBusta().intValue(),
VerFormatiEnums.SEPARATORE_FORMATI + VerFormatiEnums.FORMATO_SCONOSCIUTO);
builderMessaggio.put(busta.getPgBusta().intValue(), VerFormatiEnums.SEPARATORE_FORMATI + nomeFormato);
VerificaFormatiEnums.SEPARATORE_FORMATI + VerificaFormatiEnums.FORMATO_SCONOSCIUTO);
builderMessaggio.put(busta.getPgBusta().intValue(),
VerificaFormatiEnums.SEPARATORE_FORMATI + nomeFormato);
} else if (!formatoStd.getNmFormatoFileStandard().equals(FormatiStandardFirme.XML.name())
&& !formatoStd.getNmFormatoFileStandard().equals(FormatiStandardFirme.PDF.name())) {
// sono esclusi i formati XML e PDF altrimenti avrei XML.XML o PDF.PDF
formatoRapprBuilder.put(busta.getPgBusta().intValue(),
VerFormatiEnums.SEPARATORE_FORMATI + formatoStd.getNmFormatoFileStandard());
builderMessaggio.put(busta.getPgBusta().intValue(), VerFormatiEnums.SEPARATORE_FORMATI + nomeFormato);
VerificaFormatiEnums.SEPARATORE_FORMATI + formatoStd.getNmFormatoFileStandard());
builderMessaggio.put(busta.getPgBusta().intValue(),
VerificaFormatiEnums.SEPARATORE_FORMATI + nomeFormato);
} else if (formatoStd.getNmFormatoFileStandard().equals(FormatiStandardFirme.XML.name())) {
tikaMime = VerFormatiEnums.XML_MIME;
tikaMime = VerificaFormatiEnums.XML_MIME;
} else if (formatoStd.getNmFormatoFileStandard().equals(FormatiStandardFirme.PDF.name())) {
tikaMime = VerFormatiEnums.PDF_MIME;
tikaMime = VerificaFormatiEnums.PDF_MIME;
}
}
// Eventuale normalizzazione mime type xml
Expand Down Expand Up @@ -466,7 +468,7 @@ private void extractFormatInfo(ComponenteVers componenteVers, long idTipoUd, Ver
// formatoStd può essere null se e solo se il mime tika non è censito tra i
// formati standard
if (formatoStd == null) {
formatoRapprBuilder.put(0, VerFormatiEnums.FORMATO_SCONOSCIUTO);
formatoRapprBuilder.put(0, VerificaFormatiEnums.FORMATO_SCONOSCIUTO);
} else {
formatoRapprBuilder.put(0, formatoStd.getNmFormatoFileStandard());
mock.setIdDecFormatoFileStandard(new BigDecimal(formatoStd.getIdFormatoFileStandard()));
Expand Down Expand Up @@ -505,17 +507,17 @@ private void extractFormatInfo(ComponenteVers componenteVers, long idTipoUd, Ver
formatoRappr.append(formatoStd.getNmFormatoFileStandard());
listaFormatiMimeTypeTika.append(formatoStd.getNmFormatoFileStandard());
} else {
formatoRapprEsteso.append(VerFormatiEnums.FORMATO_SCONOSCIUTO);
formatoRappr.append(VerFormatiEnums.FORMATO_SCONOSCIUTO);
formatoRapprEsteso.append(VerificaFormatiEnums.FORMATO_SCONOSCIUTO);
formatoRappr.append(VerificaFormatiEnums.FORMATO_SCONOSCIUTO);
listaFormatiMimeTypeTika.append(builderMessaggio.get(1));
}
} else {
// 2c - se è un componente che non ha contenuto [ie. caso di marca detached
// versata come componente, caso di formato di firma non conforme]
// MEV#18660
mock.setIdDecFormatoFileStandard(null);
formatoRapprBuilder.put(0, VerFormatiEnums.FORMATO_SCONOSCIUTO);
builderMessaggio.put(0, VerFormatiEnums.FORMATO_SCONOSCIUTO);
formatoRapprBuilder.put(0, VerificaFormatiEnums.FORMATO_SCONOSCIUTO);
builderMessaggio.put(0, VerificaFormatiEnums.FORMATO_SCONOSCIUTO);
String nthFormat = formatoRapprBuilder.get(0);
formatoRappr.append(nthFormat);
formatoRapprEsteso.append(nthFormat);
Expand Down Expand Up @@ -570,18 +572,18 @@ private void extractFormatInfo(ComponenteVers componenteVers, long idTipoUd, Ver
mock.setTiEsitoContrFormatoFile(EsitoControlloFormato.NEGATIVO.name());
StringBuilder esitoNegativo = new StringBuilder();
esitoNegativo.append("Il formato di rappresentazione");
if (formatoRappr.indexOf(VerFormatiEnums.FORMATO_SCONOSCIUTO) > -1) {
if (formatoRappr.indexOf(VerificaFormatiEnums.FORMATO_SCONOSCIUTO) > -1) {
esitoNegativo.append(" è sconosciuto");
if (!formatoRappr.toString().equalsIgnoreCase(listaFormatiMimeTypeTika.toString())
&& !VerFormatiEnums.OCTET_STREAM_MIME.equalsIgnoreCase(tikaMime)) {
&& !VerificaFormatiEnums.OCTET_STREAM_MIME.equalsIgnoreCase(tikaMime)) {
esitoNegativo.append(", può corrispondere a ");
esitoNegativo.append(listaFormatiMimeTypeTika);
}
} else {
esitoNegativo.append(" calcolato è ");
esitoNegativo.append(formatoRappr);
if (!formatoRappr.toString().equalsIgnoreCase(listaFormatiMimeTypeTika.toString())
&& !VerFormatiEnums.OCTET_STREAM_MIME.equalsIgnoreCase(tikaMime)) {
&& !VerificaFormatiEnums.OCTET_STREAM_MIME.equalsIgnoreCase(tikaMime)) {
esitoNegativo.append(", corrisponde a ");
esitoNegativo.append(listaFormatiMimeTypeTika);
}
Expand Down Expand Up @@ -759,7 +761,7 @@ private boolean testFormati(String formatoRappr, String formatoVers) throws Veri

private String buildMessage(List<DecFormatoFileStandard> res) {
if (res.isEmpty()) {
return VerFormatiEnums.FORMATO_SCONOSCIUTO;
return VerificaFormatiEnums.FORMATO_SCONOSCIUTO;
}
if (res.size() == 1) {
return res.get(0).getNmFormatoFileStandard();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import it.eng.parer.entity.FirCertifOcsp;
import it.eng.parer.entity.FirCrl;
import it.eng.parer.entity.FirOcsp;
import it.eng.parer.firma.crypto.verifica.CryptoInvoker;
import it.eng.parer.firma.dto.input.InvokeVerificaInput;
import it.eng.parer.firma.dto.input.InvokeVerificaRule;
import it.eng.parer.firma.exception.VerificaFirmaConnectionException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* If not, see <https://www.gnu.org/licenses/>.
*/

package it.eng.parer.firma.crypto.helper;
package it.eng.parer.firma.helper;

import java.util.LinkedList;
import java.util.List;
Expand Down Expand Up @@ -63,6 +63,8 @@ public class CryptoRestConfiguratorHelper implements RestConfiguratorHelper {

private static final String PARAMETRO_NON_TROVATO = "Parametro {} non trovato. Utilizzo il valore predefinito.";

public static final String FL_CRYPTO_ENABLE_REQUEST_MULTIPART_FORMDATA = "FL_CRYPTO_ENABLE_REQUEST_MULTIPART_FORMDATA";

private static final String ENDPOINT_SEPARATOR = "\\|";

@EJB
Expand Down Expand Up @@ -141,6 +143,10 @@ public Boolean isCompositePolicyOptimisticParam() {
return getBooleanParameter(CRYPTO_COMPOSITE_POLICY_OPTIMISTIC);
}

public Boolean isEnableMultipartRequest() {
return getBooleanParameter(FL_CRYPTO_ENABLE_REQUEST_MULTIPART_FORMDATA);
}

/**
* Lista degli endpoint per i servizi REST. Tendenzialmente questa verrà trattata come una lista circolare.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* If not, see <https://www.gnu.org/licenses/>.
*/

package it.eng.parer.firma.crypto.helper;
package it.eng.parer.firma.helper;

import it.eng.parer.exception.ParamApplicNotFoundException;
import it.eng.parer.retry.RestConfiguratorHelper;
Expand Down Expand Up @@ -60,6 +60,8 @@ public class EidasRestConfiguratorHelper implements RestConfiguratorHelper {

private static final String EIDAS_COMPOSITE_POLICY_OPTIMISTIC = "EIDAS_COMPOSITE_POLICY_OPTIMISTIC";

public static final String FL_EIDAS_ENABLE_REQUEST_MULTIPART_FORMDATA = "FL_EIDAS_ENABLE_REQUEST_MULTIPART_FORMDATA";

private static final String PARAMETRO_NON_TROVATO = "Parametro {} non trovato. Utilizzo il valore predefinito.";

private static final String ENDPOINT_SEPARATOR = "\\|";
Expand Down Expand Up @@ -142,6 +144,10 @@ public Boolean isCompositePolicyOptimisticParam() {
return getBooleanParameter(EIDAS_COMPOSITE_POLICY_OPTIMISTIC);
}

public Boolean isEnableMultipartRequest() {
return getBooleanParameter(FL_EIDAS_ENABLE_REQUEST_MULTIPART_FORMDATA);
}

/**
* Lista degli endpoint per i servizi REST. Tendenzialmente questa verrà trattata come una lista circolare.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package it.eng.parer.firma.crypto.verifica;
package it.eng.parer.firma.util;

/**
*
* @author Quaranta_M
*/
public class VerFormatiEnums {
public class VerificaFormatiEnums {

public enum FormatiStandardFirme {

Expand Down
Loading

0 comments on commit 7a0713c

Please sign in to comment.