erge branch 'main' into dev

* main:
  website/developer-docs: add a baby Style Guide (#9900)
  website/integrations: gitlab: update certificate key pair location and specify sha (#9925)
  root: handle asgi exception (#10085)
  website: bump prettier from 3.3.1 to 3.3.2 in /website (#10082)
  web: bump prettier from 3.3.1 to 3.3.2 in /web (#10081)
  core: bump google-api-python-client from 2.132.0 to 2.133.0 (#10083)
  web: bump prettier from 3.3.1 to 3.3.2 in /tests/wdio (#10079)
  web: bump chromedriver from 125.0.3 to 126.0.0 in /tests/wdio (#10078)
  web: bump @sentry/browser from 8.8.0 to 8.9.1 in /web in the sentry group (#10080)
  web: bump braces from 3.0.2 to 3.0.3 in /web (#10077)
  website: bump braces from 3.0.2 to 3.0.3 in /website (#10076)
  web: bump braces from 3.0.2 to 3.0.3 in /tests/wdio (#10075)
  core: bump azure-identity from 1.16.0 to 1.16.1 (#10071)
This commit is contained in:
Ken Sternberg
2024-06-13 07:56:10 -07:00
20 changed files with 236 additions and 156 deletions

View File

@ -39,12 +39,12 @@ def get_delete_action(manager: Manager) -> str:
"""Get the delete action from the Foreign key, falls back to cascade"""
if hasattr(manager, "field"):
if manager.field.remote_field.on_delete.__name__ == SET_NULL.__name__:
return DeleteAction.SET_NULL.name
return DeleteAction.SET_NULL.value
if manager.field.remote_field.on_delete.__name__ == SET_DEFAULT.__name__:
return DeleteAction.SET_DEFAULT.name
return DeleteAction.SET_DEFAULT.value
if hasattr(manager, "source_field"):
return DeleteAction.CASCADE_MANY.name
return DeleteAction.CASCADE.name
return DeleteAction.CASCADE_MANY.value
return DeleteAction.CASCADE.value
class UsedByMixin:

View File

@ -241,7 +241,7 @@ class TestCrypto(APITestCase):
"model_name": "oauth2provider",
"pk": str(provider.pk),
"name": str(provider),
"action": DeleteAction.SET_NULL.name,
"action": DeleteAction.SET_NULL.value,
}
],
)

View File

@ -5,6 +5,7 @@ from hashlib import sha512
from time import perf_counter, time
from typing import Any
from channels.exceptions import DenyConnection
from django.conf import settings
from django.contrib.sessions.backends.base import UpdateError
from django.contrib.sessions.exceptions import SessionInterrupted
@ -271,7 +272,11 @@ class ChannelsLoggingMiddleware:
async def __call__(self, scope, receive, send):
self.log(scope)
return await self.inner(scope, receive, send)
try:
return await self.inner(scope, receive, send)
except Exception as exc:
LOGGER.warning("Exception in ASGI application", exc=exc)
raise DenyConnection() from None
def log(self, scope: dict, **kwargs):
"""Log request"""

12
poetry.lock generated
View File

@ -336,13 +336,13 @@ aio = ["aiohttp (>=3.0)"]
[[package]]
name = "azure-identity"
version = "1.16.0"
version = "1.16.1"
description = "Microsoft Azure Identity Library for Python"
optional = false
python-versions = ">=3.8"
files = [
{file = "azure-identity-1.16.0.tar.gz", hash = "sha256:6ff1d667cdcd81da1ceab42f80a0be63ca846629f518a922f7317a7e3c844e1b"},
{file = "azure_identity-1.16.0-py3-none-any.whl", hash = "sha256:722fdb60b8fdd55fa44dc378b8072f4b419b56a5e54c0de391f644949f3a826f"},
{file = "azure-identity-1.16.1.tar.gz", hash = "sha256:6d93f04468f240d59246d8afde3091494a5040d4f141cad0f49fc0c399d0d91e"},
{file = "azure_identity-1.16.1-py3-none-any.whl", hash = "sha256:8fb07c25642cd4ac422559a8b50d3e77f73dcc2bbfaba419d06d6c9d7cff6726"},
]
[package.dependencies]
@ -1707,13 +1707,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"]
[[package]]
name = "google-api-python-client"
version = "2.132.0"
version = "2.133.0"
description = "Google API Client Library for Python"
optional = false
python-versions = ">=3.7"
files = [
{file = "google-api-python-client-2.132.0.tar.gz", hash = "sha256:d6340dc83b72d72333cee5d50f7dcfecbff66a8783164090e945f985ec4c374d"},
{file = "google_api_python_client-2.132.0-py2.py3-none-any.whl", hash = "sha256:cde87700bd4d37f39f5e940292c1c6cd0910990b5b01f50b1332a8cea38e8595"},
{file = "google-api-python-client-2.133.0.tar.gz", hash = "sha256:293092905b66a046d3187a99ac454e12b00cc2c70444f26eb2f1f9c1a82720b4"},
{file = "google_api_python_client-2.133.0-py2.py3-none-any.whl", hash = "sha256:396fe676ea0dfed066654dcf9f8dea77a1342f9d9bb23bb88e45b7b81e773926"},
]
[package.dependencies]

View File

@ -6,7 +6,7 @@
"": {
"name": "@goauthentik/web-tests",
"dependencies": {
"chromedriver": "^125.0.3"
"chromedriver": "^126.0.0"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
@ -20,7 +20,7 @@
"eslint-config-google": "^0.14.0",
"eslint-plugin-sonarjs": "^0.25.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.1",
"prettier": "^3.3.2",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"wdio-wait-for": "^3.0.11"
@ -1879,12 +1879,12 @@
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@ -2084,9 +2084,9 @@
}
},
"node_modules/chromedriver": {
"version": "125.0.3",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-125.0.3.tgz",
"integrity": "sha512-Qzuk5Wian2o3EVGjtbz6V/jv+pT/AV9246HbG6kUljZXXjsKZLZxqJC+kHR3qEh/wdv4EJD0YwAOWV72v9hogw==",
"version": "126.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-126.0.0.tgz",
"integrity": "sha512-rzwKp1okI9RmFtSyIzkk9+GTlTK62ai5P3/AS2qMwl86+gw84d2S/IyLkQMm5cqieFs4dgDAuqqPu0AqQACScg==",
"hasInstallScript": true,
"dependencies": {
"@testim/chrome-version": "^1.1.4",
@ -3655,9 +3655,9 @@
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
@ -6908,9 +6908,9 @@
}
},
"node_modules/prettier": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz",
"integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"

View File

@ -14,7 +14,7 @@
"eslint-config-google": "^0.14.0",
"eslint-plugin-sonarjs": "^0.25.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.1",
"prettier": "^3.3.2",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"wdio-wait-for": "^3.0.11"
@ -32,6 +32,6 @@
"node": ">=20"
},
"dependencies": {
"chromedriver": "^125.0.3"
"chromedriver": "^126.0.0"
}
}

124
web/package-lock.json generated
View File

@ -25,7 +25,7 @@
"@open-wc/lit-helpers": "^0.7.0",
"@patternfly/elements": "^3.0.1",
"@patternfly/patternfly": "^4.224.2",
"@sentry/browser": "^8.8.0",
"@sentry/browser": "^8.9.1",
"@webcomponents/webcomponentsjs": "^2.8.0",
"base64-js": "^1.5.1",
"chart.js": "^4.4.3",
@ -90,7 +90,7 @@
"glob": "^10.4.1",
"lit-analyzer": "^2.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.1",
"prettier": "^3.3.2",
"pseudolocale": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.3.1",
@ -4640,102 +4640,102 @@
"peer": true
},
"node_modules/@sentry-internal/browser-utils": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.8.0.tgz",
"integrity": "sha512-yE4khknnGpAxy3TeAD9TU1eUqa0GUJ2xluIAsHKkL+RXg3AgEssMO3DBDUbpHp+QANIjzKmZIXtbdTV+1P26aQ==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.9.1.tgz",
"integrity": "sha512-jt2AC8yMhh9E8NBMgcyqLZDCeZq5RCOpHQ8MQxUfg3wFOg8+lRC/xQqCE32eWX0RCv7lhwlM9JsCGA/4TfJ4Zw==",
"dependencies": {
"@sentry/core": "8.8.0",
"@sentry/types": "8.8.0",
"@sentry/utils": "8.8.0"
"@sentry/core": "8.9.1",
"@sentry/types": "8.9.1",
"@sentry/utils": "8.9.1"
},
"engines": {
"node": ">=14.18"
}
},
"node_modules/@sentry-internal/feedback": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.8.0.tgz",
"integrity": "sha512-mybzWx99DuCJxYCVPx12NHVSVbSDF1goEo+rhDGYY8kqyn+snoVBLQtsSdDXYwZyssS1G7Gh6WhX+JVDKcQO9A==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.9.1.tgz",
"integrity": "sha512-hJjxyeXc6y9Q6ad1WktsQ1cLRuLtROn1+hBpakrd5CyBep3MXMyYqDqe3BSZd/lxnL+uT7kE5No7NsQM0jPksQ==",
"dependencies": {
"@sentry/core": "8.8.0",
"@sentry/types": "8.8.0",
"@sentry/utils": "8.8.0"
"@sentry/core": "8.9.1",
"@sentry/types": "8.9.1",
"@sentry/utils": "8.9.1"
},
"engines": {
"node": ">=14.18"
}
},
"node_modules/@sentry-internal/replay": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.8.0.tgz",
"integrity": "sha512-gMRWcjpiLJl03JB4rTMN2I4HOOJ6z611kdhUBYc+RRAue13A6uCSIPElgvlCMREkVmr/8eUKrCcIrpqj9PDJ4w==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.9.1.tgz",
"integrity": "sha512-JQlJz8tVmkxI4X5K+GysYmXfZ9x6tn7Wpq3z3zuWQSPRstJiWyNOanVCv92E+Z5k3wjEih9FRP5qfliLzS6VJQ==",
"dependencies": {
"@sentry-internal/browser-utils": "8.8.0",
"@sentry/core": "8.8.0",
"@sentry/types": "8.8.0",
"@sentry/utils": "8.8.0"
"@sentry-internal/browser-utils": "8.9.1",
"@sentry/core": "8.9.1",
"@sentry/types": "8.9.1",
"@sentry/utils": "8.9.1"
},
"engines": {
"node": ">=14.18"
}
},
"node_modules/@sentry-internal/replay-canvas": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.8.0.tgz",
"integrity": "sha512-LUoPi38Y8VRnxorIMmKLpfpf+jguhOsovMsZ3ZLc+FvMER62IIvSt4GKK4ARmUBX7+v3r61fdUWqxFs1j3uUTg==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.9.1.tgz",
"integrity": "sha512-9j3DB+R7UuKSi0iFFL6fb91/B7+/7dTNRNoW7RGt9DRFx6X283ZaCKyTGkzYtj0tpCpcRbrE+daINsG4yf/R8g==",
"dependencies": {
"@sentry-internal/replay": "8.8.0",
"@sentry/core": "8.8.0",
"@sentry/types": "8.8.0",
"@sentry/utils": "8.8.0"
"@sentry-internal/replay": "8.9.1",
"@sentry/core": "8.9.1",
"@sentry/types": "8.9.1",
"@sentry/utils": "8.9.1"
},
"engines": {
"node": ">=14.18"
}
},
"node_modules/@sentry/browser": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.8.0.tgz",
"integrity": "sha512-TkmbjV9pGpQ+OfUtIE8DaU467w73NqPTX/w/+241VlKpE9HbfranMG0N8Bibgt59GwoNIiC0NhmKaMTZg79elQ==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.9.1.tgz",
"integrity": "sha512-UCD/cQZHCFjIMmAtG7dcIRK8VmjU93QgYeI84lAf4DnKPU+/Xp+3kVJvpD3xiilpgiBz2q1RFfbjCAypJUTCYA==",
"dependencies": {
"@sentry-internal/browser-utils": "8.8.0",
"@sentry-internal/feedback": "8.8.0",
"@sentry-internal/replay": "8.8.0",
"@sentry-internal/replay-canvas": "8.8.0",
"@sentry/core": "8.8.0",
"@sentry/types": "8.8.0",
"@sentry/utils": "8.8.0"
"@sentry-internal/browser-utils": "8.9.1",
"@sentry-internal/feedback": "8.9.1",
"@sentry-internal/replay": "8.9.1",
"@sentry-internal/replay-canvas": "8.9.1",
"@sentry/core": "8.9.1",
"@sentry/types": "8.9.1",
"@sentry/utils": "8.9.1"
},
"engines": {
"node": ">=14.18"
}
},
"node_modules/@sentry/core": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.8.0.tgz",
"integrity": "sha512-SnQ42rOuUO03WvhS+2aogKhEzCW9cxpnpPzs2obxnS04KoAz7VL3oYyIwiACrRTlKpwdb9y6vuO89fDvgqPQbA==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.1.tgz",
"integrity": "sha512-7Q1yB4ZMJoNT6LsBVx1EyTsVemqYuKZoyEDEzZOYZsa/W438oF7M6g0JqK6TJG8JIZN50Lj5MrJOs6FAu51CCw==",
"dependencies": {
"@sentry/types": "8.8.0",
"@sentry/utils": "8.8.0"
"@sentry/types": "8.9.1",
"@sentry/utils": "8.9.1"
},
"engines": {
"node": ">=14.18"
}
},
"node_modules/@sentry/types": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.8.0.tgz",
"integrity": "sha512-2EOkyHoSOJyCRCsK/O6iA3wyELkRApfY7jNxsC/Amgb5ftuGl/rGO6B4dNKjMJNLNvlkEqZIANoUKOcClBH6yw==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.1.tgz",
"integrity": "sha512-V+TkaDVhakH/oW6f1KQiRbvHcczQLEzdwlH2lAP5Flh+wESS5VaSPqj+esLg53GFF8q0tw7QH1tSUGXWeGoJ5g==",
"engines": {
"node": ">=14.18"
}
},
"node_modules/@sentry/utils": {
"version": "8.8.0",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.8.0.tgz",
"integrity": "sha512-agLqo9KlXacj7NOcdYZUYqTKlFcPXdTzCnC2u9J1LxDjru9cogbiw6yyDtxBg3kpgYZubfOPz/7F2z9wCjK1cw==",
"version": "8.9.1",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.1.tgz",
"integrity": "sha512-9TROyW7PbyokwVO41wIhQRenhW+kPg2ws2nzz21aFbLCrwXvF2nNsZ67roeXOiu9n2Oy/O1yEksPOcT4zFcesQ==",
"dependencies": {
"@sentry/types": "8.8.0"
"@sentry/types": "8.9.1"
},
"engines": {
"node": ">=14.18"
@ -10471,13 +10471,12 @@
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"license": "MIT",
"dependencies": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@ -13180,11 +13179,10 @@
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
@ -14507,7 +14505,6 @@
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.12.0"
}
@ -17528,9 +17525,9 @@
}
},
"node_modules/prettier": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz",
"integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
@ -19810,7 +19807,6 @@
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},

View File

@ -46,7 +46,7 @@
"@open-wc/lit-helpers": "^0.7.0",
"@patternfly/elements": "^3.0.1",
"@patternfly/patternfly": "^4.224.2",
"@sentry/browser": "^8.8.0",
"@sentry/browser": "^8.9.1",
"@webcomponents/webcomponentsjs": "^2.8.0",
"base64-js": "^1.5.1",
"chart.js": "^4.4.3",
@ -111,7 +111,7 @@
"glob": "^10.4.1",
"lit-analyzer": "^2.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.1",
"prettier": "^3.3.2",
"pseudolocale": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.3.1",

View File

@ -0,0 +1,81 @@
---
title: Style Guide
---
Here are a few guidelines to ensure that the documentation is easy to read and uses similar phrasing. Remember to use our [docs templates](./templates/index.md) when possible; they are already set up to follow may of the style guidelines below.
If you find any documentation that doesn't match these guidelines, feel free to either open an [Issue](https://github.com/goauthentik/authentik/issues) or a [PR](https://github.com/goauthentik/authentik/pulls) so they can be fixed.
To test how the documentation renders use the Netlify Deploy Preview, especially when using Docusaurus-specific features. Or [build it locally and test](./writing-documentation.md#set-up-your-local-build), using the `make website-watch` command.
:::info
Make sure to add any new pages to the appropriate `sidebar` file. Otherwise, the new page will not appear in the table of contents to the left.
:::
## General guidelines
- Try to order the documentation sections in the order that makes it easiest for the user to follow. That is, order the sections in the same order as the actual workflow used to accomplish the task. Use headings (sub-titles) to break up long documents, and make it easier to find a specific section.
- You can use standard [Docusaurus-specific features](https://docusaurus.io/docs/next/markdown-features), which include MDX elements such as tabs and admonitions.
## Terminology
### authentik names
- The product name authentik should always start with a lower-case "a" and end with a "k". Even if it is the first word in a sentence. :-)
- Our company name is Authentik Security, Inc. but in non-legal documentation you can shorten it to Authentik Security.
### Industry terms, technology, and other tools
- When referring to external tools, or an industry term or technology, always follow the exact capitalization that the product or company itself uses on their website, in their official documentation, or what the industry uses in consensus.
- Try to avoid using abbreviations if possible.
- Use acronyms where it makes sense (for commonly used terms like SAML or RBAC). If an acronym is less-known, spell it out in parentheses after the first use.
## Writing style
- authentik documentation strives for a friendly, but not overly so, tone. It's ok to be a little bit conversational, and to address the reader in second person: "Next, you need to configure the log in settings."
- Our documentation uses American English ("z" not "s").
- Phrasing should almost always be in present tense and active voice:
- DON'T: "The Applications page will be loaded."
- DO: "The Applications page displays."
- Phrasing should never blame the user, and should be subjective:
- DON'T: "Never modify the default file."
- DO: "We recommend that you do not modify the default file, because this can result in unexpected issues."
## Formatting
Formatting in documentation is important; it improves comprehension and readability, and allows the brain to more quickly determine what is a command or a configuration setting, what is a field name, or what is a variable.
- When referring to UI elements or components in the authentik UI, such as field names, labels, etc., use **bold** text.
- Use `code` format when referring to:
- commands
- file paths
- directory names
- code snippets (single line or a block of code)
- For variables or placeholders use _italic_ font for the variable, and use place-holder names that makes it obvious that the user needs to replace it.
Example: <kbd>https://<em>company-domain</em>/source/oauth/callback/<em>source-slug</em></kbd>
When using variables in code snippets, make sure to specify if the value is something the user needs to define, is system-defined or generated.
- When referring to authentik functionality and features, such as flows, stages, sources, or policies, do not capitalize and do not use bold or italic text. When possible link to the corresponding documentation.
### Titles and headers
- Both titles and headers (H1, H2, H3) use sentence style capitalization, meaning that only the first word is capitalized. However, if the title or header includes a proper noun (name of a product, etc) then capitalize those words.
Examples:
- Configure your provider
- Configure the Google Workspace provider

View File

@ -9,7 +9,7 @@ title: "Combination topic"
wget https://raw.githubusercontent.com/goauthentik/authentik/main/website/developer-docs/docs/templates/combo.tmpl.md
```
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#general-guidelines) for writing tips and authentik-specific rules.
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#writing-guidelines) for writing tips and authentik-specific rules.
:::
For a combo topic, the title is typically the name of the feature ("Branding" or "Remote Access Control").

View File

@ -9,7 +9,7 @@ title: "Conceptual topic"
wget https://raw.githubusercontent.com/goauthentik/authentik/main/website/developer-docs/docs/templates/conceptual.tmpl.md
```
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#general-guidelines) for writing tips and authentik-specific rules.
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#writing-guidelines) for writing tips and authentik-specific rules.
:::
Use a title that focuses on the feature, component, or technology you are writing about... for example, "About authentik polices" or "Understanding outposts". For conceptual docs, the verb in the title should indicate a concept, such as "About" or "Overview" or "Understanding", followed by the noun (the component or object you are writing about).

View File

@ -9,7 +9,7 @@ title: "Procedural topic"
wget https://raw.githubusercontent.com/goauthentik/authentik/main/website/developer-docs/docs/templates/procedural.tmpl.md
```
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#general-guidelines) for writing tips and authentik-specific rules.
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#writing-guidelines) for writing tips and authentik-specific rules.
:::
For a procedural topic, use a title that focuses on the task you are writing about. For example, "Add a new Group" or "Edit user profiles". For procedural docs, there should be a verb in the title, and usually the noun (the component or object you are working on). For the title (and all headings) use the infinitive form of the verb (i.e. "add") not the gerund form (i.e. "adding").

View File

@ -9,7 +9,7 @@ title: "Reference topic"
wget https://raw.githubusercontent.com/goauthentik/authentik/main/website/developer-docs/docs/templates/reference.tmpl.md
```
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#general-guidelines) for writing tips and authentik-specific rules.
Edit your markdown file as you work, reading this page for the descriptions of each section. You can build out a "stub file" with just headers, then gradually add content to each section. Use screenshots sparingly, only for complex UIs where it is difficult to describe a UI element with words. Refer to our [General Guidelines](../writing-documentation#writing-guidelines) for writing tips and authentik-specific rules.
:::
Create a title that specifies the component you are documenting. For example, "Group attributes".

View File

@ -2,16 +2,19 @@
title: Writing documentation
---
Writing documentation for authentik is a great way for both new and experienced users to improve and contribute to the project. Here are a few guidelines to ensure
the documentation is easy to read and uses similar phrasing.
Writing documentation for authentik is a great way for both new and experienced users to improve and contribute to the project.
## Setup
## Set up your local build
Requirements:
- Node.js 16 (or greater)
- Node.js 20 (or greater, we use Node.js 22)
The documentation site is situated in the `/website` folder of the authentik GitHub repository.
The docs and the code are in the same Github repo, at https://github.com/goauthentik/authentik, so if you have cloned the repo, you already have the docs.
You can do local builds of the documentation to test your changes or review your new content, and to run the required `prettier` and linters before pushing your PR.
The documentation site is situated in the `/website` folder of the repo.
The site is built using npm, below are some useful make commands:
@ -19,57 +22,36 @@ The site is built using npm, below are some useful make commands:
This command is required before running any of the following commands, and after upgrading any dependencies.
- **Formatting**: `make website` or `make website-lint-fix`
- **Formatting**: `make website`, `make website-lint-fix`, or `npm run prettier`
Run this command before committing, to ensure consistent syntax, clean formatting, and verify links. Note that if the formatting command is not run, the build will fail with an error about linting.
Run the appropriate formatting command for your set up before committing, to ensure consistent syntax, clean formatting, and verify links. Note that if the formatting command is not run, the build will fail with an error about linting.
- **Live editing**: `make website-watch`
For real time viewing of changes, as you make them.
:::info
Be sure to run the formatter before committing changes.
Be sure to run a formatting command before committing changes.
:::
## General guidelines
## Writing guidelines
- The product name authentik should always be stylized as `authentik` (with a lower-case "a" and ending with a "k").
- Documentation should use American English.
- You can use standard [Docusaurus-specific features](https://docusaurus.io/docs/next/markdown-features), which include MDX elements such as tabs and admonitions.
- Use abbreviations where it makes sense (for commonly used terms like SAML and OAuth) for common terms. If an abbreciation is less-known, spell it out in parentheses after the first use.
- Phrasing should almost always be in present tense and active voice:
Please refer to our [Style Guide](./style-guide.mdx) for authentik documentation. Here you will learn important guidelines about not capitalizing authentik, how we format our titles and headers, and much more.
- DON'T: "The Applications page will be loaded."
Whenever possible, use one of our [doc templates](./templates/index.md). This makes it a lot easier for you (no blank page frights!) and keeps the documentation consistent.
- DO: "The Applications page displays."
Make sure to add the new pages to the appropriate place in `/website/sidebars.js`. Otherwise, the content will not appear in the table of contents to the left.
- Phrasing should never blame the user, and should be subjective:
Following the guidelines will make getting your PRs merged much easier and faster, with fewer edits needed. We appreciate our community contributors helping us keep the Docs consistent, easy-to-use, and high quality.
- DON'T: "Never modify the default file."
## Documentation for Integrations
- DO: "We recommend not modifying the default file."
In addition to following the [Style Guide](./style-guide.mdx) please review the following guidelines.
- When referring to UI text or UI components in authentik, use **bold** text.
- When referring to other objects in authentik code or functionality, use _cursive_ text, and link to the corresponding documentation if possible.
- When referring to external tools, give an example how to use the tools or explain how the user can use them.
- Make sure to add the documentation to the sidebar, if adding a new page.
- Test how the documentation renders using the Netlify Deploy Preview, especially when using Docusaurus-specific features. Or build it locally and test, using the `make website-watch` command.
For new integration documentation, please use the Integrations template in our [Github repo](https://github.com/goauthentik/authentik) at `/website/integrations/_template/service.md`.
If you find any documentation that doesn't match these guidelines, feel free to either open an [Issue](https://github.com/goauthentik/authentik/issues) or a [PR](https://github.com/goauthentik/authentik/pulls) so they can be fixed.
## Integration guidelines
These guidelines apply in addition to the ones above.
See the template in `/website/integrations/_template/service.md`.
- For placeholders, use angle brackets and italicize the text inside the brackets, to indicate that it is a variable (`_<placeholder-name>_`).
Make sure to also define if the placeholder is something the user needs to define, is something another system defines, or is randomly generated.
If you're adding configuration snippets to the documentation, and the snippet is in a language that supports comments, other placeholders may be used, for example comments referencing an earlier step.
- Make sure to add the service to a fitting category in `/website/sidebarsIntegrations.js`. If this is not done the service will not appear in the table of contents to the left.
- For placeholder domains, use `authentik.company` and `app-name.company`, where `app-name` is the name of the application that you are writing documentation for.
- Try to order the documentation in the order that makes it easiest for the user to configure.
- Make sure to add the service to a fitting category in `/website/sidebarsIntegrations.js`
- Try to order the documentation sections in an order that makes it easiest for the user to configure.

View File

@ -7,6 +7,8 @@ slug: /
The following is a set of guidelines for contributing to authentik and its components, which are hosted in the [goauthentik Organization](https://github.com/goauthentik) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
We appreciate contributions of code, documentation, enhancements, and bug fixes. Read more [below](#how-can-i-contribute) about the many ways to contribute.
## Code of Conduct
We expect all contributors to act professionally and respectfully in all interactions. If there's something you dislike or think can be done better, tell us! We'd love to hear any suggestions for improvement.
@ -121,6 +123,8 @@ This is documented in the [developer docs](./setup/frontend-dev-environment.md)
Contributions to the technical documentation are greatly appreciated. Open a PR if you have improvements to make or new content to add. If you have questions or suggestions about the documentation, open an Issue. No contribution is too small.
Please be sure to refer to our [Style Guide](../developer-docs/docs/style-guide.mdx) for the docs, and use a [template](./docs/templates/index.md) to make it easier for you. The style guidelines are also used for any Integrations documentation, and we have a template for Integrations as well, in our [Github repo](https://github.com/goauthentik/authentik) at `/website/integrations/_template/service.md`.
### Pull Requests
The process described here has several goals:
@ -144,7 +148,9 @@ While the prerequisites above must be satisfied prior to having your pull reques
- Use the format of `<package>: <verb> <description>`
- See [here](#authentiks-structure) for `package`
- Example: `providers/saml2: fix parsing of requests`
- Examples:
`providers/saml2: fix parsing of requests`
`website/docs: add config info for GWS`
### Git Commit Messages
@ -154,7 +160,7 @@ While the prerequisites above must be satisfied prior to having your pull reques
- Reference issues and pull requests liberally after the first line
- Naming of commits within a PR does not need to adhere to the guidelines as we squash merge PRs
### Python Styleguide
### Python Style Guide
All Python code is linted with [black](https://black.readthedocs.io/en/stable/) and [Ruff](https://docs.astral.sh/ruff).
@ -165,6 +171,14 @@ authentik runs on Python 3.12 at the time of writing this.
- Ensure any database migrations work properly from the last stable version (this is checked via CI)
- If your code changes central functions, make sure nothing else is broken.
### Documentation Styleguide
### Documentation Style Guide
- Use [MDX](https://mdxjs.com/) whenever appropriate.
Refer to the full [Style Guide](../developer-docs/docs/style-guide.mdx) for details, but here are some important highlights:
- Our product name is authentik, with a lower-case "a" and a "k" on the end. Our company name is Authentik Security.
- We use sentence style case in our titles and headings.
- We use **bold** text to name UI components, and _italic_ text for variables.
- Use [MDX](https://mdxjs.com/) whenever appropriate. MDX, which uses React components, is useful for creating tabs, action buttons, and advanced content formatting.

View File

@ -29,7 +29,7 @@ Under _Advanced protocol settings_, set a certificate for _Signing Certificate_.
## GitLab Configuration
Paste the following block in your `gitlab.rb` file, after replacing the placeholder values from above. The file is located in `/etc/gitlab`.
To get the value for `idp_cert_fingerprint`, go to the Certificate list under _Identity & Cryptography_, and expand the selected certificate.
To get the value for `idp_cert_fingerprint`, navigate to the authentik Admin interface, expand the **System** section and select **Certificates**. Then, expand the selected certificate and copy the SHA1 Certificate Fingerprint.
```ruby
gitlab_rails['omniauth_enabled'] = true

View File

@ -6,7 +6,7 @@ title: Service Name
## What is Service-Name
> Insert a quick overview of what Service Name is and what it does
> Insert a quick overview of what Service Name is and what it does. Simply describe the product and what it is, how it is used, and do not include marketing or sales-oriented content.
>
> -- https://service.xyz

View File

@ -35,7 +35,7 @@
"@docusaurus/tsconfig": "^3.4.0",
"@docusaurus/types": "^3.3.2",
"@types/react": "^18.3.3",
"prettier": "3.3.1",
"prettier": "3.3.2",
"typescript": "~5.4.5"
},
"engines": {
@ -4916,11 +4916,11 @@
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dependencies": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@ -8348,9 +8348,9 @@
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dependencies": {
"to-regex-range": "^5.0.1"
},
@ -15002,9 +15002,9 @@
}
},
"node_modules/prettier": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz",
"integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"

View File

@ -54,7 +54,7 @@
"@docusaurus/tsconfig": "^3.4.0",
"@docusaurus/types": "^3.3.2",
"@types/react": "^18.3.3",
"prettier": "3.3.1",
"prettier": "3.3.2",
"typescript": "~5.4.5"
},
"engines": {

View File

@ -76,6 +76,7 @@ module.exports = {
id: "docs/writing-documentation",
},
items: [
"docs/style-guide",
{
type: "category",
label: "Templates",
@ -87,6 +88,7 @@ module.exports = {
"docs/templates/procedural",
"docs/templates/conceptual",
"docs/templates/reference",
"docs/templates/combo",
],
},
],