@paramira/authentik-blueprints 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ no passwords**, made for small organisations and communities, for Authentik
|
|
|
21
21
|
|
|
22
22
|
| File | Holds |
|
|
23
23
|
|---|---|
|
|
24
|
-
| `blueprints/paramira/accounts.yaml` | the site's role groups `paramira-web-community` (everyone, from sign-up), `-contributor`, `-editor`, `-customer`, `-admin` (ADR-0018); sign-up lets the people service see the new account; the flows `paramira-enrollment`, `paramira-login-link` (designated *recovery*: only there does Authentik pretend to send for an unknown address) and `paramira-authentication` (the brand's sign-in, which hands over to the link flow and comes back to the app); the brand |
|
|
25
|
-
| `blueprints/paramira/site.yaml` | the OIDC provider and application `paramira-web`; a `paramira` scope (`user_pk`, `wallet_enrolled`, `wallet_opt_in`, `groups`); the people service (role, account, token `PARAMIRA_PEOPLE_TOKEN`) that moves people between
|
|
24
|
+
| `blueprints/paramira/accounts.yaml` | the site's role groups `paramira-web-community` (everyone, from sign-up), `-contributor`, `-editor`, `-customer`, `-speaker` (readfine ADR-0061), `-admin` (ADR-0018); sign-up lets the people service see the new account; the flows `paramira-enrollment`, `paramira-login-link` (designated *recovery*: only there does Authentik pretend to send for an unknown address) and `paramira-authentication` (the brand's sign-in, which hands over to the link flow and comes back to the app); the brand |
|
|
25
|
+
| `blueprints/paramira/site.yaml` | the OIDC provider and application `paramira-web`; a `paramira` scope (`user_pk`, `wallet_enrolled`, `wallet_opt_in`, `groups`); the people service (role, account, token `PARAMIRA_PEOPLE_TOKEN`) that moves people between five of the role groups, never admin, and makes, sees and deletes invitations. `apply` gives it its permissions and backfills existing accounts (community, visible to it) |
|
|
26
26
|
| `blueprints/paramira/readfine.yaml` | readfine, the dictionary (paramira-web design 0013, ADR-0053): its own OIDC provider and application `readfine`, with the `paramira` scope from `site.yaml` (the same roles), a strict redirect URI and the grants listed; suspended accounts refused. Environment: `PARAMIRA_READFINE_CLIENT_SECRET` (and `_CLIENT_ID`, `_REDIRECT_URI`, `_URL`) |
|
|
27
27
|
| `templates/paramira/link.html`, `.txt` | the one link email, for sign-up and sign-in |
|
|
28
28
|
|
|
@@ -39,8 +39,10 @@ metadata:
|
|
|
39
39
|
entries:
|
|
40
40
|
# Groups: the site's roles (design 0003, ADR-0018). Everyone joins
|
|
41
41
|
# community at sign-up; an admin moves people between community,
|
|
42
|
-
# contributor, editor and
|
|
43
|
-
#
|
|
42
|
+
# contributor, editor, customer and speaker (the people service, site.yaml;
|
|
43
|
+
# speaker: readfine ADR-0061); admin
|
|
44
|
+
# and treasurer (ADR-0069) are given only here, in Authentik. A person can
|
|
45
|
+
# be in several.
|
|
44
46
|
- model: authentik_core.group
|
|
45
47
|
id: g-members
|
|
46
48
|
identifiers: {name: paramira-web-community}
|
|
@@ -53,9 +55,15 @@ entries:
|
|
|
53
55
|
- model: authentik_core.group
|
|
54
56
|
id: g-customers
|
|
55
57
|
identifiers: {name: paramira-web-customer}
|
|
58
|
+
- model: authentik_core.group
|
|
59
|
+
id: g-speakers
|
|
60
|
+
identifiers: {name: paramira-web-speaker}
|
|
56
61
|
- model: authentik_core.group
|
|
57
62
|
id: g-admins
|
|
58
63
|
identifiers: {name: paramira-web-admin}
|
|
64
|
+
- model: authentik_core.group
|
|
65
|
+
id: g-treasurers
|
|
66
|
+
identifiers: {name: paramira-web-treasurer}
|
|
59
67
|
# Suspended accounts (ADR-0036): refused by the flows below and by the
|
|
60
68
|
# site's and chat's applications; an admin never is.
|
|
61
69
|
- model: authentik_core.group
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
# ADR-0022).
|
|
16
16
|
#
|
|
17
17
|
# The people service (design 0003, ADR-0018): an account whose token can see
|
|
18
|
-
# the paramira-web-* groups and move people in and out of
|
|
19
|
-
# (community, contributor, editor, customer), never admin. Its permissions
|
|
18
|
+
# the paramira-web-* groups and move people in and out of five of them
|
|
19
|
+
# (community, contributor, editor, customer, speaker), never admin. Its permissions
|
|
20
20
|
# are given per group by `authentik-blueprints apply` (src/index.js).
|
|
21
21
|
# PARAMIRA_PEOPLE_TOKEN the people service's API token (48+ random characters)
|
|
22
22
|
version: 1
|
|
@@ -60,7 +60,7 @@ entries:
|
|
|
60
60
|
identifiers: {name: paramira-chat-who}
|
|
61
61
|
attrs:
|
|
62
62
|
expression: |
|
|
63
|
-
roles = ("community", "contributor", "editor", "customer", "admin")
|
|
63
|
+
roles = ("community", "contributor", "editor", "customer", "speaker", "admin")
|
|
64
64
|
return any(ak_is_group_member(request.user, name="paramira-web-" + r) for r in roles)
|
|
65
65
|
- model: authentik_policies.policybinding
|
|
66
66
|
identifiers: {target: !KeyOf app, order: 0}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paramira/authentik-blueprints",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Authentik blueprints for email-first accounts (sign-up and sign-in by email link, no passwords), a brand, link emails in plain words, and a site as an OIDC client; a CLI to validate and apply them; an akantu setup tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/index.js
CHANGED
|
@@ -18,9 +18,11 @@ export const ORDER = ['paramira/accounts.yaml', 'paramira/site.yaml', 'paramira/
|
|
|
18
18
|
export const OPTIONAL = ['paramira-wallet/wallet.yaml', 'paramira-ecosystem/matrix.yaml']
|
|
19
19
|
|
|
20
20
|
/** The site's roles (design 0003, ADR-0018), as Authentik groups. */
|
|
21
|
-
export const SITE_GROUPS = ['paramira-web-community', 'paramira-web-contributor', 'paramira-web-editor', 'paramira-web-customer', 'paramira-web-admin']
|
|
22
|
-
/**
|
|
23
|
-
export const
|
|
21
|
+
export const SITE_GROUPS = ['paramira-web-community', 'paramira-web-contributor', 'paramira-web-editor', 'paramira-web-customer', 'paramira-web-speaker', 'paramira-web-admin', 'paramira-web-treasurer']
|
|
22
|
+
/** Given only in Authentik, by its administrators: admin, and the treasurer (ADR-0069). */
|
|
23
|
+
export const AUTHENTIK_ONLY_GROUPS = ['paramira-web-admin', 'paramira-web-treasurer']
|
|
24
|
+
/** The groups the people service may move people in and out of: never admin or treasurer. */
|
|
25
|
+
export const PEOPLE_GROUPS = SITE_GROUPS.filter((g) => !AUTHENTIK_ONLY_GROUPS.includes(g))
|
|
24
26
|
/** Suspended accounts (ADR-0036): not a role; the flows and applications refuse its members, never an admin. */
|
|
25
27
|
export const SUSPENDED_GROUP = 'paramira-web-suspended'
|
|
26
28
|
|
|
@@ -34,7 +36,8 @@ const GROUP_MEMBERSHIP = ['authentik_core.view_group', 'authentik_core.add_user_
|
|
|
34
36
|
* - The onboarding service links accounts to wallets and nothing else: no
|
|
35
37
|
* permission on users.
|
|
36
38
|
* - The people service sees the site's groups (who has which role) and moves
|
|
37
|
-
* people in and out of
|
|
39
|
+
* people in and out of five of them; on the admin and treasurer groups it
|
|
40
|
+
* can only look.
|
|
38
41
|
* It makes, sees and deletes invitations (design 0008: /admin/invites),
|
|
39
42
|
* and sees flows (to name the sign-up flow an invitation is for). It
|
|
40
43
|
* suspends accounts by moving them in and out of the suspended group,
|
|
@@ -45,7 +48,7 @@ export const ROLE_PERMISSIONS = {
|
|
|
45
48
|
'paramira/site.yaml': {
|
|
46
49
|
'paramira-people': [
|
|
47
50
|
...PEOPLE_GROUPS.map((group) => ({ group, permissions: GROUP_MEMBERSHIP })),
|
|
48
|
-
{ group
|
|
51
|
+
...AUTHENTIK_ONLY_GROUPS.map((group) => ({ group, permissions: ['authentik_core.view_group'] })),
|
|
49
52
|
{ group: SUSPENDED_GROUP, permissions: GROUP_MEMBERSHIP },
|
|
50
53
|
'authentik_stages_invitation.add_invitation',
|
|
51
54
|
'authentik_stages_invitation.view_invitation',
|