- Notifications
You must be signed in to change notification settings - Fork913
Commitde41bd6
authored
feat: add support for workspace app audit (#16801)
This change adds support for workspace app auditing.To avoid audit log spam, we introduce the concept of app audit sessions.An audit session is unique per workspace app, user, ip, user agent andhttp status code. The sessions are stored in a separate table from auditlogs to allow use-case specific optimizations. Sessions are ephemeraland the table does not function as a log.The logic for auditing is placed in the DBTokenProvider for workspaceapps so that wsproxies are included.This is the final change affecting the API fo#15139.Updates#151391 parent3ae55bb commitde41bd6
File tree
25 files changed
+1042
-159
lines changed- coderd
- audit
- database
- dbauthz
- dbmem
- dbmetrics
- dbmock
- migrations
- testdata/fixtures
- queries
- tracing
- workspaceapps
- scripts/dbgen
- testutil
25 files changed
+1042
-159
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
282 | 282 |
| |
283 | 283 |
| |
284 | 284 |
| |
285 |
| - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
286 | 290 |
| |
287 | 291 |
| |
288 |
| - | |
| 292 | + | |
289 | 293 |
| |
290 | 294 |
| |
291 | 295 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
96 |
| - | |
| 96 | + | |
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
| 74 | + | |
74 | 75 |
| |
75 | 76 |
| |
76 | 77 |
| |
| |||
422 | 423 |
| |
423 | 424 |
| |
424 | 425 |
| |
425 |
| - | |
| 426 | + | |
426 | 427 |
| |
427 | 428 |
| |
428 | 429 |
| |
| |||
453 | 454 |
| |
454 | 455 |
| |
455 | 456 |
| |
456 |
| - | |
| 457 | + | |
457 | 458 |
| |
458 | 459 |
| |
459 | 460 |
| |
| |||
479 | 480 |
| |
480 | 481 |
| |
481 | 482 |
| |
482 |
| - | |
| 483 | + | |
483 | 484 |
| |
484 | 485 |
| |
485 | 486 |
| |
| |||
566 | 567 |
| |
567 | 568 |
| |
568 | 569 |
| |
569 |
| - | |
| 570 | + | |
570 | 571 |
| |
571 | 572 |
| |
572 | 573 |
| |
|
Lines changed: 16 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
229 | 233 |
| |
230 | 234 |
| |
231 | 235 |
| |
| |||
534 | 538 |
| |
535 | 539 |
| |
536 | 540 |
| |
537 |
| - | |
538 |
| - | |
539 |
| - | |
540 |
| - | |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 |
| - | |
547 | 541 |
| |
548 | 542 |
| |
549 | 543 |
| |
| |||
561 | 555 |
| |
562 | 556 |
| |
563 | 557 |
| |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
564 | 570 |
| |
565 | 571 |
| |
566 | 572 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4615 | 4615 |
| |
4616 | 4616 |
| |
4617 | 4617 |
| |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
4618 | 4625 |
| |
4619 | 4626 |
| |
4620 | 4627 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4065 | 4065 |
| |
4066 | 4066 |
| |
4067 | 4067 |
| |
| 4068 | + | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
| 4073 | + | |
| 4074 | + | |
| 4075 | + | |
| 4076 | + | |
| 4077 | + | |
| 4078 | + | |
| 4079 | + | |
| 4080 | + | |
4068 | 4081 |
| |
4069 | 4082 |
| |
4070 | 4083 |
| |
|
Lines changed: 59 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
| 95 | + | |
95 | 96 |
| |
96 | 97 |
| |
97 | 98 |
| |
| |||
237 | 238 |
| |
238 | 239 |
| |
239 | 240 |
| |
| 241 | + | |
240 | 242 |
| |
241 | 243 |
| |
242 | 244 |
| |
| |||
12281 | 12283 |
| |
12282 | 12284 |
| |
12283 | 12285 |
| |
| 12286 | + | |
| 12287 | + | |
| 12288 | + | |
| 12289 | + | |
| 12290 | + | |
| 12291 | + | |
| 12292 | + | |
| 12293 | + | |
| 12294 | + | |
| 12295 | + | |
| 12296 | + | |
| 12297 | + | |
| 12298 | + | |
| 12299 | + | |
| 12300 | + | |
| 12301 | + | |
| 12302 | + | |
| 12303 | + | |
| 12304 | + | |
| 12305 | + | |
| 12306 | + | |
| 12307 | + | |
| 12308 | + | |
| 12309 | + | |
| 12310 | + | |
| 12311 | + | |
| 12312 | + | |
| 12313 | + | |
| 12314 | + | |
| 12315 | + | |
| 12316 | + | |
| 12317 | + | |
| 12318 | + | |
| 12319 | + | |
| 12320 | + | |
| 12321 | + | |
| 12322 | + | |
| 12323 | + | |
| 12324 | + | |
| 12325 | + | |
| 12326 | + | |
| 12327 | + | |
| 12328 | + | |
| 12329 | + | |
| 12330 | + | |
| 12331 | + | |
| 12332 | + | |
| 12333 | + | |
| 12334 | + | |
| 12335 | + | |
| 12336 | + | |
| 12337 | + | |
| 12338 | + | |
| 12339 | + | |
| 12340 | + | |
| 12341 | + | |
| 12342 | + | |
12284 | 12343 |
| |
12285 | 12344 |
| |
12286 | 12345 |
| |
|
Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + |
0 commit comments
Comments
(0)