No description
Find a file
Nextcloud bot daee2cdea6
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-05-01 03:48:37 +00:00
.github Change branches of draft releases 2021-12-06 02:56:50 +00:00
.tx Fix transifex setting 2021-04-22 14:46:12 -03:00
appinfo Update appinfo/routes.php 2022-02-09 19:16:16 +00:00
cfssl Rollback commit 2021-02-04 21:21:53 -03:00
img Update image readme 2021-08-30 13:58:40 -03:00
l10n [tx-robot] updated from transifex 2022-05-01 03:48:37 +00:00
lib Run pkcs7 test 2022-02-13 16:05:19 +00:00
src Change text 2022-02-09 19:16:16 +00:00
templates Route for calling password reset by files 2021-05-17 13:56:50 -03:00
tests Run pkcs7 test 2022-02-13 16:05:19 +00:00
.eslintignore ignore coverage 2021-07-28 12:45:41 -03:00
.eslintrc.js 🔧 (396): refine eslint rules 2021-10-31 11:40:48 -03:00
.gitattributes Rollback commit 2021-02-04 21:21:53 -03:00
.gitignore Bump php dependency 2022-01-15 11:48:47 +00: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-fixer.dist.php Bump php dependency 2022-01-15 11:48:47 +00: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.md 📝 update CHANGELOG.md 2022-01-17 15:39:34 -03:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2021-05-07 19:59:03 -03:00
composer.json Create install commands 2022-01-31 13:22:56 +00:00
composer.lock Bump vimeo/psalm from 4.19.0 to 4.20.0 2022-02-06 15:50:08 +00:00
CONTRIBUTING.md Change site durl 2021-06-10 23:39:15 -03:00
cypress.json Configure Cypress for Integration Tests 2021-02-16 00:27:10 -03:00
jest.config.js new configs to see Nextcloud vars 2021-08-02 13:42:23 -03:00
jsconfig.json exclude folder js 2021-09-09 11:27:33 -03:00
LICENSE Update LICENSE 2021-06-28 20:46:06 -03:00
Makefile Fix make site 2021-07-04 13:33:19 -03:00
package.json ⬆️ Upgrade dependencies. 2022-01-31 09:20:10 -03:00
phpunit.xml Big refactor 2021-06-25 10:35:23 -03:00
psalm.xml Many fixes after run psalm 2021-10-11 19:27:33 -03:00
README.md Refactor commands 2022-02-06 20:51:03 +00:00
stylelint.config.js ignore coverage 2021-07-28 12:45:41 -03:00
webpack.dev.js 🔥 (396): remove support for nextcloud20 2021-11-06 00:11:49 -03:00
webpack.prod.js 🔥 (396): remove support for nextcloud20 2021-11-06 00:11:49 -03:00
yarn.lock ⬆️ Upgrade dependencies. 2022-01-31 09:20:10 -03:00

Test Status Coverage Status Start contributing

Nextcloud app to sign PDF documents.

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

Table of contents

Setup

Java and JSignPDF

Standalone

Run commands:

occ libresign:install --all
occ libresign:configure:cfssl --cn=<yourCN> --ou=<yourOU> --o=<yourO> --c=<yourCountry>

Using Docker

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%202.0.0/jsignpdf-2.0.0.zip \
    && unzip jsignpdf-2.0.0.zip -d /opt \
    && rm jsignpdf-2.0.0.zip

CFSSL

CFSS server handmade install

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

PS: Use latest version, on many cases the version of package manage of linux distro is outdated and incompatible with LibreSign

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
  • Approval: Approve/reject files based on workflows defined by admins

Full documentation

here

Contributing

here