Compare commits
4 Commits
v0.9.0
...
9dbde8ea31
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dbde8ea31 | ||
|
|
191a7b5fb3 | ||
|
|
7a9348c1f1 | ||
|
|
225d8ae5ca |
42
README.md
42
README.md
@@ -15,14 +15,20 @@ Do you host your own web apps? MeTube, Kavita, Audiobookshelf, Gitea, Grafana, P
|
|||||||
|
|
||||||
Clinch runs as a single Docker container, using SQLite as the database, the job queue (Solid Queue) and the shared cache (Solid Cache). The webserver, Puma, runs the job queue in-process, avoiding the need for another container.
|
Clinch runs as a single Docker container, using SQLite as the database, the job queue (Solid Queue) and the shared cache (Solid Cache). The webserver, Puma, runs the job queue in-process, avoiding the need for another container.
|
||||||
|
|
||||||
Clinch sits in a sweet spot between two excellent open-source identity solutions:
|
Clinch sits in a sweet spot among several excellent open-source identity solutions:
|
||||||
|
|
||||||
**[Authelia](https://www.authelia.com)** is a fantastic choice for those who prefer external user management through LDAP and enjoy comprehensive YAML-based configuration. It's lightweight, secure, and works beautifully with reverse proxies.
|
**[Authelia](https://www.authelia.com)** is a fantastic choice for those who prefer external user management through LDAP and enjoy comprehensive YAML-based configuration. It's lightweight, secure, and works beautifully with reverse proxies.
|
||||||
|
|
||||||
|
**[VoidAuth](https://voidauth.app/)** is an open-source SSO provider with a similar feature set to Clinch — OIDC, ForwardAuth, passkeys, user management, and easy Docker deployment. If you're evaluating self-hosted auth solutions, it's well worth a look.
|
||||||
|
|
||||||
**[Authentik](https://goauthentik.io)** is an enterprise-grade powerhouse offering extensive protocol support (OAuth2, SAML, LDAP, RADIUS), advanced policy engines, and distributed "outpost" architecture for complex deployments.
|
**[Authentik](https://goauthentik.io)** is an enterprise-grade powerhouse offering extensive protocol support (OAuth2, SAML, LDAP, RADIUS), advanced policy engines, and distributed "outpost" architecture for complex deployments.
|
||||||
|
|
||||||
**Clinch** offers a middle ground with built-in user management, a modern web interface, and focused SSO capabilities (OIDC + ForwardAuth). It's perfect for users who want self-hosted simplicity without external dependencies or enterprise complexity.
|
**Clinch** offers a middle ground with built-in user management, a modern web interface, and focused SSO capabilities (OIDC + ForwardAuth). It's perfect for users who want self-hosted simplicity without external dependencies or enterprise complexity.
|
||||||
|
|
||||||
|
- **[Passes the OpenID Connect Conformance Tests](https://www.certification.openid.net/plan-detail.html?plan=FbQNTJuYVzrzs&public=true)** — verified against the official OIDC test suite
|
||||||
|
- **450+ tests, 1800+ assertions** — comprehensive test coverage across integration, model, controller, and security tests
|
||||||
|
- **Single Docker container** — SQLite, job queue, and cache all in one process
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
@@ -76,8 +82,6 @@ Apps that only need "who is it?", or you want available from the internet behind
|
|||||||
|
|
||||||
#### OpenID Connect (OIDC)
|
#### OpenID Connect (OIDC)
|
||||||
|
|
||||||
**[OpenID Connect Conformance](https://www.certification.openid.net/plan-detail.html?plan=FbQNTJuYVzrzs&public=true)** - Clinch passes the official OpenID Connect conformance tests (valid as of [v0.8.6](https://github.com/dkam/clinch/releases/tag/0.8.6)).
|
|
||||||
|
|
||||||
Standard OAuth2/OIDC provider with endpoints:
|
Standard OAuth2/OIDC provider with endpoints:
|
||||||
- `/.well-known/openid-configuration` - Discovery endpoint
|
- `/.well-known/openid-configuration` - Discovery endpoint
|
||||||
- `/authorize` - Authorization endpoint with PKCE support
|
- `/authorize` - Authorization endpoint with PKCE support
|
||||||
@@ -131,6 +135,32 @@ Works with reverse proxies (Caddy, Traefik, Nginx):
|
|||||||
|
|
||||||
**Note:** ForwardAuth requires applications to run on the same domain as Clinch (e.g., `app.yourdomain.com` with Clinch at `auth.yourdomain.com`) for secure session cookie sharing. Take a look at Authentik if you need multi domain support.
|
**Note:** ForwardAuth requires applications to run on the same domain as Clinch (e.g., `app.yourdomain.com` with Clinch at `auth.yourdomain.com`) for secure session cookie sharing. Take a look at Authentik if you need multi domain support.
|
||||||
|
|
||||||
|
#### API Keys (Bearer Tokens)
|
||||||
|
|
||||||
|
For server-to-server access to ForwardAuth-protected services (e.g., a video player accessing WebDAV, rclone syncing files), Clinch supports API keys that work as bearer tokens — no browser or cookies needed.
|
||||||
|
|
||||||
|
- **Token format:** `clk_<base64>` prefix for easy identification
|
||||||
|
- **Storage:** HMAC-SHA256 hashed (plaintext shown once at creation, never stored)
|
||||||
|
- **Scope:** Each key is tied to one ForwardAuth application and one user
|
||||||
|
- **Expiration:** Optional — set a date or leave blank for no expiry
|
||||||
|
- **Auth flow:** `Authorization: Bearer clk_...` header checked before cookie auth
|
||||||
|
- **Failure response:** 401 JSON `{"error": "..."}` (no redirect)
|
||||||
|
|
||||||
|
**Creating an API key:**
|
||||||
|
1. Go to **Dashboard → Manage API Keys** (or `/api_keys`)
|
||||||
|
2. Click **New API Key**, select a ForwardAuth application, and give it a name
|
||||||
|
3. Copy the `clk_...` token — it's shown only once
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
```bash
|
||||||
|
curl -H "Authorization: Bearer clk_..." \
|
||||||
|
-H "X-Forwarded-Host: webdav.example.com" \
|
||||||
|
https://auth.example.com/api/verify
|
||||||
|
# Returns 200 with X-Remote-User headers on success
|
||||||
|
```
|
||||||
|
|
||||||
|
API keys respect the same access controls as browser sessions — the user must have access to the application, the application must be active, and the user's account must be active.
|
||||||
|
|
||||||
### SMTP Integration
|
### SMTP Integration
|
||||||
Send emails for:
|
Send emails for:
|
||||||
- Invitation links (one-time token, 7-day expiry)
|
- Invitation links (one-time token, 7-day expiry)
|
||||||
@@ -287,7 +317,7 @@ This is transparent to end users and requires no configuration.
|
|||||||
## Setup & Installation
|
## Setup & Installation
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
- Ruby 3.3+
|
- Ruby 4.0+
|
||||||
- SQLite 3.8+
|
- SQLite 3.8+
|
||||||
- SMTP server (for sending emails)
|
- SMTP server (for sending emails)
|
||||||
|
|
||||||
@@ -701,7 +731,7 @@ user.revoke_all_consents!
|
|||||||
|
|
||||||
### Running Tests
|
### Running Tests
|
||||||
|
|
||||||
Clinch has comprehensive test coverage with 341 tests covering integration, models, controllers, services, and system tests.
|
Clinch has comprehensive test coverage with 450 tests covering integration, models, controllers, services, and system tests.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run all tests
|
# Run all tests
|
||||||
@@ -761,7 +791,7 @@ All security scans run automatically on every pull request and push to main via
|
|||||||
|
|
||||||
**Current Status:**
|
**Current Status:**
|
||||||
- ✅ All security scans passing
|
- ✅ All security scans passing
|
||||||
- ✅ 341 tests, 1349 assertions, 0 failures
|
- ✅ 450 tests, 1818 assertions, 0 failures
|
||||||
- ✅ No known dependency vulnerabilities
|
- ✅ No known dependency vulnerabilities
|
||||||
- ✅ Phases 1-4 security hardening complete (18+ vulnerabilities fixed)
|
- ✅ Phases 1-4 security hardening complete (18+ vulnerabilities fixed)
|
||||||
- 🟡 3 outstanding security issues (all MEDIUM/LOW priority)
|
- 🟡 3 outstanding security issues (all MEDIUM/LOW priority)
|
||||||
|
|||||||
Reference in New Issue
Block a user