Commit 5661bde
refactor: Implement multi-tenant browser session isolation (#41)
Refactors browser session management to provide complete multi-tenant
isolation, resolving security risks from shared browser sessions.
## Changes
- **Security Fix**: Each task now gets isolated browser session instead
of shared default
- **Session Management**: Added automatic expiration (10min) and cleanup
(2min intervals)
- **Skills Updated**: All 7 skills now use `GetOrCreateTaskSession()`
for isolation
- **Testing**: Added comprehensive multi-tenant isolation tests
- **Documentation**: Complete security and performance impact
documentation
## Security Benefits
- ✅ Complete tenant isolation (cookies, auth, storage, cache)
- ✅ Prevents session hijacking across tenant boundaries
- ✅ GDPR compliant for multi-tenant deployments
- ✅ Automatic cleanup prevents resource leaks
## Performance Impact
- ~1-2s overhead per task for session creation
- Trade-off: Security vs speed (appropriate for multi-tenant safety)
Fixes #40
Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
---------
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>1 parent 9579694 commit 5661bde
File tree
26 files changed
+525
-139
lines changed- config
- example
- internal/playwright
- mocks
- skills
26 files changed
+525
-139
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 24 | | |
31 | 25 | | |
32 | 26 | | |
| |||
76 | 70 | | |
77 | 71 | | |
78 | 72 | | |
| 73 | + | |
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
| |||
169 | 164 | | |
170 | 165 | | |
171 | 166 | | |
172 | | - | |
| 167 | + | |
173 | 168 | | |
174 | 169 | | |
175 | | - | |
| 170 | + | |
176 | 171 | | |
177 | 172 | | |
178 | 173 | | |
| |||
181 | 176 | | |
182 | 177 | | |
183 | 178 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 179 | | |
191 | 180 | | |
192 | 181 | | |
193 | 182 | | |
194 | 183 | | |
195 | 184 | | |
196 | | - | |
197 | 185 | | |
198 | 186 | | |
199 | 187 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | 188 | | |
221 | 189 | | |
222 | 190 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments