Sign inSign up

okernet/radius-proxy

By okernet

•Updated 2 months ago

On-premises RADIUS authentication REST API with OkerNet Cloud integration

Image
0

2.5K

okernet/radius-proxy repository overview

⁠Radius Proxy REST API

On-premises RADIUS authentication REST API server that integrates with OkerNet Cloud. Provides local RADIUS authentication with cloud synchronization for user management, supporting offline operation when cloud connectivity is unavailable.

⁠Quick Start

docker run -d \
  --name radius-proxy \
  -p 3080:3080 \
  -v radius-data:/usr/app/data \
  -e OIDC_ISSUER=https://id.okernet.com/realms/okernet \
  -e OIDC_CLIENT_ID=your-client-id \
  -e OIDC_CLIENT_SECRET=your-client-secret \
  -e CLOUD_API_URL=https://api.okernet.net \
  -e RADIUS_API_KEY=your-api-key \
  okernet/radius-proxy

For a complete setup with FreeRADIUS, download the production compose file:

curl -O https://raw.githubusercontent.com/okernet/radius-proxy/main/docker-compose.prod.yml

Create a .env file:

# App Configuration
PORT=3080
HOST=0.0.0.0
LOG_LEVEL=info

# OIDC Auth (obtain from OkerNet Cloud provisioning)
OIDC_ISSUER=https://id.okernet.com/realms/okernet
OIDC_CLIENT_ID=radius-proxy-<tenant-id>
OIDC_CLIENT_SECRET=<secret-from-provisioning>

# Cloud Connection
CLOUD_API_URL=https://api.okernet.net
CLOUD_TIMEOUT_MS=10000

# Sync Settings
SYNC_INTERVAL_MS=60000
ACCOUNTING_UPLOAD_INTERVAL_MS=10000
ACCOUNTING_BATCH_SIZE=100

# Database
DB_PATH=./data/radius-proxy.sqlite

# Security
RADIUS_API_KEY=<your-secure-api-key>
RADIUS_CLIENT_SECRET=<your-radius-shared-secret>

Start the services:

docker compose -f docker-compose.prod.yml up -d

⁠Environment Variables

VariableDescriptionDefault
PORTREST API port3080
HOSTREST API bind address0.0.0.0
LOG_LEVELLogging level (debug, info, warn, error)info
OIDC_ISSUEROIDC issuer URL for cloud authRequired
OIDC_CLIENT_IDOIDC client IDRequired
OIDC_CLIENT_SECRETOIDC client secretRequired
CLOUD_API_URLOkerNet Cloud API URLRequired
CLOUD_TIMEOUT_MSCloud API timeout in milliseconds10000
SYNC_INTERVAL_MSUser sync interval in milliseconds60000
ACCOUNTING_UPLOAD_INTERVAL_MSAccounting upload interval10000
ACCOUNTING_BATCH_SIZEMax records per accounting upload100
DB_PATHSQLite database path/usr/app/data/radius-proxy.sqlite
RADIUS_API_KEYAPI key for FreeRADIUS to REST API authRequired

⁠Volumes

PathDescription
/usr/app/dataSQLite database storage (persist this volume)

⁠Ports

PortDescription
3080REST API (HTTP)

⁠Health Check

The container includes a built-in health check at /health endpoint.

curl http://localhost:3080/health

⁠Supported Architectures

  • linux/amd64
  • linux/arm64

⁠Source Code

GitHub: https://github.com/okernet/radius-proxy⁠

⁠License

GNU General Public License v3.0 - See LICENSE⁠ for details.

Tag summary

Content type

Image

Digest

sha256:b8dea1075…

Size

263.9 MB

Last updated

2 months ago

docker pull okernet/radius-proxy