Overview
The Admin Module is the government-facing administrative panel for the CCDigital platform. It provides comprehensive control over citizen identity management, document review workflows, access governance, and blockchain synchronization operations.Person Management
Create and manage citizen records with physical folder creation
Document Review
Approve or reject documents uploaded by issuers
Access Control
Manage user access states and sync with Indy credentials
Blockchain Sync
Synchronize data to Hyperledger Fabric and issue Indy credentials
Security & Authentication
Role Required:ROLE_GOBIERNO
Access Path: /admin/** and /login/admin
All administrative endpoints are protected by Spring Security and require government role authorization.
Key Features
Person Management
Create and manage citizen records in the system. Each person gets a physical folder on the filesystem for document storage.Creating a New Person
Creating a New Person
The person creation workflow handled by
PersonService#createPersonAndFolder:- Validates person data (ID type, ID number, name, email, etc.)
- Persists person record to MySQL database
- Creates normalized folder structure in filesystem
- Returns the created person entity
POST /admin/personsController: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:269)Viewing Person Details
Viewing Person Details
Access comprehensive person information including:
- Personal identification details
- Associated documents with review status
- User access state (if registered)
- Document upload history
GET /admin/persons/{id}Controller: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:292)Document Management
Administrators can upload documents on behalf of citizens and review documents submitted by issuers.Upload Document
Navigate to person details and use the upload form. Documents are stored in the person’s physical folder.Endpoint:
POST /admin/persons/{id}/uploadDocuments enter PENDING review status by default.Review Document
Review pending documents and update their status:
APPROVED- Document is valid and accessibleREJECTED- Document failed validationPENDING- Awaiting review
Documents must be reviewed before they become available to end users or included in access requests.
Access State Control
Manage user access permissions with three-state control integrated with Hyperledger Indy for verifiable credential status updates. Available States:- ENABLED - User has full access to the system
- SUSPENDED - Temporary access restriction
- DISABLED - Permanent access revocation
POST /admin/persons/{id}/access-state
Controller: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:308)
Indy Synchronization:
When access state changes, the system attempts to synchronize the new state to the user’s Indy connection metadata via UserAccessGovernanceService. The result indicates:
- Whether sync was attempted
- Whether sync succeeded
- Any error messages from the Indy integration
Blockchain Synchronization
The admin module provides direct access to blockchain synchronization operations for both Hyperledger Fabric and Indy.Fabric Synchronization
Sync All to Fabric
Sync All to Fabric
Synchronize the entire database to the Fabric ledger.Endpoint:
POST /admin/sync/fabric/allController: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:392)Service: ExternalToolsService#runFabricSyncAllScript: Calls Node.js script sync-db-to-ledger.js configured via environment variable FABRIC_SYNC_ALL_SCRIPTSync Person to Fabric
Sync Person to Fabric
Synchronize a specific person’s data to the Fabric ledger.Endpoint:
POST /admin/sync/fabric/personController: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:409)Service: ExternalToolsService#runFabricSyncPersonParameters: ID type and ID numberScript: Calls Node.js script configured via environment variable FABRIC_SYNC_PERSON_SCRIPTIndy Credential Issuance
Issue Credentials from Database
Issue Credentials from Database
Issue Hyperledger Indy verifiable credentials to eligible users based on database records.Endpoint:
POST /admin/sync/indy/issueController: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:426)Service: ExternalToolsService#runIndyIssueFromDbScript: Calls Python script issue_credentials_from_db.py configured via environment variable INDY_SCRIPTThis operation:- Queries eligible users from the database
- Establishes connection with Indy holder agent
- Issues credentials containing user attributes (id_type, id_number, name, email)
- Returns execution results including success/failure counts
GET /admin/sync
Controller: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:378)
Reports & Analytics
Generate comprehensive administrative reports with blockchain traceability. Endpoint:GET /admin/reports
Controller: AdminController (src/main/java/co/edu/unbosque/ccdigital/controller/AdminController.java:123)
Features:
- Date range filtering (defaults to last 30 days)
- Granularity selection (DAY/WEEK/MONTH)
- Analytics view with trends and metrics
- Blockchain traceability view with Fabric and Indy references
- PDF export capability
Report Components
Report Components
Analytics Metrics:
- Person creation trends
- Document upload and review statistics
- Access state distribution
- System activity over time
- Fabric document references with block details
- Indy proof exchange tracking
- Full technical detail lookup via
GET /admin/reports/block-detail
- Same filters as dashboard view
- Generated via
AdminReportPdfService - Endpoint:
GET /admin/reports/pdf - Filename format:
ccdigital-reporte-trazabilidad-{from}-{to}.pdf
Endpoint Reference
| HTTP Method | Endpoint | Description | Controller Line |
|---|---|---|---|
GET | /admin/dashboard | Admin dashboard home | AdminController.java:103 |
GET | /admin/persons | List all persons | AdminController.java:239 |
GET | /admin/persons/new | New person form | AdminController.java:253 |
POST | /admin/persons | Create new person | AdminController.java:269 |
GET | /admin/persons/{id} | Person detail view | AdminController.java:292 |
POST | /admin/persons/{id}/upload | Upload document for person | AdminController.java:354 |
POST | /admin/persons/{id}/access-state | Update access state | AdminController.java:308 |
GET | /admin/sync | Sync operations page | AdminController.java:378 |
POST | /admin/sync/fabric/all | Sync all to Fabric | AdminController.java:392 |
POST | /admin/sync/fabric/person | Sync person to Fabric | AdminController.java:409 |
POST | /admin/sync/indy/issue | Issue Indy credentials | AdminController.java:426 |
GET | /admin/reports | Reports dashboard | AdminController.java:123 |
GET | /admin/reports/block-detail | Blockchain detail lookup | AdminController.java:157 |
GET | /admin/reports/pdf | Export report as PDF | AdminController.java:198 |
Integration Points
MySQL Database
Primary transactional data store for all person, document, and audit records. Key Tables:persons- Citizen identity recordsperson_documents- Document metadatafiles- Physical file references with SHA-256 hashesaudit_events- System audit trail
Filesystem Storage
Documents are stored in a normalized folder structure configured viaCCDIGITAL_FS_BASE_PATH environment variable.
Service: FileStorageService
Hyperledger Fabric
Document registry and access audit trail stored on distributed ledger. Services:ExternalToolsService- Script executionFabricLedgerCliService- Ledger queriesFabricAuditCliService- Audit operationsBlockchainTraceDetailService- Detail resolution
Hyperledger Indy / ACA-Py
Verifiable credential issuance and access state synchronization. Services:IndyAdminClient- ACA-Py admin API clientUserAccessGovernanceService- Access state sync
Configuration
Key environment variables for the admin module:Best Practices
- Person Creation: Always create person records before allowing issuer document uploads
- Document Review: Review documents promptly to enable access request workflows
- Access Control: Document the reason when changing access states for audit purposes
- Blockchain Sync: Run Fabric sync operations during low-traffic periods
- Credential Issuance: Verify Indy network connectivity before issuing credentials
- Reporting: Use date range filters to optimize report performance
Related Modules
- Issuer Module - Document upload and access request creation
- End-User Module - Citizen self-service portal
