Skip to main content
The SSL CoT Service provides encrypted SSL/TLS connections for secure Cursor-on-Target (CoT) communications between FreeTAKServer and ATAK clients.

Overview

The SSL CoT Service (SSLCoTServiceMain) handles secure CoT communications over SSL/TLS encrypted connections. It provides certificate-based authentication and encrypted message transport. Default Port: 8089 Protocol: SSL/TLS over TCP Message Format: XML (CoT) Authentication: X.509 certificate-based (mutual TLS)

Service Architecture

Main Class

FreeTAKServer.services.ssl_cot_service.ssl_cot_service_main.SSLCoTServiceMain The SSL CoT service extends DigitalPyService and provides:
  • SSL/TLS socket creation with certificate verification
  • Secure connection handling
  • Encrypted message reception and transmission
  • Certificate-based client authentication
  • Component routing and response broadcasting

Key Components

SSL Socket Controller

Class: SSLSocketController (controllers/SSLSocketController.py:8) Manages SSL/TLS socket configuration:

Connection Model

Class: SSLCoTConnection (model/ssl_cot_connection.py:11)
Properties:
  • service_id: “ssl_cot_service”
  • protocol: “XML”
  • model_object: Event domain object
  • sock: SSL-wrapped socket instance

SSL/TLS Configuration

Certificate Requirements

The SSL CoT service requires:
  1. Server Certificate - PEM format certificate for the server
  2. Server Private Key - Private key for the server certificate
  3. CA Certificate - Certificate Authority for client verification
  4. CRL File - Certificate Revocation List for checking revoked certificates

SSL Context Configuration

Method: get_context() (controllers/SSLSocketController.py:12)

Verification Mode

Configuration (controllers/SSLSocketController.py:21-22):
  • CERT_REQUIRED: Client must present a valid certificate
  • VERIFY_CRL_CHECK_LEAF: Checks if client certificate is revoked

Client Socket Wrapping

Method: wrap_client_socket() (controllers/SSLSocketController.py:32) Wraps accepted sockets with SSL:

Connection Handling

Service Initialization

Method: start() (ssl_cot_service_main.py:131)

Threading Model

The SSL service uses ThreadPool instead of multiprocessing (ssl_cot_service_main.py:165):
SSL sockets cannot be pickled for inter-process communication, requiring thread-based concurrency.

Connection Reception

Method: handle_connection() (ssl_cot_service_main.py:755)

Message Processing

Data Reception

Class: ClientReceptionHandler (ssl_cot_service_main.py:169) Handles encrypted message reception:
Buffer Size: 1024 bytes (ssl_cot_service_constants.py:3)

Main Loop

Method: mainRunFunction() (ssl_cot_service_main.py:471) The main event loop processes:
  1. New SSL connections
  2. Encrypted client data
  3. Shared data from other services
  4. Component responses for broadcasting

Component Handling

Method: component_handler() (ssl_cot_service_main.py:271) Routes CoT messages to appropriate components:

Disconnection Handling

Method: handle_disconnection() (ssl_cot_service_main.py:734) SSL disconnection requires closing both SSL and underlying sockets:

Service Metrics

Identical to TCP service (ssl_cot_service_main.py:97-102):

Configuration

Service Constants

File: configuration/ssl_cot_service_constants.py

Port Configuration

Default Port: 8089 (MainConfig.py:71)

Certificate Configuration

Certificates are typically stored in:
Required files:
  • Server certificate (PEM)
  • Server private key
  • CA certificate
  • Certificate Revocation List (CRL)

Client Configuration

ATAK Connection Setup

To connect ATAK clients to the SSL CoT service:
  1. Generate client certificate using FreeTAKServer’s certificate tools
  2. Install certificate on ATAK device
  3. Configure connection:
    • Protocol: ssl://
    • Host: FreeTAKServer IP
    • Port: 8089
    • Enable client certificate authentication
Example connection string:

Certificate Generation

Reference: FreeTAKServer.core.util.certificate_generation (certificate_generation.py:138) Default SSL port in certificate generation:

Security Considerations

Protocol Security

  • TLS Protocol: Uses ssl.PROTOCOL_TLS_SERVER
  • Disabled Protocols: SSLv2, SSLv3 (controllers/SSLSocketController.py:35-36)
  • Mutual Authentication: Both server and client certificates verified
  • CRL Checking: Revoked certificates rejected

Best Practices

  1. Use SSL for production - TCP service should only be used for testing
  2. Rotate certificates - Regular certificate renewal
  3. Maintain CRL - Keep revocation list updated
  4. Secure private keys - Protect server private key with strong password
  5. Monitor connections - Review SSL handshake failures

Connection Type

Property: connection_type (ssl_cot_service_main.py:189)