๐Ÿ” Authentication & Access

Central Set Go (CSGO) provides a unified authentication system used consistently across:

  • The Admin UI
  • The REST API
  • External integrations and automation

This section documents each authentication-related feature with:

  • The UI screen
  • The user workflow
  • The exact API call backing that screen

๐Ÿง  The Admin UI is just another API client.
Everything you can do in the UI can be done programmatically.


Login

The login process authenticates a user and returns a JWT token used for all subsequent API requests.


Change Password

Users can change their own password from the UI or via the API.


API Access & Tokens

CSGO uses JWT-based authentication for all protected endpoints.

  • Tokens are issued at login

  • Tokens encode:

    • User ID
    • Username
    • Role assignments
    • Permissions
  • Token expiration is configurable

Using the Token

All authenticated requests must include:

  Authorization: Bearer <JWT_TOKEN>
  

Security Model

  • UI and API share the same RBAC rules
  • Permissions are enforced server-side
  • Tokens cannot bypass UI restrictions

LDAP Authentication (Optional)

Central Set Go supports direct authentication against an LDAP directory instead of the internal users table.

When LDAP authentication is enabled:

  • The Login UI remains exactly the same
  • The Login API endpoint remains exactly the same
  • Credentials are validated against LDAP
  • User records are resolved dynamically, not stored locally
  • Roles and permissions are still managed inside CSGO

๐Ÿ” UI and API do not change โ€” only the authentication backend does.


How LDAP Authentication Works

  1. A user submits credentials via:

    • Login UI or
    • POST /dyn_api/login/login
  2. CSGO validates credentials against the configured LDAP server

  3. If authentication succeeds:

    • A JWT token is issued
    • The user session behaves like a normal CSGO user
  4. Authorization (roles, permissions) is still enforced by CSGO


Enabling LDAP Authentication

LDAP authentication is enabled entirely via environment variables.

.env Configuration

  # Enable / Disable LDAP authentication
USE_LDAP_AUTH=false

# LDAP connection
LDAP_URL=ldap://localhost:1389
LDAP_BIND_USER=cn=admin,dc=example,dc=com
LDAP_PASSWORD=admin
LDAP_BASE_DN=dc=example,dc=com

# TLS / certificate behavior
LDAP_SKIP_VERIFY_CERT=true

# User lookup filter
LDAP_SEARCHREQ_FILTER="(|(uid=%[1]s)(cn=%[1]s)(mail=%[1]s))"
  

Key Variables Explained

VariableDescription
USE_LDAP_AUTHEnables LDAP authentication when set to true
LDAP_URLLDAP server URL
LDAP_BIND_USERBind DN used for authentication
LDAP_PASSWORDPassword for the bind user
LDAP_BASE_DNBase DN for user searches
LDAP_SKIP_VERIFY_CERTSkip TLS certificate verification
LDAP_SEARCHREQ_FILTERUser search filter (supports username, CN, email)

Login Flow with LDAP Enabled


Authorization with LDAP Users

LDAP handles authentication only.

CSGO remains responsible for:

  • Roles
  • Permissions
  • App / menu / table access
  • API authorization

This allows you to:

  • Centralize identity in LDAP

  • Keep fine-grained access control inside CSGO

  • Use the same RBAC model for:

    • Local users
    • LDAP users
    • Service tokens

Tested LDAP Setup

LDAP authentication has been tested using:

  • LDAP Server osixia/openldap:1.5.0

  • LDAP Admin UI osixia/phpldapadmin:0.9.0

Both managed via Docker.

This setup is suitable for:

  • Local development
  • Testing
  • Integration with enterprise LDAP-compatible directories

Summary

CSGO authentication supports:

  • โœ… Local users (database-backed)
  • โœ… LDAP-backed authentication
  • โœ… Unified UI and API login flow
  • โœ… JWT-based sessions
  • โœ… Centralized authorization

๐Ÿ”ง Switch authentication backends without changing your UI or API clients.


Next

๐Ÿ‘‰ Security & Permissions Learn how roles, permissions, and table-level access control apply to both local and LDAP-authenticated users.

Last updated 19 2026, 20:10 -01 . history

Was this page helpful?