diff options
author | emusic <emina.music@egiz.gv.at> | 2018-07-10 11:07:08 +0200 |
---|---|---|
committer | emusic <emina.music@egiz.gv.at> | 2018-07-10 11:07:08 +0200 |
commit | 21c932574c86031da3bed44b94bf3f54a930070d (patch) | |
tree | bc5616ef604174ebf3bdda45db0c04cbfa9c2a82 | |
parent | 9acf3c2e8aca9016daf76785747d838cdc5b0330 (diff) | |
download | pdf-as-4-21c932574c86031da3bed44b94bf3f54a930070d.tar.gz pdf-as-4-21c932574c86031da3bed44b94bf3f54a930070d.tar.bz2 pdf-as-4-21c932574c86031da3bed44b94bf3f54a930070d.zip |
changes in pdf-as-web config
5 files changed, 48 insertions, 25 deletions
diff --git a/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5.xml b/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5.xml new file mode 100644 index 00000000..c3e23cab --- /dev/null +++ b/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5.xml @@ -0,0 +1,11 @@ +<component name="libraryTable"> + <library name="Gradle: com.google.code.gson:gson:2.8.5"> + <CLASSES> + <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.5/f645ed69d595b24d4cf8b3fbb64cc505bede8829/gson-2.8.5.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES> + <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.8.5/c5b4c491aecb72e7c32a78da0b5c6b9cda8dee0f/gson-2.8.5-sources.jar!/" /> + </SOURCES> + </library> +</component>
\ No newline at end of file diff --git a/.idea/libraries/Gradle__org_bitbucket_b_c_jose4j_0_6_3.xml b/.idea/libraries/Gradle__org_bitbucket_b_c_jose4j_0_6_3.xml new file mode 100644 index 00000000..9da71daf --- /dev/null +++ b/.idea/libraries/Gradle__org_bitbucket_b_c_jose4j_0_6_3.xml @@ -0,0 +1,11 @@ +<component name="libraryTable"> + <library name="Gradle: org.bitbucket.b_c:jose4j:0.6.3"> + <CLASSES> + <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.bitbucket.b_c/jose4j/0.6.3/5bf092aa7be6fe8894d11f8d2040a2b3b401a14/jose4j-0.6.3.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES> + <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.bitbucket.b_c/jose4j/0.6.3/2ed192025755ff7d79193325ca1793ba22dc10b0/jose4j-0.6.3-sources.jar!/" /> + </SOURCES> + </library> +</component>
\ No newline at end of file diff --git a/.idea/libraries/Gradle__org_slf4j_slf4j_api_1_7_21.xml b/.idea/libraries/Gradle__org_slf4j_slf4j_api_1_7_21.xml new file mode 100644 index 00000000..12bea8a3 --- /dev/null +++ b/.idea/libraries/Gradle__org_slf4j_slf4j_api_1_7_21.xml @@ -0,0 +1,11 @@ +<component name="libraryTable"> + <library name="Gradle: org.slf4j:slf4j-api:1.7.21"> + <CLASSES> + <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.21/139535a69a4239db087de9bab0bee568bf8e0b70/slf4j-api-1.7.21.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES> + <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.21/f285ac123f201fb4b028bac556928d7cf527ef48/slf4j-api-1.7.21-sources.jar!/" /> + </SOURCES> + </library> +</component>
\ No newline at end of file diff --git a/pdf-as-web/src/main/configuration/pdf-as-web.properties b/pdf-as-web/src/main/configuration/pdf-as-web.properties index 10ef26a1..59d76607 100644 --- a/pdf-as-web/src/main/configuration/pdf-as-web.properties +++ b/pdf-as-web/src/main/configuration/pdf-as-web.properties @@ -70,3 +70,18 @@ request.store=at.gv.egiz.pdfas.web.store.InMemoryRequestStore #hibernate.props.hibernate.show_sql=true #hibernate.props.hibernate.hbm2ddl.auto=update +#Security layer 2.0 config + +#sl20.sign.enabled=true +#sl20.mobile.url=http://localhost:7080/vda/services/getCertificate +sl20.keystore.file= +sl20.keystore.pass= +sl20.keystore.sign.key.alias= +sl20.keystore.sign.key.pass= +sl20.keystore.enc.key.alias= +sl20.keystore.enc.key.pass= +sl20.debug.validation.disable=true +sl20.debug.signed.result.enabled=false +sl20.debug.signed.result.required=false +sl20.debug.encryption.enabled=false +sl20.debug.encryption.required=false diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java index 4d3d1872..bc773ec8 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java @@ -95,31 +95,6 @@ public class PDFData extends HttpServlet { if (signedData != null) { - /*if (WebConfiguration.isPdfProtected()) { - File tempFile = new File(System.getProperty("java.io.tmpdir"),"protect.pdf"); - FileUtils.writeByteArrayToFile(tempFile, signedData); - Path tempPath = tempFile.toPath(); - SecureRandom random = new SecureRandom(); - byte seed[] = random.generateSeed(50); - String ownerPassword = new String(seed, StandardCharsets.UTF_8); - PDDocument document = PDDocument.load(tempFile); - AccessPermission accessPermission = new AccessPermission(); - accessPermission.setCanExtractContent(false); - accessPermission.setCanExtractForAccessibility(true); - StandardProtectionPolicy spp = new StandardProtectionPolicy(ownerPassword, "", accessPermission); - spp.setEncryptionKeyLength(128); - spp.setPermissions(accessPermission); - document.protect(spp); - document.save(tempFile); - document.close(); - //accessPermission.setCanModify(false); - signedData = Files.readAllBytes(tempPath); - logger.info("Added Protection Parameters"); - if (tempFile.exists()) { - tempFile.delete(); - } - }*/ - if(WebConfiguration.isKeepSignedDocument()) { if(PdfAsHelper.isSignedDataExpired(request, response)) { logger.info("Destroying expired signed data in session"); |