ITSkillsCenter
الأمن السيبراني

SSO Authentik للتطبيقات SaaS وذاتية الاستضافة: درس 2026

3 دقائق للقراءة

📍 المقالة الرئيسية: Authentik 2026: الدليل الكامل.

Authentik مثبَّت، MFA مُفعَّل، الخطوة التالية: ربط خدماتك الموجودة. هذا الدرس يفصل تكوين SSO لـ 6 تطبيقات الأكثر نشراً عند الشركات الفرنكوفونية.

المتطلبات

Authentik في الإنتاج مع HTTPS. تطبيق هدف منشور بالفعل. المستوى: متوسط. الوقت: 15-30 دقيقة لكل تطبيق.

النمط العام: OIDC في 4 خطوات

لكل تطبيق يدعم OIDC، النمط هو:

  1. Authentik: إنشاء Provider → Application → سجل client_id + client_secret.
  2. التطبيق الهدف: تكوين OIDC → ألصق client_id، client_secret، و discovery URL Authentik.
  3. اختبر login عبر flow Authentik.
  4. قيِّد الوصول عبر Policy Authentik.

1. Vaultwarden عبر Authentik (Outpost Proxy)

Vaultwarden لا يدعم OIDC أصلياً. الحل: Authentik Proxy Provider + Outpost. هذه الطريقة تحمي Vaultwarden عبر forward auth، تسمح بـ SSO دون تعديل Vaultwarden.

# Authentik admin
1. Providers → Create → Proxy Provider
   - Name: vaultwarden-proxy
   - Mode: Forward auth (single application)
   - External host: https://vault.votre-entreprise.com
2. Applications → Create
   - Provider: vaultwarden-proxy
   - Slug: vaultwarden
3. Outpost → Create → Type: Proxy
   - Applications: vaultwarden
4. Caddy (أمام Vaultwarden):
vault.votre-entreprise.com {
  forward_auth authentik-outpost:9000 {
    uri /outpost.goauthentik.io/auth/caddy
    copy_headers X-authentik-username X-authentik-email
  }
  reverse_proxy vaultwarden:80
}

2. Forgejo عبر OIDC

Forgejo (Gitea fork) يدعم OIDC أصلياً. التكوين بسيط من جانب Authentik و Forgejo.

# Authentik
1. Providers → Create → OAuth2/OpenID Provider
   - Name: forgejo
   - Redirect URIs: https://git.votre-entreprise.com/user/oauth2/Authentik/callback
2. Applications → Create → Provider: forgejo
3. سجل client_id و client_secret

# Forgejo
Site Administration → Identity & Access → Authentication Sources → Add
- Type: OAuth2
- Name: Authentik
- OAuth2 Provider: OpenID Connect
- Auto Discovery URL: https://auth.votre-entreprise.com/application/o/forgejo/.well-known/openid-configuration

3. Grafana عبر OIDC

Grafana يقرأ تكوين OIDC من grafana.ini. role_attribute_path يحدد الدور حسب groups Authentik.

# Authentik: Provider OIDC + Application "grafana"
# Grafana grafana.ini
[auth.generic_oauth]
enabled = true
name = Authentik
allow_sign_up = true
client_id = ...
client_secret = ...
scopes = openid profile email
auth_url = https://auth.votre-entreprise.com/application/o/authorize/
token_url = https://auth.votre-entreprise.com/application/o/token/
api_url = https://auth.votre-entreprise.com/application/o/userinfo/
role_attribute_path = contains(groups[*], 'grafana-admins') && 'Admin' || 'Viewer'

4. Outline (wiki) عبر OIDC

# Outline .env
OIDC_CLIENT_ID=...
OIDC_CLIENT_SECRET=...
OIDC_AUTH_URI=https://auth.votre-entreprise.com/application/o/authorize/
OIDC_TOKEN_URI=https://auth.votre-entreprise.com/application/o/token/
OIDC_USERINFO_URI=https://auth.votre-entreprise.com/application/o/userinfo/
OIDC_DISPLAY_NAME=Authentik
OIDC_USERNAME_CLAIM=email
OIDC_SCOPES=openid profile email

5. Coolify عبر OIDC

Coolify v4.0.0-beta.420+ يدعم OIDC.

# Coolify Settings → Authentication → OIDC
Provider URL: https://auth.votre-entreprise.com/application/o/coolify/
Client ID: ...
Client Secret: ...
Scope: openid profile email

6. Plausible Analytics عبر OIDC

Plausible CE v2.0+ يدعم SSO عبر plugin.

# Plausible config.exs
config :plausible, :sso,
  enabled: true,
  provider: :oidc,
  oidc_client_id: "...",
  oidc_client_secret: "...",
  oidc_discovery_url: "https://auth.votre-entreprise.com/application/o/plausible/.well-known/openid-configuration"

سياسة الوصول حسب المجموعات

مع 6 تطبيقات متصلة، التقييد حسب المجموعات أساسي:

  • Group admins: كل التطبيقات.
  • Group devs: Forgejo + Grafana + Coolify.
  • Group marketing: Outline + Plausible.
  • Group finance: Vaultwarden فقط.

الأخطاء الشائعة

الخطأ الحل
Redirect URI mismatch تحقق https/http، slash نهائي
Invalid scope أضف في Authentik Property Mappings
User بدون email تحقق scope email + Property Mapping
Roles Grafana دائماً Viewer اختبر JSONPath

التكيف مع السياق

ثلاث توضيحات. مزامنة Active Directory: لـ ESN في الدار البيضاء مع AD موجود، Authentik LDAP source يزامن users/groups في الخلفية. Onboarding صفر جهد. حسابات مشتركة للعملاء: تجنب الحسابات المشتركة. Audit trail: صدِّر سجلات Authentik إلى Loki + Grafana مع احتفاظ سنة على الأقل.

دروس الإخوة

الأسئلة المتكررة

كم تطبيقاً كحد أقصى على Authentik؟ لا حدود hard. اختُبر حتى 50 تطبيقاً متزامناً.

SCIM provisioning تلقائي؟ نعم لـ Slack، Google Workspace، Microsoft 365.

Switch بين تطبيقات دون re-login؟ نعم عبر cookie session Authentik.

للاستزادة

Besoin d'un site web ?

Confiez-nous la Création de Votre Site Web

Site vitrine, e-commerce ou application web — nous transformons votre vision en réalité digitale. Accompagnement personnalisé de A à Z.

À partir de 250.000 FCFA
Parlons de Votre Projet
Publicité