where_is_waldo 0.1.5 → 0.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9caee3a6cb5747d9ce5ab460315fdaca5a9f05f7521dbe07f36a6d9fe5de48d9
4
- data.tar.gz: f7e293f87b04039c7a2dbc21e6a80ef574a773438800588a9f87255b9336497a
3
+ metadata.gz: 33656f9699b2331d830131c39118af0a671b32f3f7f173faec64bde7a522b27b
4
+ data.tar.gz: 374c04bea26515d249cf4720694699e73ae43f5e9b63601a11d871f16eabe01c
5
5
  SHA512:
6
- metadata.gz: 95e63474cdbfff6c224b4bc4882bba3fb96cb157bf73a7769a1755f8b6326cba60e19aee6b06fc8fb58fc483496a68f8aa3e6bd03513a1782802ca123f8b9cb7
7
- data.tar.gz: 9abb3e965ddf1a13722e5700c2c3c8927c9b6b43593801e592670ec4ab09483ce2a3cf2da6a764dfbfb204e238a0107cbd9628067c5e06b0d7920a24412a0726
6
+ metadata.gz: d16fdffe075e626fef57fceb95c20b39833c67db2c799ad9099d3873093054152bf68d989958ae432b2ae613b6cb7805a4ebf49a5838ef18b26e6256508a8ac4
7
+ data.tar.gz: 46024ca78a424b725eace01ad965006691e1c4081ee77ab14c22b6aed26356d11542cd8188abbdc35e588adbc7a7ed04d156bc378e6e7e8d42f8659027a72b21
data/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  Notable changes to where_is_waldo. Format loosely follows
4
4
  [Keep a Changelog](https://keepachangelog.com/).
5
5
 
6
+ ## 0.1.6
7
+
8
+ ### Security
9
+
10
+ - **The built-in connection no longer authenticates from client-supplied
11
+ `subject_id` in production.** `WhereIsWaldo::ApplicationCable::Connection`
12
+ previously fell back to `request.params[:subject_id]` whenever no
13
+ `authenticate_proc` was configured — so a client could connect with
14
+ `?subject_id=<anyone>` and be authenticated as that subject (cross-account
15
+ impersonation). The params path is now permitted **only in local dev/test**;
16
+ production **fails closed** (rejects the connection) unless `authenticate_proc`
17
+ (or a self-identified connection such as `JwtConnection`) establishes the
18
+ subject. Apps that mount the built-in connection in production without an
19
+ `authenticate_proc` will now be rejected — configure one.
20
+
21
+ ### Tests
22
+
23
+ - Added a two-account roster isolation spec (a viewer streams only their own
24
+ org's stream, sees only their own members, and receives none of another
25
+ account's deltas) and a connection spec proving the params-fallback path
26
+ fails closed in production.
27
+
6
28
  ## 0.1.5
7
29
 
8
30
  ### Security / correctness
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -29,9 +29,16 @@ module WhereIsWaldo
29
29
  reject_unauthorized_connection
30
30
  end
31
31
  else
32
- # Default: try to get subject_id from params
33
- self.waldo_subject_id = request.params[:subject_id]
34
- self.waldo_session_id = request.params[:session_id] || generate_session_id
32
+ # No authenticate_proc configured. The only remaining identity source
33
+ # is client-controlled params, which must NEVER authenticate a real
34
+ # connection (a client could pass ?subject_id=<anyone> and impersonate
35
+ # them). Permit it ONLY in local dev/test as a convenience; fail closed
36
+ # everywhere else. Production apps must configure `authenticate_proc`
37
+ # (or identify the connection themselves, e.g. via JwtConnection).
38
+ if Rails.env.local?
39
+ self.waldo_subject_id = request.params[:subject_id]
40
+ self.waldo_session_id = request.params[:session_id] || generate_session_id
41
+ end
35
42
 
36
43
  reject_unauthorized_connection unless waldo_subject_id
37
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where_is_waldo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Gibson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-24 00:00:00.000000000 Z
11
+ date: 2026-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails