- A web application for signing e-invoice documents in accordance with the algorithm specified by the Egyptian Tax Authority (ETA).
- JDK 17
- Oracle JDK 17 can be downloaded from here.
-
Clone the repository to your local environment:
git clone https://github.com/mostafaism1/eta-einvoice-signercd 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 properties should be placed in the
application.propertiesfile ateta-einvoice-signer/WEB-INF/classes(see below for all available configuration properties.)
- The application supports 2 types of keystores for signature creation:
- Hardware token keystore
- File-based keystore
- Set
signature.keystore.typetohardware, and set the following properties:signature.keystore.pkcs11ConfigFilePathsignature.keystore.passwordsignature.keystore.certificateIssuerName
- Set
signature.keystore.typetofile, and set the following properties:signature.keystore.pkcs12KeyStoreFilePathsignature.keystore.passwordsignature.keystore.certificateIssuerName
- The application uses HTTP Basic authentication.
- Only 1 user can be defined.
- To configure the user's details:
- Set
auth.user.userNameto the user name. - Set
auth.user.encryptedPasswordto the bcrypt hash of the password.- There are many tools to generate a bcrypt hash. Here's one such tool.
- Set
- Deploy the directory
eta-einvoice-signerto a java application server such as tomcat.
-
/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
- Method
-
Response
- Body
- The body of the request with the signature appended to each document.
- Example:
- Body
-