Skip to content

A web application for signing e-invoice documents according the rules of the Egyptian Tax Authority (ETA).

Notifications You must be signed in to change notification settings

mostafaism1/eta-einvoice-signer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ETA E-Invoice Signer

Description

  • A web application for signing e-invoice documents in accordance with the algorithm specified by the Egyptian Tax Authority (ETA).

Installation

Requirements

  • JDK 17
    • Oracle JDK 17 can be downloaded from here.

Building

  • Clone the repository to your local environment:

    git clone https://github.com/mostafaism1/eta-einvoice-signer
    cd eta-einvoice-signer
  • Build the project:

    ./mvnw clean package
  • The previous step will output the following artifact in the target directory: eta-einvoice-signer

Configuration

  • Configuration properties should be placed in the application.properties file at eta-einvoice-signer/WEB-INF/classes (see below for all available configuration properties.)

Signature Keystore

  • The application supports 2 types of keystores for signature creation:
    • Hardware token keystore
    • File-based keystore
Hardware Token Keystore
  • Set signature.keystore.type to hardware, and set the following properties:
    • signature.keystore.pkcs11ConfigFilePath
    • signature.keystore.password
    • signature.keystore.certificateIssuerName
File-based Keystore
  • Set signature.keystore.type to file, and set the following properties:
    • signature.keystore.pkcs12KeyStoreFilePath
    • signature.keystore.password
    • signature.keystore.certificateIssuerName

Authentication

  • The application uses HTTP Basic authentication.
  • Only 1 user can be defined.
  • To configure the user's details:
    • Set auth.user.userName to the user name.
    • Set auth.user.encryptedPassword to the bcrypt hash of the password.
      • There are many tools to generate a bcrypt hash. Here's one such tool.

Deployment

  • Deploy the directory eta-einvoice-signer to a java application server such as tomcat.

Usage

Available Endpoints

  • /eta-einvoice-signer

    • Request

      • Method
        • POST
      • Headers
        • Basic authentication header
      • Body
        • A json object containing a single key "documents" and whose value is an array of document objects
    • Response

About

A web application for signing e-invoice documents according the rules of the Egyptian Tax Authority (ETA).

Resources

Stars

Watchers

Forks

Packages

No packages published