Sign inSign up

bestsolutions/toolkit-proxy-smart-card

By bestsolutions

•Updated 8 months ago

Image
0

989

bestsolutions/toolkit-proxy-smart-card repository overview

⁠ASAN İmza Toolkit Proxy Smart Card

Docker-based smart card proxy service for ASAN İmza (Azerbaijan Digital Signature System) integration.

Version: v_2.3.1-1
Docker Hub: bestsolutions/toolkit-proxy-smart-card:v_2.3.1-1

⁠📋 Overview

Complete toolkit proxy service for integrating ASAN İmza smart cards (AzeDIT 3.5) with your applications. Includes PC/SC daemon, OpenSC drivers, and MIS Services Toolkit Proxy.

Key Features:

  • ✅ Smart card reader support via PC/SC
  • ✅ Digital signature creation with ASAN İmza cards
  • ✅ REST API interface (port 8090)
  • ✅ Environment variable configuration (no config files needed)
  • ✅ Automatic health monitoring
  • ✅ Production-ready

⁠📦 Prerequisites

  • Docker 20.10+
  • USB smart card reader
  • ASAN İmza smart card (AzeDIT 3.5 cold)
  • At least 6-8GB RAM allocated to container

⁠🚀 Quick Start

Create start.sh:

#!/usr/bin/env bash
# Stop and remove existing container
docker rm -f asan-imza 2>/dev/null 

# Start container with your smart card serial number
docker run -d \
  --name asan-imza \
  --restart always \
  --privileged \
  -v /dev/bus/usb/:/dev/bus/usb/ \
  -p 8090:8090 \
  -e SMART_CARD_SERIAL=YOUR_CARD_SERIAL \
  -e JAVA_OPTS="-Xmx6G" \
  bestsolutions/toolkit-proxy-smart-card:v_2.3.1-1

# Show logs
sleep 3
docker logs --tail 50 -f asan-imza

Run:

chmod +x start.sh
./start.sh
⁠Option 2: Docker Command
docker run -d \
  --name asan-imza \
  --restart always \
  --privileged \
  -v /dev/bus/usb/:/dev/bus/usb/ \
  -p 8090:8090 \
  -e SMART_CARD_SERIAL=YOUR_CARD_SERIAL \
  -e JAVA_OPTS="-Xmx6G" \
  bestsolutions/toolkit-proxy-smart-card:v_2.3.1-1
⁠Option 3: Docker Compose

Create docker-compose.yml:

version: '3.8'

services:
  asan-imza:
    image: bestsolutions/toolkit-proxy-smart-card:v_2.3.1-1
    container_name: asan-imza
    privileged: true
    restart: always
    ports:
      - "8090:8090"
    volumes:
      - /dev/bus/usb/:/dev/bus/usb/
    environment:
      - SMART_CARD_SERIAL=YOUR_CARD_SERIAL
      - JAVA_OPTS=-Xmx6G

Start:

docker-compose up -d

⁠⚙️ Configuration

⁠Environment Variables
VariableDescriptionRequiredDefault
SMART_CARD_SERIALYour ASAN İmza smart card serial number (replace YOUR_CARD_SERIAL with actual serial)✅ Yes-
JAVA_OPTSJVM memory optionsNo-Xmx8G

Example: Change to -Xmx10G for more memory or -Xmx4G for less.

Note: Replace YOUR_CARD_SERIAL with your actual smart card serial number (e.g., A00003072, A00005555). The serial number is printed on your physical ASAN İmza card.

⁠Port
PortDescription
8090REST API endpoint
⁠Volume Mounts
Container PathDescriptionRequired
/dev/bus/usb/USB devices for smart card reader✅ Yes

⁠🔍 Verification

⁠Check Container Status
docker ps
docker logs asan-imza
⁠Check Health Status
docker inspect --format='{{.State.Health.Status}}' asan-imza

Expected output: healthy

⁠Test API Endpoint
curl http://localhost:8090/health
⁠View Logs
# Follow logs in real-time
docker logs -f asan-imza

# View last 100 lines
docker logs --tail 100 asan-imza
⁠Test Smart Card Connection
# List available smart cards
docker exec -it asan-imza opensc-tool -l

# Get smart card name
docker exec -it asan-imza opensc-tool -n

# List certificates on card
docker exec -it asan-imza pkcs15-tool --list-certificates
⁠Check PC/SC Daemon
docker exec -it asan-imza pcsc_scan

⁠🛠️ Common Issues

Out of memory:

# Increase heap size
-e JAVA_OPTS="-Xmx10G"

Card not detected:

# Check if reader is connected
lsusb

# Check card reader status
docker exec -it asan-imza pcsc_scan

View logs:

docker logs -f asan-imza

⁠🔄 Update Container

docker pull bestsolutions/toolkit-proxy-smart-card:v_2.3.1-1
docker stop asan-imza && docker rm asan-imza
./start.sh

⁠🔐 Security Considerations

  • Container runs as non-root user asan for better security
  • Only exposes necessary port (8090)
  • USB device access is restricted to container scope
  • TrustStore is embedded in the image

⁠📋 Version History

VersionRelease DateChanges
v_2.3.1-12026-02-04Added environment variable support (SMART_CARD_SERIAL, JAVA_OPTS)
v_2.3.12025-12Performance improvements
v_2.2.62025-09Bug fixes and updates

⁠📄 License

This project is provided as-is for ASAN İmza integration purposes.

⁠🤝 Support

Contact: bestsolutions support

⁠📚 Resources


Version: v_2.3.1-1 | Maintainer: bestsolutions | Last Updated: February 2026

Tag summary

Content type

Image

Digest

sha256:79a850041…

Size

260.7 MB

Last updated

8 months ago

docker pull bestsolutions/toolkit-proxy-smart-card