You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/core-concepts.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,20 @@ Understanding how Flarelette JWT Kit makes cryptographic and architectural decis
4
4
5
5
## Algorithm Selection
6
6
7
-
The kit supports **HS512** (symmetric) and **EdDSA** (asymmetric) as its two primary signing algorithms, plus **ES512** (ECDSA P-521) for TypeScript explicit-API signing. Verification supports **EdDSA, ECDSA (ES256/ES384/ES512), and RSA** for external OIDC tokens. Mode is detected automatically from your environment.
7
+
The kit supports **HS512** (symmetric) and **EdDSA** (asymmetric) via environment-driven mode detection, plus **ES512** (ECDSA P-521) via explicit API. Verification supports **EdDSA, ECDSA (ES256/ES384/ES512), and RSA** for external OIDC tokens.
8
8
9
-
**Signing:** HS512 for symmetric trust, EdDSA for asymmetric trust. ES512 available via TypeScript explicit API.
9
+
**Signing:** HS512 for simple symmetric trust, EdDSA for asymmetric trust, ES512 for explicit internal mesh profiles.
10
10
11
-
**Verification:** HS512 and EdDSA for internal tokens; ECDSA and RSA for external OIDC providers.
11
+
**Verification:** Internal tokens can use HS512, EdDSA, or ES512; external OIDC providers may use EdDSA, ECDSA, or RSA.
12
+
13
+
## Configuration Sources
14
+
15
+
Algorithm selection comes from one of two configuration sources:
16
+
17
+
-**Environment variables** for auto-detected HS512/EdDSA flows (`envMode`).
18
+
-**Explicit config objects** for deterministic algorithm selection across supported algorithms (including ES512 internal mesh profiles and external OIDC verification profiles).
19
+
20
+
In practice: your deployment chooses the source (env or config object), and that source determines which algorithm is used.
12
21
13
22
### HS512 (Symmetric)
14
23
@@ -25,7 +34,7 @@ The kit supports **HS512** (symmetric) and **EdDSA** (asymmetric) as its two pri
25
34
-~256-bit security with 64-byte keys
26
35
- Symmetric: same secret signs and verifies
27
36
- Fast signing and verification
28
-
-No key rotation complexity
37
+
-Secret rotation requires coordinated rollout across producers and consumers
The kit automatically detects which algorithm to use based on environment variables. No manual configuration needed.
129
+
The kit automatically detects which algorithm to use based on environment variables for HS512/EdDSA flows.
121
130
122
131
**Detection logic:**
123
132
@@ -133,6 +142,8 @@ Consumer (verification):
133
142
134
143
**Note:** Asymmetric mode supports EdDSA (Ed25519), ECDSA (ES256/ES384/ES512), and RSA (RS256/384/512) verification. The actual algorithm is auto-detected from the JWK structure or token header.
135
144
145
+
**Important:** ES512 signing is explicit-API driven, not env auto-detected.
0 commit comments