No description
Find a file
2021-05-11 18:49:15 -03:00
.github Help to cs:fix when fail 2021-04-17 11:41:40 -03:00
.tx Fix transifex setting 2021-04-22 14:46:12 -03:00
appinfo Merge branch 'main' into signature-validate 2021-05-07 08:36:26 -03:00
cfssl Rollback commit 2021-02-04 21:21:53 -03:00
docs Deprecate endpoint 2021-05-07 18:59:57 -03:00
dsv Rollback commit 2021-02-04 21:21:53 -03:00
img redesign of the validation screen 2021-05-04 17:58:17 -03:00
l10n [tx-robot] updated from transifex 2021-05-06 03:43:36 +00:00
lib Merge branch 'main' into signature-validate 2021-05-07 08:36:26 -03:00
src Merge pull request #221 from raw-vitor/signature-validate 2021-05-11 14:34:52 -03:00
templates Validate page route to external route. 2021-04-27 14:59:42 -03:00
tests * Return permission to request sign in validate method 2021-05-06 18:15:06 -03:00
.eslintignore Remove signature path button 2021-02-02 11:30:14 -03:00
.eslintrc.js add library on eslint rules 2021-05-06 00:31:09 -03:00
.gitattributes Rollback commit 2021-02-04 21:21:53 -03:00
.gitignore Update .gitignore 2021-05-11 18:49:15 -03:00
.l10nignore Ignored folders by transifex 2021-03-18 19:42:34 -03:00
.npmignore Config to translate all text. 2021-02-08 18:04:51 -03:00
.php_cs.dist Rollback commit 2021-02-04 21:21:53 -03:00
.prettierrc Merge branch 'signature-validate' into main 2021-04-26 12:33:03 -03:00
babel.config.js Rollback commit 2021-02-04 21:21:53 -03:00
changelog-linker.php Hotfix 2021-03-03 14:52:26 -03:00
CHANGELOG.md Changelog 2021-04-12 15:34:50 -03:00
composer.json Remove swagger-gen 2021-05-06 18:58:13 -03:00
composer.lock Remove swagger-gen 2021-05-06 18:58:13 -03:00
cypress.json Configure Cypress for Integration Tests 2021-02-16 00:27:10 -03:00
jest.config.js Configured jest librarie for execute unit tests 2021-02-16 08:49:46 -03:00
LICENSE Rollback commit 2021-02-04 21:21:53 -03:00
Makefile Remove swagger-gen 2021-05-06 18:58:13 -03:00
package.json Merge pull request #216 from LibreSign/file-tab 2021-05-05 13:45:16 -03:00
phpunit.xml Rollback commit 2021-02-04 21:21:53 -03:00
README.md Review last commit 2021-05-02 15:03:56 -03:00
stylelint.config.js Rollback commit 2021-02-04 21:21:53 -03:00
webpack.dev.js Spacing in webpack configuration files 2021-04-25 23:33:12 -03:00
webpack.prod.js Spacing in webpack configuration files 2021-04-25 23:33:12 -03:00
yarn.lock date-fns 2021-05-09 00:31:07 -03:00

Test Status

LibreSign

Nextcloud app to sign PDF documents.

At the moment file signature requests must be requested via webhook. Read the documentation for more information.

Setup

Java and JSignPDF

Add the follow to Nextcloud PHP container Dockerfile

# Install Java and JsignPDF
RUN apt-get update # Only include this line if necessary
RUN mkdir -p /usr/share/man/man1
RUN apt-get install -y default-jre unzip
RUN curl -OL https://sourceforge.net/projects/jsignpdf/files/stable/JSignPdf%201.6.4/JSignPdf-1.6.4.zip \
    && unzip JSignPdf-1.6.4.zip -d /opt \
    && rm JSignPdf-1.6.4.zip

With CFSS server

Don't is necessary if you use a docker setup

Up a cfssl server using this code:

https://github.com/cloudflare/cfssl

The URL of server you will use in Admin settings

With docker-compose

  • Create a folder named cfssl in the same folder as your docker-compose.yml file. This folder will be used on one volume of the cfssl service.
  • put the file /cfssl/entrypoint.sh in cfssl folder
  • Add the volume ./cfssl:/cfssl in Nextcloud php service
  • Create a new server using the following code in your docker-compose.yml file:
  cfssl:
    image: cfssl/cfssl
    volumes:
      - ./cfssl:/cfssl
    working_dir: /cfssl
    entrypoint: /bin/bash
    command:
      - /cfssl/entrypoint.sh

Admin settings

Go to Settings > LibreSign and fill the necessary values for root certificate:

CN: CommonName
OU: OrganizationalUnit
O: Organization
C: CountryName
API: http://cfssl:8888/api/v1/cfssl/
Config path: /cfssl/

Go to Settings > Basic Settings and configure email settings. Is mandatory.

Validation page

The validation can be done on a page without access restriction informing the file UUID or the file to be validated.

Route Description
/apps/libresign/validation Document validation home page. On this page it is possible to send a binary or enter a file UUID for validation.
/apps/libresign/validation/ Enter the UUID of the file in the URL and go straight to the page informing the signature data.

To have a short URL at the bottom of the document, you can add these directives to your Nginx. Replace domains with those for your application.

server {
    listen 80;
    server_name validate.yourdomain.coop;
    location ~ "\/(?<uuid>[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})" {
        rewrite ^ $scheme://cloud.yourdomain.coop/apps/libresign/validation/$uuid;
    }
    location ~ / {
        return 301 $scheme://cloud.yourdomain.coop/apps/libresign/validation;
    }
}

With this configuration when accessing validate.yourdomain.coop/b9809a7e-ab6e-11eb-bcbc-0242ac130002 you will be redirected to cloud.yourdomain.coop/apps/libresign/validation/b9809a7e-ab6e-11eb-bcbc-0242ac130002

Integrations

  • GLPI: Plugin to sign GLPI tickets

Full documentation

here

Contributing

Feel free to submit Github Issues or pull requests.

The documentation website is build from the docs folder with vuepress.

To start front and backend development environment

make serve

To build documentation

make docs

To run PHPUnit

make test

Read more in composer.json scripts section