rodauth-tools 0.3.1 → 0.4.1

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rodauth-tools (0.3.1)
4
+ rodauth-tools (0.4.1)
5
5
  dry-inflector (~> 1.1)
6
6
  rodauth (~> 2.41)
7
7
  sequel (~> 5.0)
@@ -9,31 +9,31 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- action_text-trix (2.1.15)
12
+ action_text-trix (2.1.19)
13
13
  railties
14
- actioncable (8.1.1)
15
- actionpack (= 8.1.1)
16
- activesupport (= 8.1.1)
14
+ actioncable (8.1.3.1)
15
+ actionpack (= 8.1.3.1)
16
+ activesupport (= 8.1.3.1)
17
17
  nio4r (~> 2.0)
18
18
  websocket-driver (>= 0.6.1)
19
19
  zeitwerk (~> 2.6)
20
- actionmailbox (8.1.1)
21
- actionpack (= 8.1.1)
22
- activejob (= 8.1.1)
23
- activerecord (= 8.1.1)
24
- activestorage (= 8.1.1)
25
- activesupport (= 8.1.1)
20
+ actionmailbox (8.1.3.1)
21
+ actionpack (= 8.1.3.1)
22
+ activejob (= 8.1.3.1)
23
+ activerecord (= 8.1.3.1)
24
+ activestorage (= 8.1.3.1)
25
+ activesupport (= 8.1.3.1)
26
26
  mail (>= 2.8.0)
27
- actionmailer (8.1.1)
28
- actionpack (= 8.1.1)
29
- actionview (= 8.1.1)
30
- activejob (= 8.1.1)
31
- activesupport (= 8.1.1)
27
+ actionmailer (8.1.3.1)
28
+ actionpack (= 8.1.3.1)
29
+ actionview (= 8.1.3.1)
30
+ activejob (= 8.1.3.1)
31
+ activesupport (= 8.1.3.1)
32
32
  mail (>= 2.8.0)
33
33
  rails-dom-testing (~> 2.2)
34
- actionpack (8.1.1)
35
- actionview (= 8.1.1)
36
- activesupport (= 8.1.1)
34
+ actionpack (8.1.3.1)
35
+ actionview (= 8.1.3.1)
36
+ activesupport (= 8.1.3.1)
37
37
  nokogiri (>= 1.8.5)
38
38
  rack (>= 2.2.4)
39
39
  rack-session (>= 1.0.1)
@@ -41,36 +41,36 @@ GEM
41
41
  rails-dom-testing (~> 2.2)
42
42
  rails-html-sanitizer (~> 1.6)
43
43
  useragent (~> 0.16)
44
- actiontext (8.1.1)
44
+ actiontext (8.1.3.1)
45
45
  action_text-trix (~> 2.1.15)
46
- actionpack (= 8.1.1)
47
- activerecord (= 8.1.1)
48
- activestorage (= 8.1.1)
49
- activesupport (= 8.1.1)
46
+ actionpack (= 8.1.3.1)
47
+ activerecord (= 8.1.3.1)
48
+ activestorage (= 8.1.3.1)
49
+ activesupport (= 8.1.3.1)
50
50
  globalid (>= 0.6.0)
51
51
  nokogiri (>= 1.8.5)
52
- actionview (8.1.1)
53
- activesupport (= 8.1.1)
52
+ actionview (8.1.3.1)
53
+ activesupport (= 8.1.3.1)
54
54
  builder (~> 3.1)
55
55
  erubi (~> 1.11)
56
56
  rails-dom-testing (~> 2.2)
57
57
  rails-html-sanitizer (~> 1.6)
58
- activejob (8.1.1)
59
- activesupport (= 8.1.1)
58
+ activejob (8.1.3.1)
59
+ activesupport (= 8.1.3.1)
60
60
  globalid (>= 0.3.6)
61
- activemodel (8.1.1)
62
- activesupport (= 8.1.1)
63
- activerecord (8.1.1)
64
- activemodel (= 8.1.1)
65
- activesupport (= 8.1.1)
61
+ activemodel (8.1.3.1)
62
+ activesupport (= 8.1.3.1)
63
+ activerecord (8.1.3.1)
64
+ activemodel (= 8.1.3.1)
65
+ activesupport (= 8.1.3.1)
66
66
  timeout (>= 0.4.0)
67
- activestorage (8.1.1)
68
- actionpack (= 8.1.1)
69
- activejob (= 8.1.1)
70
- activerecord (= 8.1.1)
71
- activesupport (= 8.1.1)
67
+ activestorage (8.1.3.1)
68
+ actionpack (= 8.1.3.1)
69
+ activejob (= 8.1.3.1)
70
+ activerecord (= 8.1.3.1)
71
+ activesupport (= 8.1.3.1)
72
72
  marcel (~> 1.0)
73
- activesupport (8.1.1)
73
+ activesupport (8.1.3.1)
74
74
  base64
75
75
  bigdecimal
76
76
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -83,17 +83,17 @@ GEM
83
83
  securerandom (>= 0.3)
84
84
  tzinfo (~> 2.0, >= 2.0.5)
85
85
  uri (>= 0.13.1)
86
- addressable (2.8.7)
87
- public_suffix (>= 2.0.2, < 7.0)
86
+ addressable (2.9.0)
87
+ public_suffix (>= 2.0.2, < 8.0)
88
88
  android_key_attestation (0.3.0)
89
89
  ast (2.4.3)
90
90
  base64 (0.3.0)
91
- bcrypt (3.1.20)
92
- bigdecimal (3.3.1)
91
+ bcrypt (3.1.22)
92
+ bigdecimal (4.1.2)
93
93
  bindata (2.5.1)
94
94
  builder (3.3.0)
95
- bundler-audit (0.9.2)
96
- bundler (>= 1.2.0, < 3)
95
+ bundler-audit (0.9.3)
96
+ bundler (>= 1.2.0)
97
97
  thor (~> 1.0)
98
98
  capybara (3.40.0)
99
99
  addressable
@@ -106,47 +106,48 @@ GEM
106
106
  xpath (~> 3.2)
107
107
  cbor (0.5.10.1)
108
108
  chunky_png (1.4.0)
109
- concurrent-ruby (1.3.5)
110
- connection_pool (2.5.4)
109
+ concurrent-ruby (1.3.8)
110
+ connection_pool (3.0.2)
111
111
  cose (1.3.1)
112
112
  cbor (~> 0.5.9)
113
113
  openssl-signature_algorithm (~> 1.0)
114
- crass (1.0.6)
115
- date (3.5.0)
114
+ crass (1.0.7)
115
+ date (3.5.1)
116
116
  diff-lcs (1.6.2)
117
117
  drb (2.2.3)
118
- dry-inflector (1.2.0)
119
- erb (5.1.3)
118
+ dry-inflector (1.3.1)
119
+ erb (6.0.6)
120
120
  erubi (1.13.1)
121
- globalid (1.3.0)
121
+ globalid (1.4.0)
122
122
  activesupport (>= 6.1)
123
- i18n (1.14.7)
123
+ i18n (1.15.2)
124
124
  concurrent-ruby (~> 1.0)
125
- io-console (0.8.1)
126
- irb (1.15.3)
125
+ io-console (0.8.2)
126
+ irb (1.18.0)
127
127
  pp (>= 0.6.0)
128
+ prism (>= 1.3.0)
128
129
  rdoc (>= 4.0.0)
129
130
  reline (>= 0.4.2)
130
- json (2.16.0)
131
- jwt (3.1.2)
131
+ json (2.21.2)
132
+ jwt (3.2.0)
132
133
  base64
133
- language_server-protocol (3.17.0.5)
134
+ language_server-protocol (3.17.0.6)
134
135
  lint_roller (1.1.0)
135
136
  logger (1.7.0)
136
- loofah (2.24.1)
137
+ loofah (2.25.2)
137
138
  crass (~> 1.0.2)
138
139
  nokogiri (>= 1.12.0)
139
- mail (2.9.0)
140
+ mail (2.9.1)
140
141
  logger
141
142
  mini_mime (>= 0.1.1)
142
143
  net-imap
143
144
  net-pop
144
145
  net-smtp
145
- marcel (1.1.0)
146
+ marcel (1.2.1)
146
147
  matrix (0.4.3)
147
148
  mini_mime (1.1.5)
148
- minitest (5.26.0)
149
- net-imap (0.5.12)
149
+ minitest (5.27.0)
150
+ net-imap (0.6.6)
150
151
  date
151
152
  net-protocol
152
153
  net-pop (0.1.2)
@@ -156,60 +157,57 @@ GEM
156
157
  net-smtp (0.5.1)
157
158
  net-protocol
158
159
  nio4r (2.7.5)
159
- nokogiri (1.18.10-arm64-darwin)
160
+ nokogiri (1.19.4-arm64-darwin)
160
161
  racc (~> 1.4)
161
- nokogiri (1.18.10-x86_64-linux-gnu)
162
+ nokogiri (1.19.4-x86_64-linux-gnu)
162
163
  racc (~> 1.4)
163
164
  openssl (3.3.1)
164
165
  openssl-signature_algorithm (1.3.0)
165
166
  openssl (> 2.0)
166
- parallel (1.27.0)
167
- parser (3.3.10.0)
167
+ parallel (1.28.0)
168
+ parser (3.3.11.1)
168
169
  ast (~> 2.4.1)
169
170
  racc
170
171
  pastel (0.8.0)
171
172
  tty-color (~> 0.5)
172
- pp (0.6.3)
173
+ pp (0.6.4)
173
174
  prettyprint
174
175
  prettyprint (0.2.0)
175
- prism (1.6.0)
176
- psych (5.2.6)
177
- date
178
- stringio
179
- public_suffix (6.0.2)
176
+ prism (1.9.0)
177
+ public_suffix (7.0.5)
180
178
  racc (1.8.1)
181
- rack (3.2.4)
182
- rack-session (2.1.1)
179
+ rack (3.2.6)
180
+ rack-session (2.1.2)
183
181
  base64 (>= 0.1.0)
184
182
  rack (>= 3.0.0)
185
183
  rack-test (2.2.0)
186
184
  rack (>= 1.3)
187
- rackup (2.2.1)
185
+ rackup (2.3.1)
188
186
  rack (>= 3)
189
- rails (8.1.1)
190
- actioncable (= 8.1.1)
191
- actionmailbox (= 8.1.1)
192
- actionmailer (= 8.1.1)
193
- actionpack (= 8.1.1)
194
- actiontext (= 8.1.1)
195
- actionview (= 8.1.1)
196
- activejob (= 8.1.1)
197
- activemodel (= 8.1.1)
198
- activerecord (= 8.1.1)
199
- activestorage (= 8.1.1)
200
- activesupport (= 8.1.1)
187
+ rails (8.1.3.1)
188
+ actioncable (= 8.1.3.1)
189
+ actionmailbox (= 8.1.3.1)
190
+ actionmailer (= 8.1.3.1)
191
+ actionpack (= 8.1.3.1)
192
+ actiontext (= 8.1.3.1)
193
+ actionview (= 8.1.3.1)
194
+ activejob (= 8.1.3.1)
195
+ activemodel (= 8.1.3.1)
196
+ activerecord (= 8.1.3.1)
197
+ activestorage (= 8.1.3.1)
198
+ activesupport (= 8.1.3.1)
201
199
  bundler (>= 1.15.0)
202
- railties (= 8.1.1)
200
+ railties (= 8.1.3.1)
203
201
  rails-dom-testing (2.3.0)
204
202
  activesupport (>= 5.0.0)
205
203
  minitest
206
204
  nokogiri (>= 1.6)
207
- rails-html-sanitizer (1.6.2)
208
- loofah (~> 2.21)
205
+ rails-html-sanitizer (1.7.1)
206
+ loofah (~> 2.25, >= 2.25.2)
209
207
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
210
- railties (8.1.1)
211
- actionpack (= 8.1.1)
212
- activesupport (= 8.1.1)
208
+ railties (8.1.3.1)
209
+ actionpack (= 8.1.3.1)
210
+ activesupport (= 8.1.3.1)
213
211
  irb (~> 1.13)
214
212
  rackup (>= 1.0.0)
215
213
  rake (>= 12.2)
@@ -217,24 +215,29 @@ GEM
217
215
  tsort (>= 0.2)
218
216
  zeitwerk (~> 2.6)
219
217
  rainbow (3.1.1)
220
- rake (13.3.1)
221
- rdoc (6.15.1)
218
+ rake (13.4.2)
219
+ rbs (4.1.2)
220
+ logger
221
+ prism (>= 1.6.0)
222
+ tsort
223
+ rdoc (8.0.0)
222
224
  erb
223
- psych (>= 4.0.0)
225
+ prism (>= 1.6.0)
226
+ rbs (>= 4.0.0)
224
227
  tsort
225
- regexp_parser (2.11.3)
226
- reline (0.6.2)
228
+ regexp_parser (2.12.0)
229
+ reline (0.6.3)
227
230
  io-console (~> 0.5)
228
- roda (3.98.0)
231
+ roda (3.106.0)
229
232
  rack
230
- rodauth (2.41.0)
233
+ rodauth (2.45.0)
231
234
  roda (>= 2.6.0)
232
235
  sequel (>= 4)
233
236
  rotp (6.3.0)
234
- rqrcode (3.1.0)
237
+ rqrcode (3.2.0)
235
238
  chunky_png (~> 1.0)
236
239
  rqrcode_core (~> 2.0)
237
- rqrcode_core (2.0.0)
240
+ rqrcode_core (2.1.0)
238
241
  rspec (3.13.2)
239
242
  rspec-core (~> 3.13.0)
240
243
  rspec-expectations (~> 3.13.0)
@@ -248,41 +251,41 @@ GEM
248
251
  diff-lcs (>= 1.2.0, < 2.0)
249
252
  rspec-support (~> 3.13.0)
250
253
  rspec-support (3.13.6)
251
- rubocop (1.81.7)
254
+ rubocop (1.88.2)
252
255
  json (~> 2.3)
253
256
  language_server-protocol (~> 3.17.0.2)
254
257
  lint_roller (~> 1.1.0)
255
- parallel (~> 1.10)
258
+ parallel (>= 1.10)
256
259
  parser (>= 3.3.0.2)
257
260
  rainbow (>= 2.2.2, < 4.0)
258
261
  regexp_parser (>= 2.9.3, < 3.0)
259
- rubocop-ast (>= 1.47.1, < 2.0)
262
+ rubocop-ast (>= 1.49.0, < 2.0)
260
263
  ruby-progressbar (~> 1.7)
261
264
  unicode-display_width (>= 2.4.0, < 4.0)
262
- rubocop-ast (1.48.0)
265
+ rubocop-ast (1.50.0)
263
266
  parser (>= 3.3.7.2)
264
- prism (~> 1.4)
267
+ prism (~> 1.7)
265
268
  rubocop-rake (0.7.1)
266
269
  lint_roller (~> 1.1)
267
270
  rubocop (>= 1.72.1)
268
- rubocop-rspec (3.8.0)
271
+ rubocop-rspec (3.10.2)
269
272
  lint_roller (~> 1.1)
270
- rubocop (~> 1.81)
273
+ regexp_parser (>= 2.0)
274
+ rubocop (~> 1.86, >= 1.86.2)
271
275
  ruby-progressbar (1.13.0)
272
276
  safety_net_attestation (0.5.0)
273
277
  jwt (>= 2.0, < 4.0)
274
278
  securerandom (0.4.1)
275
- sequel (5.98.0)
279
+ sequel (5.106.0)
276
280
  bigdecimal
277
281
  sequel-activerecord_connection (2.0.1)
278
282
  activerecord (>= 5.1)
279
283
  sequel (~> 5.38)
280
- sqlite3 (2.8.0-arm64-darwin)
281
- sqlite3 (2.8.0-x86_64-linux-gnu)
282
- stringio (3.1.7)
283
- thor (1.4.0)
284
- tilt (2.6.1)
285
- timeout (0.4.4)
284
+ sqlite3 (2.9.5-arm64-darwin)
285
+ sqlite3 (2.9.5-x86_64-linux-gnu)
286
+ thor (1.5.0)
287
+ tilt (2.8.0)
288
+ timeout (0.6.1)
286
289
  tpm-key_attestation (0.14.1)
287
290
  bindata (~> 2.4)
288
291
  openssl (> 2.0)
@@ -304,10 +307,10 @@ GEM
304
307
  concurrent-ruby (~> 1.0)
305
308
  unicode-display_width (3.2.0)
306
309
  unicode-emoji (~> 4.1)
307
- unicode-emoji (4.1.0)
308
- uri (1.1.0)
310
+ unicode-emoji (4.2.0)
311
+ uri (1.1.1)
309
312
  useragent (0.16.11)
310
- warning (1.5.0)
313
+ warning (1.6.0)
311
314
  webauthn (3.4.3)
312
315
  android_key_attestation (~> 0.3.0)
313
316
  bindata (~> 2.4)
@@ -316,13 +319,13 @@ GEM
316
319
  openssl (>= 2.2)
317
320
  safety_net_attestation (~> 0.5.0)
318
321
  tpm-key_attestation (~> 0.14.0)
319
- websocket-driver (0.8.0)
322
+ websocket-driver (0.8.2)
320
323
  base64
321
324
  websocket-extensions (>= 0.1.0)
322
325
  websocket-extensions (0.1.5)
323
326
  xpath (3.2.0)
324
327
  nokogiri (~> 1.8)
325
- zeitwerk (2.7.3)
328
+ zeitwerk (2.8.3)
326
329
 
327
330
  PLATFORMS
328
331
  arm64-darwin-25
@@ -334,20 +337,20 @@ DEPENDENCIES
334
337
  capybara
335
338
  dry-inflector
336
339
  irb
337
- jwt (~> 3.1)
340
+ jwt (~> 3.2)
338
341
  rack-test (~> 2.1)
339
342
  rails (>= 6.0)
340
- rake (~> 13.3)
343
+ rake (~> 13.4)
341
344
  rodauth-tools!
342
345
  rotp
343
346
  rqrcode
344
347
  rspec (~> 3.0)
345
- rubocop (~> 1.81)
348
+ rubocop (~> 1.88)
346
349
  rubocop-rake
347
350
  rubocop-rspec
348
351
  sequel-activerecord_connection (~> 2.0)
349
- sqlite3 (~> 2.8)
350
- tilt (~> 2.4)
352
+ sqlite3 (~> 2.9)
353
+ tilt (~> 2.8)
351
354
  tryouts (~> 3.0)
352
355
  warning
353
356
  webauthn
data/README.md CHANGED
@@ -192,7 +192,38 @@ end
192
192
 
193
193
  **Documentation:** [docs/features/jwt-secret-guard.md](docs/features/jwt-secret-guard.md)
194
194
 
195
- ### 5. Sequel Migration Generator
195
+ ### 5. Account ID Obfuscation Feature
196
+
197
+ Obfuscate the numeric `account_id` that leaks into email-verification links and the
198
+ remember-me cookie, with no database schema change.
199
+
200
+ ```ruby
201
+ class RodauthApp < Roda
202
+ plugin :rodauth do
203
+ enable :login, :verify_account, :remember
204
+ enable :account_id_obfuscation
205
+
206
+ # Production: raises error if ACCOUNT_ID_SECRET (>= 32 bytes) missing
207
+ # Development: uses fallback secret with warning
208
+ end
209
+ end
210
+ ```
211
+
212
+ Links change from `/verify-account?key=2_SspVz...` to `/verify-account?key=AE946V4SD7Z7RV_SspVz...`.
213
+
214
+ **Key Features:**
215
+
216
+ - Keyed, reversible obfuscation (4-round Feistel format-preserving encryption)
217
+ - Covers all email-link features + the remember cookie via two scoped overrides
218
+ - Leaves `split_token`/`convert_token_id` untouched, so `jwt_refresh` is unaffected
219
+ - Backward compatible: in-flight numeric links and legacy cookies keep working
220
+ - Version-tagged tokens enable config-driven secret rotation
221
+ - Dedicated `ACCOUNT_ID_SECRET` (>= 32 bytes), independent of HMAC/JWT secrets
222
+ - Standalone `Rodauth::Tools::AccountIdCipher` primitive (stdlib `openssl` only)
223
+
224
+ **Documentation:** [docs/features/account-id-obfuscation.md](docs/features/account-id-obfuscation.md)
225
+
226
+ ### 6. Sequel Migration Generator
196
227
 
197
228
  Generate database migrations for Rodauth features.
198
229
 
@@ -306,6 +337,7 @@ Rodauth Features are modules that mix into `Rodauth::Auth` instances at runtime.
306
337
  - **[External Identity Feature](docs/features/external-identity.md)** - Track external service identifiers
307
338
  - **[HMAC Secret Guard Feature](docs/features/hmac-secret-guard.md)** - Validate HMAC secrets at startup
308
339
  - **[JWT Secret Guard Feature](docs/features/jwt-secret-guard.md)** - Validate JWT secrets at startup
340
+ - **[Account ID Obfuscation Feature](docs/features/account-id-obfuscation.md)** - Hide numeric account ids in email links and cookies
309
341
  - **[Sequel Migrations](docs/sequel-migrations.md)** - Integrating table_guard with Sequel migrations
310
342
  - **[Rodauth Feature API](docs/rodauth-features-api.md)** - Complete DSL reference for feature development
311
343
  - **[Rodauth Integration](docs/rodauth-integration.md)** - Framework integration patterns