@paramira/authentik-blueprints 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +90 -2
- package/bin/authentik-blueprints.js +106 -0
- package/blueprints/paramira/accounts.yaml +438 -0
- package/blueprints/paramira/readfine.yaml +63 -0
- package/blueprints/paramira/site.yaml +123 -0
- package/blueprints/paramira-ecosystem/matrix.yaml +85 -0
- package/blueprints/paramira-wallet/wallet.yaml +109 -0
- package/package.json +48 -3
- package/setup/authentik.blueprints/linux/apply.sh +4 -0
- package/setup/authentik.blueprints/linux/check.sh +4 -0
- package/setup/authentik.blueprints/linux/verify.sh +4 -0
- package/setup/authentik.blueprints/manifest.yaml +12 -0
- package/src/index.js +355 -0
- package/templates/paramira/link.html +39 -0
- package/templates/paramira/link.txt +10 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# readfine (design 0013, ADR-0053): the dictionary's site as an OpenID
|
|
2
|
+
# Connect client of Authentik, with the same accounts and roles as
|
|
3
|
+
# paramira.org (ADR-0018). Its own client, so neither site can read the
|
|
4
|
+
# other's session: a person signed in on paramira.org signs in here with one
|
|
5
|
+
# click through Authentik's session.
|
|
6
|
+
# Needs accounts.yaml (the sign-in flow, the suspended policy) and site.yaml
|
|
7
|
+
# (the `paramira` scope) applied first.
|
|
8
|
+
#
|
|
9
|
+
# Environment (on Authentik's server and worker):
|
|
10
|
+
# PARAMIRA_READFINE_CLIENT_ID e.g. readfine
|
|
11
|
+
# PARAMIRA_READFINE_CLIENT_SECRET random, at least 32 bytes; shared with readfine
|
|
12
|
+
# PARAMIRA_READFINE_REDIRECT_URI e.g. https://readfine.paramira.org/auth/callback
|
|
13
|
+
# PARAMIRA_READFINE_URL e.g. https://readfine.paramira.org
|
|
14
|
+
version: 1
|
|
15
|
+
metadata:
|
|
16
|
+
name: paramira-readfine
|
|
17
|
+
labels:
|
|
18
|
+
blueprints.goauthentik.io/description: "paramira: readfine, the dictionary, as an OIDC client"
|
|
19
|
+
entries:
|
|
20
|
+
- model: authentik_providers_oauth2.oauth2provider
|
|
21
|
+
id: provider
|
|
22
|
+
identifiers: {name: readfine}
|
|
23
|
+
attrs:
|
|
24
|
+
authorization_flow: !Find [authentik_flows.flow, [slug, default-provider-authorization-implicit-consent]]
|
|
25
|
+
invalidation_flow: !Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
|
26
|
+
authentication_flow: !Find [authentik_flows.flow, [slug, paramira-authentication]]
|
|
27
|
+
# A confidential client: the code flow with PKCE runs on readfine's
|
|
28
|
+
# server (ADR-0009); no token reaches the browser.
|
|
29
|
+
client_type: confidential
|
|
30
|
+
# Authentik 2026.8 allows only the grants listed.
|
|
31
|
+
grant_types: [authorization_code, refresh_token]
|
|
32
|
+
client_id: !Env [PARAMIRA_READFINE_CLIENT_ID, readfine]
|
|
33
|
+
client_secret: !Env PARAMIRA_READFINE_CLIENT_SECRET
|
|
34
|
+
redirect_uris:
|
|
35
|
+
- matching_mode: strict
|
|
36
|
+
url: !Env [PARAMIRA_READFINE_REDIRECT_URI, "https://readfine.paramira.localhost/auth/callback"]
|
|
37
|
+
signing_key: !Find [authentik_crypto.certificatekeypair, [name, authentik Self-signed Certificate]]
|
|
38
|
+
sub_mode: hashed_user_id
|
|
39
|
+
include_claims_in_id_token: true
|
|
40
|
+
access_token_validity: minutes=10
|
|
41
|
+
refresh_token_validity: days=30
|
|
42
|
+
property_mappings:
|
|
43
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-openid]]
|
|
44
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-email]]
|
|
45
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-profile]]
|
|
46
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-offline_access]]
|
|
47
|
+
# site.yaml's: the account number, the roles, when the account was made
|
|
48
|
+
- !Find [authentik_providers_oauth2.scopemapping, [name, "paramira: account state"]]
|
|
49
|
+
|
|
50
|
+
- model: authentik_core.application
|
|
51
|
+
id: app
|
|
52
|
+
identifiers: {slug: readfine}
|
|
53
|
+
attrs:
|
|
54
|
+
name: readfine
|
|
55
|
+
provider: !KeyOf provider
|
|
56
|
+
meta_launch_url: !Env [PARAMIRA_READFINE_URL, "https://readfine.paramira.localhost"]
|
|
57
|
+
policy_engine_mode: any
|
|
58
|
+
# A suspended account (ADR-0036) can't sign in here either.
|
|
59
|
+
- model: authentik_policies.policybinding
|
|
60
|
+
identifiers: {target: !KeyOf app, order: 0}
|
|
61
|
+
attrs:
|
|
62
|
+
policy: !Find [authentik_policies_expression.expressionpolicy, [name, paramira-suspended]]
|
|
63
|
+
negate: true
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# The paramira.org site as an OpenID Connect client of Authentik.
|
|
2
|
+
# Design 0001 (ADR-0009: a confidential client, code + PKCE, server side).
|
|
3
|
+
# Needs accounts.yaml applied first (its sign-in flow).
|
|
4
|
+
#
|
|
5
|
+
# Environment (on Authentik's server and worker):
|
|
6
|
+
# PARAMIRA_SITE_CLIENT_ID e.g. paramira-web
|
|
7
|
+
# PARAMIRA_SITE_CLIENT_SECRET random, at least 32 bytes; shared with the site
|
|
8
|
+
# PARAMIRA_SITE_REDIRECT_URI e.g. https://paramira.org/auth/callback
|
|
9
|
+
# PARAMIRA_SITE_URL e.g. https://paramira.org
|
|
10
|
+
#
|
|
11
|
+
# The `paramira` scope adds user_pk, wallet_enrolled (linked at the
|
|
12
|
+
# paramira-wallet source, if it exists), wallet_opt_in (asked at sign-up) and
|
|
13
|
+
# groups (the site's roles: the account's paramira-web-* groups) and joined
|
|
14
|
+
# (when the account was made: a vote refuses accounts made during it,
|
|
15
|
+
# ADR-0022).
|
|
16
|
+
#
|
|
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 four of them
|
|
19
|
+
# (community, contributor, editor, customer), never admin. Its permissions
|
|
20
|
+
# are given per group by `authentik-blueprints apply` (src/index.js).
|
|
21
|
+
# PARAMIRA_PEOPLE_TOKEN the people service's API token (48+ random characters)
|
|
22
|
+
version: 1
|
|
23
|
+
metadata:
|
|
24
|
+
name: paramira-site
|
|
25
|
+
labels:
|
|
26
|
+
blueprints.goauthentik.io/description: "paramira: the paramira.org site as an OIDC client"
|
|
27
|
+
entries:
|
|
28
|
+
- model: authentik_providers_oauth2.scopemapping
|
|
29
|
+
id: m-paramira
|
|
30
|
+
identifiers: {name: "paramira: account state"}
|
|
31
|
+
attrs:
|
|
32
|
+
scope_name: paramira
|
|
33
|
+
description: Your account number, whether a wallet is linked, and your roles on the site
|
|
34
|
+
expression: |
|
|
35
|
+
# user_pk is for the site's server (it links wallets by it); the
|
|
36
|
+
# browser never sees the ID token (ADR-0009).
|
|
37
|
+
from authentik.sources.oauth.models import UserOAuthSourceConnection
|
|
38
|
+
linked = UserOAuthSourceConnection.objects.filter(user=request.user, source__slug="paramira-wallet").exists()
|
|
39
|
+
opted_in = bool(((request.user.attributes or {}).get("paramira") or {}).get("wallet_opt_in", False))
|
|
40
|
+
groups = sorted({g.name for g in request.user.groups.all() if g.name.startswith("paramira-web-")})
|
|
41
|
+
joined = request.user.date_joined.isoformat() if request.user.date_joined else None
|
|
42
|
+
return {"user_pk": request.user.pk, "wallet_enrolled": linked, "wallet_opt_in": opted_in, "groups": groups, "joined": joined}
|
|
43
|
+
|
|
44
|
+
- model: authentik_providers_oauth2.oauth2provider
|
|
45
|
+
id: provider
|
|
46
|
+
identifiers: {name: paramira-web}
|
|
47
|
+
attrs:
|
|
48
|
+
authorization_flow: !Find [authentik_flows.flow, [slug, default-provider-authorization-implicit-consent]]
|
|
49
|
+
invalidation_flow: !Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
|
50
|
+
authentication_flow: !Find [authentik_flows.flow, [slug, paramira-authentication]]
|
|
51
|
+
client_type: confidential
|
|
52
|
+
# Authentik 2026.8 allows only the grants listed: none by default for a
|
|
53
|
+
# new provider, every one for a provider made before the upgrade.
|
|
54
|
+
grant_types: [authorization_code, refresh_token]
|
|
55
|
+
client_id: !Env [PARAMIRA_SITE_CLIENT_ID, paramira-web]
|
|
56
|
+
client_secret: !Env PARAMIRA_SITE_CLIENT_SECRET
|
|
57
|
+
redirect_uris:
|
|
58
|
+
- matching_mode: strict
|
|
59
|
+
url: !Env [PARAMIRA_SITE_REDIRECT_URI, "https://paramira.localhost/auth/callback"]
|
|
60
|
+
signing_key: !Find [authentik_crypto.certificatekeypair, [name, authentik Self-signed Certificate]]
|
|
61
|
+
sub_mode: hashed_user_id
|
|
62
|
+
include_claims_in_id_token: true
|
|
63
|
+
access_token_validity: minutes=10
|
|
64
|
+
refresh_token_validity: days=30
|
|
65
|
+
property_mappings:
|
|
66
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-openid]]
|
|
67
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-email]]
|
|
68
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-profile]]
|
|
69
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-offline_access]]
|
|
70
|
+
- !KeyOf m-paramira
|
|
71
|
+
|
|
72
|
+
- model: authentik_core.application
|
|
73
|
+
id: app
|
|
74
|
+
identifiers: {slug: paramira-web}
|
|
75
|
+
attrs:
|
|
76
|
+
name: Paramira
|
|
77
|
+
provider: !KeyOf provider
|
|
78
|
+
# Where Authentik sends an external user (every sign-up) who lands on its
|
|
79
|
+
# own pages, as after linking a wallet (ADR-0028): their profile.
|
|
80
|
+
meta_launch_url: !Format ["%s/profile", !Env [PARAMIRA_SITE_URL, "https://paramira.localhost"]]
|
|
81
|
+
policy_engine_mode: any
|
|
82
|
+
# A suspended account (ADR-0036) can't sign in to the site, even with an
|
|
83
|
+
# Authentik session still open.
|
|
84
|
+
- model: authentik_policies.policybinding
|
|
85
|
+
identifiers: {target: !KeyOf app, order: 0}
|
|
86
|
+
attrs:
|
|
87
|
+
policy: !Find [authentik_policies_expression.expressionpolicy, [name, paramira-suspended]]
|
|
88
|
+
negate: true
|
|
89
|
+
|
|
90
|
+
# Site accounts are external users: after any sign-in without a way back
|
|
91
|
+
# (an email link opened on its own), send them to the site, not to
|
|
92
|
+
# Authentik's user interface (which is for internal users).
|
|
93
|
+
- model: authentik_brands.brand
|
|
94
|
+
identifiers: {domain: !Env [PARAMIRA_AUTH_DOMAIN, auth.paramira.localhost]}
|
|
95
|
+
attrs:
|
|
96
|
+
default_application: !KeyOf app
|
|
97
|
+
# The logo, the tab's icon and the sign-in page's background, served by
|
|
98
|
+
# the site itself (apps/web/public/brand): nothing from another site.
|
|
99
|
+
branding_logo: !Format ["%s/brand/paramira-wordmark.png", !Env [PARAMIRA_SITE_URL, "https://paramira.localhost"]]
|
|
100
|
+
branding_favicon: !Format ["%s/brand/paramira-mark-32.png", !Env [PARAMIRA_SITE_URL, "https://paramira.localhost"]]
|
|
101
|
+
branding_default_flow_background: !Format ["%s/brand/paramira-login-background.webp", !Env [PARAMIRA_SITE_URL, "https://paramira.localhost"]]
|
|
102
|
+
|
|
103
|
+
# The people service: moves people between four of the site's groups.
|
|
104
|
+
- model: authentik_rbac.role
|
|
105
|
+
id: people-role
|
|
106
|
+
identifiers: {name: paramira-people}
|
|
107
|
+
- model: authentik_core.user
|
|
108
|
+
id: people-svc
|
|
109
|
+
identifiers: {username: paramira-people}
|
|
110
|
+
attrs:
|
|
111
|
+
name: paramira people service
|
|
112
|
+
type: service_account
|
|
113
|
+
path: service-accounts/paramira
|
|
114
|
+
is_active: true
|
|
115
|
+
roles: [!KeyOf people-role]
|
|
116
|
+
- model: authentik_core.token
|
|
117
|
+
identifiers: {identifier: paramira-people}
|
|
118
|
+
attrs:
|
|
119
|
+
intent: api
|
|
120
|
+
user: !KeyOf people-svc
|
|
121
|
+
key: !Env PARAMIRA_PEOPLE_TOKEN
|
|
122
|
+
expiring: false
|
|
123
|
+
description: paramira people service (site roles, never admin)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Chat (design 0007, recipes/matrix): Matrix's sign-in service (MAS) as an
|
|
2
|
+
# OIDC client. Applied only where it is mounted (where Matrix runs). Everyone
|
|
3
|
+
# with an account may sign in (ADR-0032).
|
|
4
|
+
version: 1
|
|
5
|
+
metadata:
|
|
6
|
+
name: paramira-ecosystem-matrix
|
|
7
|
+
labels:
|
|
8
|
+
blueprints.goauthentik.io/description: "paramira: chat (Matrix) as an OIDC client"
|
|
9
|
+
entries:
|
|
10
|
+
# Authentik's own email mapping always says email_verified: false. Every
|
|
11
|
+
# paramira account's address was verified by an email link before the
|
|
12
|
+
# account existed (design 0001), so clients may trust it.
|
|
13
|
+
- model: authentik_providers_oauth2.scopemapping
|
|
14
|
+
id: m-email
|
|
15
|
+
identifiers: {name: "paramira: email (verified at sign-up)"}
|
|
16
|
+
attrs:
|
|
17
|
+
scope_name: email
|
|
18
|
+
description: Your email address
|
|
19
|
+
expression: |
|
|
20
|
+
return {"email": request.user.email, "email_verified": bool(request.user.email)}
|
|
21
|
+
|
|
22
|
+
- model: authentik_providers_oauth2.oauth2provider
|
|
23
|
+
id: provider
|
|
24
|
+
identifiers: {name: paramira-chat}
|
|
25
|
+
attrs:
|
|
26
|
+
authorization_flow: !Find [authentik_flows.flow, [slug, default-provider-authorization-implicit-consent]]
|
|
27
|
+
invalidation_flow: !Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
|
28
|
+
authentication_flow: !Find [authentik_flows.flow, [slug, paramira-authentication]]
|
|
29
|
+
client_type: confidential
|
|
30
|
+
# Authentik 2026.8 allows only the grants listed.
|
|
31
|
+
grant_types: [authorization_code]
|
|
32
|
+
client_id: !Env [PARAMIRA_MATRIX_CLIENT_ID, paramira-chat]
|
|
33
|
+
client_secret: !Env PARAMIRA_MATRIX_CLIENT_SECRET
|
|
34
|
+
redirect_uris:
|
|
35
|
+
# MAS's callback for its upstream provider (its id: recipes/matrix/mas/config.yaml).
|
|
36
|
+
- matching_mode: strict
|
|
37
|
+
url: !Env [PARAMIRA_MATRIX_REDIRECT_URI, "https://account.paramira.localhost/upstream/callback/01JBXK5N2Q8Z4M7R3W9T6YVHCD"]
|
|
38
|
+
signing_key: !Find [authentik_crypto.certificatekeypair, [name, authentik Self-signed Certificate]]
|
|
39
|
+
sub_mode: hashed_user_id
|
|
40
|
+
include_claims_in_id_token: true
|
|
41
|
+
property_mappings:
|
|
42
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-openid]]
|
|
43
|
+
- !KeyOf m-email
|
|
44
|
+
- !Find [authentik_providers_oauth2.scopemapping, [managed, goauthentik.io/providers/oauth2/scope-profile]]
|
|
45
|
+
|
|
46
|
+
- model: authentik_core.application
|
|
47
|
+
id: app
|
|
48
|
+
identifiers: {slug: paramira-chat}
|
|
49
|
+
attrs:
|
|
50
|
+
name: Chat
|
|
51
|
+
provider: !KeyOf provider
|
|
52
|
+
meta_launch_url: !Env [PARAMIRA_MATRIX_URL, "https://chat.paramira.localhost"]
|
|
53
|
+
policy_engine_mode: all
|
|
54
|
+
|
|
55
|
+
# Who may sign in: everyone with an account (community, from sign-up;
|
|
56
|
+
# ADR-0032, amending ADR-0029), and the roles above it, in case an account
|
|
57
|
+
# was taken out of community; never a suspended account (ADR-0036).
|
|
58
|
+
- model: authentik_policies_expression.expressionpolicy
|
|
59
|
+
id: pol-who
|
|
60
|
+
identifiers: {name: paramira-chat-who}
|
|
61
|
+
attrs:
|
|
62
|
+
expression: |
|
|
63
|
+
roles = ("community", "contributor", "editor", "customer", "admin")
|
|
64
|
+
return any(ak_is_group_member(request.user, name="paramira-web-" + r) for r in roles)
|
|
65
|
+
- model: authentik_policies.policybinding
|
|
66
|
+
identifiers: {target: !KeyOf app, order: 0}
|
|
67
|
+
attrs: {policy: !KeyOf pol-who}
|
|
68
|
+
- model: authentik_policies.policybinding
|
|
69
|
+
identifiers: {target: !KeyOf app, order: 1}
|
|
70
|
+
attrs:
|
|
71
|
+
policy: !Find [authentik_policies_expression.expressionpolicy, [name, paramira-suspended]]
|
|
72
|
+
negate: true
|
|
73
|
+
# The group bindings this replaced (each would have let its group in alone).
|
|
74
|
+
- model: authentik_policies.policybinding
|
|
75
|
+
state: absent
|
|
76
|
+
identifiers: {target: !KeyOf app, order: 5}
|
|
77
|
+
- model: authentik_policies.policybinding
|
|
78
|
+
state: absent
|
|
79
|
+
identifiers: {target: !KeyOf app, order: 10}
|
|
80
|
+
- model: authentik_policies.policybinding
|
|
81
|
+
state: absent
|
|
82
|
+
identifiers: {target: !KeyOf app, order: 20}
|
|
83
|
+
- model: authentik_policies.policybinding
|
|
84
|
+
state: absent
|
|
85
|
+
identifiers: {target: !KeyOf app, order: 30}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Sign in with an identity wallet: @paramira/wallet-oidc-bridge as an OAuth
|
|
2
|
+
# source. Design 0001, ADR-0006: users are matched by the identifier (the
|
|
3
|
+
# credential's opaque subject), never by email; no enrollment flow, so a wallet
|
|
4
|
+
# nobody linked is refused. The link is made by the onboarding service through
|
|
5
|
+
# the API (a source user connection).
|
|
6
|
+
#
|
|
7
|
+
# Optional: mount it only where the bridge runs. Authentik checks the source's
|
|
8
|
+
# URLs when it is created, so the bridge must answer first.
|
|
9
|
+
# Needs accounts.yaml applied first.
|
|
10
|
+
#
|
|
11
|
+
# Environment (on Authentik's server and worker):
|
|
12
|
+
# PARAMIRA_WALLET_URL the bridge, e.g. https://wallet.paramira.org
|
|
13
|
+
# PARAMIRA_WALLET_CLIENT_ID the bridge's client id for Authentik
|
|
14
|
+
# PARAMIRA_WALLET_CLIENT_SECRET its secret (the bridge's CLIENT_SECRET)
|
|
15
|
+
# PARAMIRA_ONBOARDING_TOKEN the onboarding service's API token (48+ random characters)
|
|
16
|
+
#
|
|
17
|
+
# The onboarding service's role gets its model-level permissions from
|
|
18
|
+
# `authentik-blueprints apply` (blueprints can only grant object-level ones):
|
|
19
|
+
# view the wallet source; view, add and delete source connections. Nothing on
|
|
20
|
+
# users. Guard its token like an admin secret: it can link any account to a
|
|
21
|
+
# wallet.
|
|
22
|
+
version: 1
|
|
23
|
+
metadata:
|
|
24
|
+
name: paramira-wallet
|
|
25
|
+
labels:
|
|
26
|
+
blueprints.goauthentik.io/description: "paramira: sign in with an identity wallet (OAuth source on the bridge)"
|
|
27
|
+
entries:
|
|
28
|
+
- model: authentik_flows.flow
|
|
29
|
+
id: f-source-auth
|
|
30
|
+
identifiers: {slug: paramira-source-authentication}
|
|
31
|
+
attrs:
|
|
32
|
+
name: paramira-source-authentication
|
|
33
|
+
title: Signing you in
|
|
34
|
+
designation: authentication
|
|
35
|
+
authentication: none
|
|
36
|
+
- model: authentik_flows.flowstagebinding
|
|
37
|
+
identifiers: {target: !KeyOf f-source-auth, stage: !Find [authentik_stages_user_login.userloginstage, [name, paramira-login]], order: 10}
|
|
38
|
+
|
|
39
|
+
- model: authentik_sources_oauth.oauthsource
|
|
40
|
+
id: src
|
|
41
|
+
identifiers: {slug: paramira-wallet}
|
|
42
|
+
attrs:
|
|
43
|
+
name: Identity wallet
|
|
44
|
+
provider_type: openidconnect
|
|
45
|
+
consumer_key: !Env [PARAMIRA_WALLET_CLIENT_ID, authentik]
|
|
46
|
+
consumer_secret: !Env PARAMIRA_WALLET_CLIENT_SECRET
|
|
47
|
+
authorization_url: !Format ["%s/auth", !Env PARAMIRA_WALLET_URL]
|
|
48
|
+
access_token_url: !Format ["%s/token", !Env PARAMIRA_WALLET_URL]
|
|
49
|
+
profile_url: !Format ["%s/me", !Env PARAMIRA_WALLET_URL]
|
|
50
|
+
additional_scopes: ""
|
|
51
|
+
pkce: S256
|
|
52
|
+
user_matching_mode: identifier
|
|
53
|
+
authentication_flow: !KeyOf f-source-auth
|
|
54
|
+
enrollment_flow: null
|
|
55
|
+
enabled: true
|
|
56
|
+
promoted: false
|
|
57
|
+
|
|
58
|
+
# "Sign in with a wallet" straight from a site. An identification stage
|
|
59
|
+
# with no user fields and one source sends the browser straight to that
|
|
60
|
+
# source, and as a flow it keeps `next` (the site's authorize request) for
|
|
61
|
+
# when the wallet sign-in comes back. (Authentik's Source stage would do the
|
|
62
|
+
# same, but needs an Enterprise licence.) Open it as
|
|
63
|
+
# /if/flow/paramira-wallet-login/?next=<authorize path and query>
|
|
64
|
+
- model: authentik_stages_identification.identificationstage
|
|
65
|
+
id: s-wallet-identify
|
|
66
|
+
identifiers: {name: paramira-wallet-identify}
|
|
67
|
+
attrs:
|
|
68
|
+
user_fields: []
|
|
69
|
+
sources: [!KeyOf src]
|
|
70
|
+
show_source_labels: true
|
|
71
|
+
pretend_user_exists: true
|
|
72
|
+
- model: authentik_flows.flow
|
|
73
|
+
id: f-wallet-login
|
|
74
|
+
identifiers: {slug: paramira-wallet-login}
|
|
75
|
+
attrs:
|
|
76
|
+
name: paramira-wallet-login
|
|
77
|
+
title: Sign in with your wallet
|
|
78
|
+
designation: authentication
|
|
79
|
+
authentication: none
|
|
80
|
+
- model: authentik_flows.flowstagebinding
|
|
81
|
+
identifiers: {target: !KeyOf f-wallet-login, stage: !KeyOf s-wallet-identify, order: 10}
|
|
82
|
+
|
|
83
|
+
# Offer it on the sign-in page, next to the email field.
|
|
84
|
+
- model: authentik_stages_identification.identificationstage
|
|
85
|
+
identifiers: {name: paramira-login-identify}
|
|
86
|
+
attrs:
|
|
87
|
+
sources: [!KeyOf src]
|
|
88
|
+
|
|
89
|
+
# The onboarding service: links an account to its wallet, nothing else.
|
|
90
|
+
- model: authentik_rbac.role
|
|
91
|
+
id: role
|
|
92
|
+
identifiers: {name: paramira-onboarding}
|
|
93
|
+
- model: authentik_core.user
|
|
94
|
+
id: svc
|
|
95
|
+
identifiers: {username: paramira-onboarding}
|
|
96
|
+
attrs:
|
|
97
|
+
name: paramira onboarding service
|
|
98
|
+
type: service_account
|
|
99
|
+
path: service-accounts/paramira
|
|
100
|
+
is_active: true
|
|
101
|
+
roles: [!KeyOf role]
|
|
102
|
+
- model: authentik_core.token
|
|
103
|
+
identifiers: {identifier: paramira-onboarding}
|
|
104
|
+
attrs:
|
|
105
|
+
intent: api
|
|
106
|
+
user: !KeyOf svc
|
|
107
|
+
key: !Env PARAMIRA_ONBOARDING_TOKEN
|
|
108
|
+
expiring: false
|
|
109
|
+
description: paramira onboarding service (wallet links only)
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paramira/authentik-blueprints",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
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
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./src/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./src/index.js"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"authentik-blueprints": "./bin/authentik-blueprints.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"blueprints",
|
|
16
|
+
"templates",
|
|
17
|
+
"src",
|
|
18
|
+
"bin",
|
|
19
|
+
"setup",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://codeberg.org/phuman/paramira-web.git",
|
|
26
|
+
"directory": "packages/authentik-blueprints"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"authentik",
|
|
30
|
+
"blueprints",
|
|
31
|
+
"passwordless",
|
|
32
|
+
"sso",
|
|
33
|
+
"paramira"
|
|
34
|
+
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=22"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"yaml": "2.8.1",
|
|
43
|
+
"@paramira/authentik-client": "0.2.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"vitest": "4.1.12"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"test": "vitest run"
|
|
50
|
+
}
|
|
6
51
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
id: authentik.blueprints
|
|
2
|
+
description: paramira's Authentik blueprints (email-first accounts, the brand, the site's OIDC client) are applied.
|
|
3
|
+
tier: 1
|
|
4
|
+
platforms: [linux]
|
|
5
|
+
requires: [prereq.node]
|
|
6
|
+
inputs:
|
|
7
|
+
url: { type: string, pattern: "^https://[a-z0-9.-]+(:[0-9]+)?$", description: "Authentik's address, e.g. https://auth.example.org" }
|
|
8
|
+
tokenFile: { type: string, minLength: 1, description: "A file holding an Authentik API token (never the token itself)" }
|
|
9
|
+
outputs: {}
|
|
10
|
+
scripts:
|
|
11
|
+
linux: { check: linux/check.sh, apply: linux/apply.sh, verify: linux/verify.sh }
|
|
12
|
+
timeoutSeconds: 300
|