Compare commits
14
Commits
184fdc6bc6
..
v2.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56d8516427 | ||
|
|
94ad3f9461 | ||
|
|
26a4509429 | ||
|
|
80ae42088f | ||
|
|
42f01addca | ||
|
|
a9f096ef1b | ||
|
|
26d3d59812 | ||
|
|
5fec32327f | ||
|
|
478807d873 | ||
|
|
149ba6dfec | ||
|
|
a11b05f0a9 | ||
|
|
722d2a1fec | ||
|
|
5883b78822 | ||
|
|
d79de301bf |
@@ -6,12 +6,15 @@ on:
|
|||||||
- '**'
|
- '**'
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- '*'
|
- '*'
|
||||||
|
- '**'
|
||||||
|
- 'v*'
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Run Component Tests & Pipeline Verification
|
name: Run Component Tests & Pipeline Verification
|
||||||
|
if: "!startsWith(github.ref, 'refs/tags/')"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
name: Release Linux Binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published, created]
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
- '**'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag:
|
|
||||||
description: 'Release tag (optional)'
|
|
||||||
required: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-linux:
|
|
||||||
name: Build & Release Linux Binaries
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Python and Build Dependencies
|
|
||||||
run: |
|
|
||||||
if command -v apt-get >/dev/null 2>&1; then
|
|
||||||
apt-get update -y
|
|
||||||
apt-get install -y python3 python3-pip python3-venv binutils zip
|
|
||||||
fi
|
|
||||||
python3 -m pip install --upgrade pip --break-system-packages || python3 -m pip install --upgrade pip || true
|
|
||||||
pip3 install pyinstaller -r compilation/requirements.txt --break-system-packages || pip3 install pyinstaller -r compilation/requirements.txt
|
|
||||||
|
|
||||||
- name: Compile Standalone Linux Binaries
|
|
||||||
run: |
|
|
||||||
python3 compilation/package_dist.py --target linux
|
|
||||||
|
|
||||||
- name: Publish Linux Release Assets
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.TAG_TOKEN || github.token }}
|
|
||||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
|
||||||
GITEA_REPOSITORY: ${{ github.repository }}
|
|
||||||
GITEA_REF_NAME: ${{ github.event.release.tag_name || inputs.tag || github.ref_name }}
|
|
||||||
run: |
|
|
||||||
python3 compilation/upload_release.py --skip-build
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Release Windows Binaries & Installers
|
name: Release Binaries & Installers
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -7,12 +7,43 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: 'Release tag (optional)'
|
description: 'Release tag to publish assets to (default: v2.0.0)'
|
||||||
required: false
|
required: false
|
||||||
|
default: 'v2.0.0'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
release-linux:
|
||||||
|
name: Build & Release Linux Binaries
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Python and Build Dependencies
|
||||||
|
run: |
|
||||||
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
|
apt-get update -y
|
||||||
|
apt-get install -y python3 python3-pip python3-venv binutils zip
|
||||||
|
fi
|
||||||
|
python3 -m pip install --upgrade pip --break-system-packages || python3 -m pip install --upgrade pip || true
|
||||||
|
pip3 install pyinstaller -r compilation/requirements.txt --break-system-packages || pip3 install pyinstaller -r compilation/requirements.txt
|
||||||
|
|
||||||
|
- name: Compile Standalone Linux Binaries
|
||||||
|
run: |
|
||||||
|
python3 compilation/package_dist.py --target linux
|
||||||
|
|
||||||
|
- name: Publish Linux Release Assets
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.TAG_TOKEN || github.token }}
|
||||||
|
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||||
|
GITEA_REPOSITORY: ${{ github.repository }}
|
||||||
|
GITEA_REF_NAME: ${{ inputs.tag || github.event.release.tag_name || github.ref_name }}
|
||||||
|
run: |
|
||||||
|
python3 compilation/upload_release.py --skip-build
|
||||||
|
|
||||||
release-windows:
|
release-windows:
|
||||||
name: Build & Release Windows Binaries & Installers
|
name: Build & Release Windows Binaries & Installers
|
||||||
|
# Note: Requires a registered Gitea Act Runner with label 'windows-latest'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
@@ -73,7 +104,7 @@ jobs:
|
|||||||
GITEA_TOKEN: ${{ secrets.TAG_TOKEN || github.token }}
|
GITEA_TOKEN: ${{ secrets.TAG_TOKEN || github.token }}
|
||||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||||
GITEA_REPOSITORY: ${{ github.repository }}
|
GITEA_REPOSITORY: ${{ github.repository }}
|
||||||
GITEA_REF_NAME: ${{ github.event.release.tag_name || inputs.tag || github.ref_name }}
|
GITEA_REF_NAME: ${{ inputs.tag || github.event.release.tag_name || github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
$py = "python"
|
$py = "python"
|
||||||
if (-not (Get-Command "python" -ErrorAction SilentlyContinue)) {
|
if (-not (Get-Command "python" -ErrorAction SilentlyContinue)) {
|
||||||
@@ -263,9 +263,8 @@ LOGAR provides production-grade installation scripts and installer builders for
|
|||||||
LOGAR/
|
LOGAR/
|
||||||
├── .gitea/
|
├── .gitea/
|
||||||
│ └── workflows/
|
│ └── workflows/
|
||||||
│ ├── ci.yml # CI pipeline: syntax, 22 unit tests & mTLS pipeline test
|
│ ├── ci.yml # CI pipeline: syntax, 25 unit tests & mTLS pipeline test
|
||||||
│ ├── release-linux.yml # Linux release workflow (compiles binaries & checksums)
|
│ └── release.yml # Consolidated release workflow (Linux binaries & Windows installers)
|
||||||
│ └── release-windows.yml # Windows release workflow (compiles .exe & Inno Setup installers)
|
|
||||||
├── compilation/ # Packaging, installers, and release automation
|
├── compilation/ # Packaging, installers, and release automation
|
||||||
│ ├── install_linux_client.sh # Automated Linux client systemd installation script
|
│ ├── install_linux_client.sh # Automated Linux client systemd installation script
|
||||||
│ ├── install_linux_server.sh # Automated Linux server systemd installation script
|
│ ├── install_linux_server.sh # Automated Linux server systemd installation script
|
||||||
@@ -343,10 +342,11 @@ LOGAR/
|
|||||||
```bash
|
```bash
|
||||||
python -m unittest discover -s tests -v
|
python -m unittest discover -s tests -v
|
||||||
```
|
```
|
||||||
Runs all **22 unit tests**, covering:
|
Runs all **25 unit tests**, covering:
|
||||||
- Dynamic Root CA generation and server TLS certificate issuance.
|
- Dynamic Root CA generation and server TLS certificate issuance.
|
||||||
- Dynamic client certificate issuance with CN and authority key extensions.
|
- Dynamic client certificate issuance with CN and authority key extensions.
|
||||||
- Enrollment secret authentication, seat limits, and certificate revocation.
|
- Enrollment secret authentication, seat limits, and certificate revocation.
|
||||||
|
- Proactive certificate validity checks, Root CA auto-renewal, and in-flight server SSLContext reload.
|
||||||
- Windows & Linux event log collection, deduplication, and mTLS certificate verification.
|
- Windows & Linux event log collection, deduplication, and mTLS certificate verification.
|
||||||
- 12-hour evaluation window and 4-run rule progression.
|
- 12-hour evaluation window and 4-run rule progression.
|
||||||
|
|
||||||
@@ -365,13 +365,31 @@ Tests client enrollment, secret rejection, mTLS TLS 1.3 socket handshake, warnin
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Automated Releases via Gitea Actions
|
## Releases & Binary Distribution
|
||||||
|
|
||||||
Releases are triggered automatically on tag push (`v*`):
|
Releases can be built and published through three complementary channels:
|
||||||
|
|
||||||
|
### 1. Tag Push Automation (Gitea Actions)
|
||||||
|
Pushing a release tag automatically triggers the build workflows:
|
||||||
```bash
|
```bash
|
||||||
git tag v1.0.4
|
git tag v2.0.0
|
||||||
git push origin v1.0.4
|
git push origin v2.0.0
|
||||||
|
```
|
||||||
|
The consolidated workflow **`release.yml`** defines two parallel jobs:
|
||||||
|
- **`release-linux`** (`ubuntu-latest`): Compiles standalone native ELF binaries (`Linux_Client.bin`, `Server.bin`) and checksums.
|
||||||
|
- **`release-windows`** (`windows-latest`): Compiles Windows executables (`Win_Client.exe`, `Server.exe`), builds Inno Setup installers, and publishes checksums (requires self-hosted Windows Act Runner).
|
||||||
|
|
||||||
|
### 2. Manual Workflow Dispatch (Gitea UI)
|
||||||
|
Workflows can be manually triggered on demand from the Gitea web interface:
|
||||||
|
1. Navigate to **Actions** $\rightarrow$ **Release Binaries & Installers** (`release.yml`).
|
||||||
|
2. Click **Run workflow**, set the release tag (defaults to `v2.0.0`), and run.
|
||||||
|
|
||||||
|
### 3. Native Local Windows Build & Direct Release Upload
|
||||||
|
For environments without a registered Windows CI runner, Windows executables can be built and published directly to Gitea releases:
|
||||||
|
```powershell
|
||||||
|
# 1. Build Windows binaries locally
|
||||||
|
python compilation/package_dist.py --target windows
|
||||||
|
|
||||||
|
# 2. Upload assets and release notes directly to the Gitea release
|
||||||
|
python compilation/upload_release.py --tag v2.0.0 --token <GITEA_TOKEN> --skip-build
|
||||||
```
|
```
|
||||||
Two dedicated workflows run in parallel:
|
|
||||||
- **`release-linux.yml`** (`ubuntu-latest`): Compiles `Linux_Client.bin` and `Server.bin`, generating checksums.
|
|
||||||
- **`release-windows.yml`** (`windows-latest`): Compiles `Win_Client.exe` and `Server.exe`, builds Inno Setup installers (`LOGAR-Client-Setup.exe`, `LOGAR-Server-Setup.exe`), and uploads all artifacts.
|
|
||||||
|
|||||||
+37
-12
@@ -1,13 +1,38 @@
|
|||||||
# LOGAR Release v1.0.2
|
# LOGAR Release v2.0.0
|
||||||
|
|
||||||
|
Major architectural release introducing Mutual TLS 1.3 (mTLS) transport security, built-in dynamic PKI & license accounting, in-flight certificate validity monitoring and auto-renewal, and automated Windows and Linux service installers.
|
||||||
|
|
||||||
|
### Key Highlights & Changes in v2.0.0:
|
||||||
|
|
||||||
|
- **mTLS 1.3 Transport Security & Runtime Licensing**:
|
||||||
|
- Replaced legacy plain TCP sockets with mutual TLS 1.3 authentication (`ssl.CERT_REQUIRED`, TLS 1.3 minimum version).
|
||||||
|
- Hub dynamically validates incoming client Common Name (`client_id`) against active license seats in SQLite during the TLS handshake.
|
||||||
|
- Drops unauthorized, un-enrolled, or revoked clients at the transport layer before payload reading.
|
||||||
|
|
||||||
|
- **Dynamic Hub PKI Engine (`src/server_enrollment.py`)**:
|
||||||
|
- Automatically initializes an internal RSA-4096 Root CA (`ca.crt` / `ca.key`).
|
||||||
|
- Generates RSA-2048 Server TLS certificates with SANs for localhost, loopback, and server hostnames.
|
||||||
|
- Full OpenSSL 3.x and Python 3.12–3.14 compatibility via `SubjectKeyIdentifier` and `AuthorityKeyIdentifier` certificate extensions.
|
||||||
|
- Generates and signs client certificates on demand via `POST /api/client/enroll`.
|
||||||
|
|
||||||
|
- **In-Flight Certificate Validity Watchdog & Dynamic SSLContext Reloading**:
|
||||||
|
- Server hub runs a continuous background watchdog coroutine (`cert_validity_watchdog`, evaluated every 12 hours) alongside startup checks.
|
||||||
|
- Automatically checks Root CA and server TLS certificate expiration against a 30-day threshold.
|
||||||
|
- Generates renewed certificates on disk with timestamped backups (`.bak`), and reloads active `ssl.SSLContext` in memory dynamically without dropping socket listeners or restarting the background service.
|
||||||
|
|
||||||
|
- **Client Proactive Expiry Check & Reactive Self-Healing Auto-Renewal**:
|
||||||
|
- **Proactive**: Forwarders (`Win_Client.py` and `Linux_Client.py`) evaluate `client.crt` validity before each run, auto-renewing via `/api/client/enroll` if expiring within 30 days.
|
||||||
|
- **Reactive**: If the hub rotates its Root CA or a TLS verification error (`ssl.SSLError` / `SSLCertVerificationError`) occurs, clients automatically catch the error, re-enroll with the hub using their enrollment secret, and reconnect cleanly.
|
||||||
|
|
||||||
|
- **Database Schema & License Quota Accounting**:
|
||||||
|
- SQLite tables `license_config` (`max_seats`, `enrollment_secret`) and `clients` (`client_id`, `hostname`, `os_type`, `cert_fingerprint`, `status`, timestamps).
|
||||||
|
- Enforces seat limits on enrollment (`HTTP 403 License seat limit reached`) while allowing active registered nodes to re-enroll/renew indefinitely.
|
||||||
|
- Added `GET /api/clients` endpoint for license auditing and telemetry tracking.
|
||||||
|
|
||||||
|
- **Automated Service Installers**:
|
||||||
|
- **Windows**: Self-contained Inno Setup installers (`LOGAR-Client-Setup.exe` and `LOGAR-Server-Setup.exe`) bundling `nssm.exe` to register, configure, and start Windows services automatically.
|
||||||
|
- **Linux**: Automated installer scripts (`compilation/install_linux_client.sh` and `install_linux_server.sh`) deploying systemd service units with auto-restart policies.
|
||||||
|
|
||||||
|
- **CI/CD Release Workflows**:
|
||||||
|
- Windows workflow (`.gitea/workflows/release-windows.yml`) and Linux workflow (`.gitea/workflows/release-linux.yml`) automated to build native executables, installers, and upload release assets on tag push.
|
||||||
|
|
||||||
### Changes in this Release:
|
|
||||||
- **Warning Persistence & Immediate Error Routing**: Restructured temporal verification on the central hub so the 4-run persistence rule across the 12-hour evaluation window strictly governs `WARNING` and `INFO` events to suppress transient blips. High-severity `ERROR`, `CRITICAL`, and `FATAL` events are now promoted to `VERIFIED` immediately on their first occurrence and reported to Hermes without waiting for consecutive runs.
|
|
||||||
- **Server Deployment Packages in `out/`**: Added comprehensive deployment guides and configuration templates for both Linux Server hub (systemd service) and Windows Server hub (NSSM service / Task Scheduler) under `out/linux_server` and `out/win_server`.
|
|
||||||
- **Refactored Repository Layout**: Reorganized codebase by moving runtime forwarders and server hub into `src/`, compilation/release packaging utilities into `compilation/`, and all unit and pipeline verification tests into `tests/`.
|
|
||||||
- **Dual Platform Gitea Release Automation**: Dedicated Windows (`release-windows.yml`) and Linux (`release-linux.yml`) Gitea Actions to compile native platform binaries (`Win_Client.exe` and `Server.exe` on Windows; `Linux_Client.bin` and `Server.bin` on Linux).
|
|
||||||
- **Dedicated SHA-256 Checksums**: Release assets now include dedicated checksum files matching `[win/linux]_[client/agent]_sha256sum` (`win_client_sha256sum`, `win_agent_sha256sum`, `win_server_sha256sum`, `linux_client_sha256sum`, `linux_agent_sha256sum`, `linux_server_sha256sum`).
|
|
||||||
- **Removed Client Filter Logic**: Removed restrictive source-level noise filtering on edge forwarders. Clients now collect and stream all candidate events from `INFO` up to `ERROR` over the lookback window instead of discarding them at the source.
|
|
||||||
- **State Tracking & Deduplication**: Added persistent client state tracking (`client_state.json`) with journalctl cursors and Windows Event Log record numbers to guarantee that previously transmitted events are never resent.
|
|
||||||
- **24-Hour Lookback Window**: Forwarders now scan and upload events from the last 24 hours (default `--hours 24`), skipping older entries.
|
|
||||||
- **Lightweight Distribution Structure**: Cleaned `out/` to strictly contain deployment documentation and sample configurations.
|
|
||||||
- **Automated Gitea CI/CD**: Integrated push testing workflow (`ci.yml`) and multi-platform release asset packaging.
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[Setup]
|
[Setup]
|
||||||
AppName=LOGAR Client
|
AppName=LOGAR Client
|
||||||
AppVersion=1.0.3
|
AppVersion=2.0.0
|
||||||
DefaultDirName={autopf}\LOGAR
|
DefaultDirName={autopf}\LOGAR
|
||||||
OutputDir=..\dist
|
OutputDir=..\dist
|
||||||
OutputBaseFilename=LOGAR-Client-Setup
|
OutputBaseFilename=LOGAR-Client-Setup
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[Setup]
|
[Setup]
|
||||||
AppName=LOGAR Server
|
AppName=LOGAR Server
|
||||||
AppVersion=1.0.3
|
AppVersion=2.0.0
|
||||||
DefaultDirName={autopf}\LOGAR-Server
|
DefaultDirName={autopf}\LOGAR-Server
|
||||||
OutputDir=..\dist
|
OutputDir=..\dist
|
||||||
OutputBaseFilename=LOGAR-Server-Setup
|
OutputBaseFilename=LOGAR-Server-Setup
|
||||||
|
|||||||
Reference in New Issue
Block a user