How inakilozano01/firmador works
• A Python-based service (using Flask) that handles document signing, validation, and other business logic.
• A Java-based service (using Spring Boot and DSS libraries) that provides advanced Digital Signature Services.
Main Components
• Python Service:
• Built with Flask.
• Located in the “firmar_python” directory.
• Contains controllers, routes, services, and utility modules.
• Handles certificate management, PDF/JSON signing, document validations, and integration with external systems.
• Java Service:
• Located under the “dssapp” directory.
• Based on Spring Boot and DSS libraries.
• Acts as a robust backend for advanced Digital Signature Services.
• Provides REST/Soap endpoints for processes such as certificate validation, document signature, timestamping, etc.
• Database:
• PostgreSQL is indicated in the README.
• Likely used for storing logs, user data, and record keeping.
• Docker Environment:
• Uses Docker Compose (docker-compose.yml and docker-compose.test.yml) for orchestration.
• Both services have their Dockerfiles, indicating containerized deployment.
• File Storage / Volumes:
• The README and file tree refer to mounted volumes (e.g., /qnap/documentos_firmados, /var/documentos) that manage document storage and serve as shared file repositories for signed files.
• External Dependencies:
• External certificate authorities, cryptographic tokens, and possibly third-party APIs for OCSP/CRL validations.
Relationships and Interactions
• The Python service likely is the entry point or coordinator of signing operations, handling incoming requests (both file uploads and JSON data for signing).
• It communicates with the Java service to perform more complex digital signing operations using DSS libraries.
• Both services log operations separately (the Python service using mod-wsgi error logs and the Java service via Tomcat logs) and may store operation details in the PostgreSQL database.
• Docker Compose orchestrates the overall service deployment – include a container grouping or a “Docker Host” label to denote the containerized environment.
Architectural Patterns and Design Principles
• Service-Oriented / Microservice: Two decoupled services (Python and Java) that expose REST or SOAP endpoints.
• Containerized Deployment: Using Docker Compose to deploy and manage dependencies.
• Modular Design: With clearly separated controllers, services, and utility modules in both the Python and Java projects.
• Security: Emphasis on certificate management, secure key handling, and cryptographic validations.
• Separation of Concerns: The Python service handles the orchestration/logic while the Java service provides the DSS capabilities.