command_tower 0.10.0 → 0.11.0
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 +4 -4
- data/README.md +7 -3
- data/app/auth/command_tower/auth/auth_context.rb +10 -4
- data/app/controllers/command_tower/admin/application_controller.rb +27 -0
- data/app/controllers/command_tower/admin/audit/events_controller.rb +61 -0
- data/app/controllers/command_tower/admin/messaging/announcements_controller.rb +1 -8
- data/app/controllers/command_tower/admin/users/identities_controller.rb +77 -0
- data/app/controllers/command_tower/admin/users/impersonation_sessions_controller.rb +33 -0
- data/app/controllers/command_tower/admin/users/roles_controller.rb +40 -0
- data/app/controllers/command_tower/admin/users_controller.rb +46 -0
- data/app/controllers/command_tower/admin/workspace_controller.rb +15 -0
- data/app/controllers/command_tower/application_controller.rb +17 -1
- data/app/controllers/command_tower/auth/impersonation_session_controller.rb +27 -0
- data/app/controllers/command_tower/auth/logout_controller.rb +3 -1
- data/app/controllers/command_tower/auth/principal_capabilities_controller.rb +19 -0
- data/app/controllers/command_tower/me/audit_events_controller.rb +59 -0
- data/app/controllers/concerns/command_tower/api/application_response_renderer.rb +5 -0
- data/app/controllers/concerns/command_tower/auth/authentication_boundary.rb +3 -2
- data/app/controllers/concerns/command_tower/execution/http_boundary.rb +65 -0
- data/app/deserializers/command_tower/deserializers/admin/scope_parameter.rb +49 -0
- data/app/deserializers/command_tower/deserializers/admin/users.rb +218 -0
- data/app/deserializers/command_tower/deserializers/audit/events.rb +224 -0
- data/app/deserializers/command_tower/deserializers/clients/types.rb +27 -0
- data/app/errors/command_tower/errors/auth/admin_unavailable_during_impersonation_error.rb +17 -0
- data/app/errors/command_tower/errors/auth/default_membership_assignment_error.rb +17 -0
- data/app/errors/command_tower/errors/auth/impersonation_session_expired_error.rb +17 -0
- data/app/errors/command_tower/errors/auth/impersonation_session_missing_error.rb +21 -0
- data/app/errors/command_tower/errors/auth/nested_impersonation_error.rb +17 -0
- data/app/errors/command_tower/errors/auth/self_impersonation_error.rb +21 -0
- data/app/errors/command_tower/errors/continuation_exhausted_error.rb +25 -0
- data/app/jobs/command_tower/application_job.rb +7 -0
- data/app/jobs/command_tower/execution/job_boundary.rb +19 -0
- data/app/mailers/command_tower/application_mailer.rb +11 -1
- data/app/mailers/command_tower/messaging/channel_mailer.rb +1 -2
- data/app/models/command_tower/audit/event.rb +36 -0
- data/app/models/command_tower/impersonation/session.rb +51 -0
- data/app/serializers/command_tower/serializers/admin/users.rb +69 -0
- data/app/serializers/command_tower/serializers/admin/workspace/manifest_serializer.rb +58 -0
- data/app/serializers/command_tower/serializers/audit/events/filter_options_serializer.rb +44 -0
- data/app/serializers/command_tower/serializers/audit/events.rb +42 -0
- data/app/serializers/command_tower/serializers/auth/principal_capabilities_serializer.rb +15 -0
- data/app/serializers/command_tower/serializers/auth/session_response_serializer.rb +26 -2
- data/app/serializers/command_tower/serializers/impersonation/session_serializer.rb +19 -0
- data/app/services/command_tower/README.md +4 -10
- data/app/services/command_tower/authorize/validate.rb +7 -4
- data/app/services/command_tower/jwt/authenticate_user.rb +8 -2
- data/app/services/command_tower/jwt/authentication_outcome.rb +5 -4
- data/app/services/command_tower/jwt/login_create.rb +7 -4
- data/app/services/command_tower/messaging/accept/operation_logger.rb +3 -3
- data/app/services/command_tower/messaging/contract/observability/correlation.rb +3 -1
- data/app/services/command_tower/messaging/contract/observability/operation_logger.rb +3 -3
- data/app/services/command_tower/messaging/contract/observability/publisher.rb +44 -0
- data/app/services/command_tower/messaging/execution/operation_logger.rb +1 -1
- data/app/services/command_tower/messaging/handoff/operation_logger.rb +1 -1
- data/app/services/command_tower/messaging/inbox/operation_logger.rb +1 -1
- data/app/services/command_tower/messaging/planner/operation_logger.rb +1 -1
- data/app/services/command_tower/messaging/recipient_readiness/evaluate.rb +1 -1
- data/app/services/command_tower/service_base.rb +30 -43
- data/app/services/command_tower/service_logging.rb +2 -36
- data/app/services/command_tower/services/account/clear_phone.rb +8 -0
- data/app/services/command_tower/services/account/phone_verification/verify.rb +1 -0
- data/app/services/command_tower/services/account/update_phone.rb +9 -1
- data/app/services/command_tower/services/admin/users.rb +377 -0
- data/app/services/command_tower/services/admin/workspace/manifest.rb +49 -0
- data/app/services/command_tower/services/application_service.rb +37 -0
- data/app/services/command_tower/services/audit/events/filter_options.rb +75 -0
- data/app/services/command_tower/services/audit/events.rb +199 -0
- data/app/services/command_tower/services/auth/assign_default_membership_role.rb +44 -0
- data/app/services/command_tower/services/auth/authenticate_session.rb +33 -6
- data/app/services/command_tower/services/auth/email_verification/verify.rb +2 -0
- data/app/services/command_tower/services/auth/password_reset/reset.rb +13 -3
- data/app/services/command_tower/services/auth/plain_text/login.rb +9 -1
- data/app/services/command_tower/services/auth/principal_capabilities/project.rb +48 -0
- data/app/services/command_tower/services/impersonation/create.rb +29 -0
- data/app/services/command_tower/services/impersonation/end.rb +28 -0
- data/app/services/command_tower/services/impersonation/record_activity.rb +30 -0
- data/app/services/command_tower/services/impersonation/terminate_open_sessions.rb +51 -0
- data/app/services/command_tower/services/me/change_password.rb +12 -0
- data/app/shared_sequences/command_tower/shared_sequences/admin/users/resolve_scoped_user.rb +42 -0
- data/app/workflows/command_tower/transactional.rb +65 -0
- data/app/workflows/command_tower/workflows/admin/messaging/create_announcement_workflow.rb +11 -0
- data/app/workflows/command_tower/workflows/admin/scope_resolution.rb +17 -0
- data/app/workflows/command_tower/workflows/admin/users/error_mapping.rb +26 -0
- data/app/workflows/command_tower/workflows/admin/users/identity_mutation.rb +30 -0
- data/app/workflows/command_tower/workflows/admin/users/list_assignable_roles_workflow.rb +30 -0
- data/app/workflows/command_tower/workflows/admin/users/list_workflow.rb +54 -0
- data/app/workflows/command_tower/workflows/admin/users/set_email_validated_workflow.rb +45 -0
- data/app/workflows/command_tower/workflows/admin/users/show_workflow.rb +49 -0
- data/app/workflows/command_tower/workflows/admin/users/update_email_workflow.rb +45 -0
- data/app/workflows/command_tower/workflows/admin/users/update_name_workflow.rb +49 -0
- data/app/workflows/command_tower/workflows/admin/users/update_roles_workflow.rb +61 -0
- data/app/workflows/command_tower/workflows/admin/users/update_username_workflow.rb +45 -0
- data/app/workflows/command_tower/workflows/admin/workspace/manifest_workflow.rb +25 -0
- data/app/workflows/command_tower/workflows/application_workflow.rb +163 -24
- data/app/workflows/command_tower/workflows/audit/error_mapping.rb +24 -0
- data/app/workflows/command_tower/workflows/audit/events/filter_options_for_admin_workflow.rb +34 -0
- data/app/workflows/command_tower/workflows/audit/events/filter_options_for_user_workflow.rb +34 -0
- data/app/workflows/command_tower/workflows/audit/events/list_for_admin_workflow.rb +74 -0
- data/app/workflows/command_tower/workflows/audit/events/list_for_user_workflow.rb +45 -0
- data/app/workflows/command_tower/workflows/audit/events/show_for_admin_workflow.rb +54 -0
- data/app/workflows/command_tower/workflows/audit/events/show_for_user_workflow.rb +42 -0
- data/app/workflows/command_tower/workflows/auth/authenticate_request_workflow.rb +3 -2
- data/app/workflows/command_tower/workflows/auth/authentication_response_effects.rb +5 -1
- data/app/workflows/command_tower/workflows/auth/logout_workflow.rb +41 -1
- data/app/workflows/command_tower/workflows/auth/plain_text/login_workflow.rb +2 -0
- data/app/workflows/command_tower/workflows/auth/principal_capabilities/show_workflow.rb +27 -0
- data/app/workflows/command_tower/workflows/auth/register_workflow.rb +56 -24
- data/app/workflows/command_tower/workflows/auth/session/show_workflow.rb +15 -1
- data/app/workflows/command_tower/workflows/auth/session_error_status.rb +1 -0
- data/app/workflows/command_tower/workflows/impersonation/error_mapping.rb +27 -0
- data/app/workflows/command_tower/workflows/impersonation/start_workflow.rb +97 -0
- data/app/workflows/command_tower/workflows/impersonation/stop_workflow.rb +66 -0
- data/app/workflows/command_tower/workflows/me/update_name_workflow.rb +1 -0
- data/app/workflows/command_tower/workflows/profile/show_workflow.rb +1 -0
- data/app/workflows/command_tower/workflows/workflow_result.rb +31 -7
- data/config/routes.rb +20 -0
- data/db/migrate/20260816000001_create_command_tower_audit_events.rb +45 -0
- data/db/migrate/20260817000001_add_scope_columns_to_command_tower_audit_events.rb +34 -0
- data/db/migrate/20260817000003_create_command_tower_impersonation_sessions.rb +26 -0
- data/docs/admin_workspace.md +158 -0
- data/docs/api_reference.md +175 -14
- data/docs/architecture.md +5 -0
- data/docs/audit.md +195 -0
- data/docs/authentication.md +14 -0
- data/docs/authentication_authorization_guide.md +15 -11
- data/docs/authorization.md +25 -4
- data/docs/controllers.md +7 -1
- data/docs/eventing.md +179 -0
- data/docs/extending.md +32 -1
- data/docs/host_integration_guide.md +103 -12
- data/docs/initializing.md +2 -2
- data/docs/messaging_integration_guide.md +1 -1
- data/docs/models.md +4 -0
- data/docs/pagination.md +2 -2
- data/docs/principal_capabilities.md +89 -0
- data/docs/upgrades/0.10.0.md +2 -2
- data/docs/upgrades/0.11.0.md +92 -0
- data/docs/upgrades/README.md +1 -0
- data/lib/command_tower/admin_scope/apply_audit_scoping.rb +45 -0
- data/lib/command_tower/admin_scope/apply_users_narrowing.rb +21 -0
- data/lib/command_tower/admin_scope/manifest_projection.rb +102 -0
- data/lib/command_tower/admin_scope/resolve.rb +31 -0
- data/lib/command_tower/admin_scope/scope_context.rb +7 -0
- data/lib/command_tower/admin_scope/scope_option.rb +7 -0
- data/lib/command_tower/admin_scope.rb +20 -0
- data/lib/command_tower/admin_workspace.rb +16 -0
- data/lib/command_tower/audit/attribution.rb +90 -0
- data/lib/command_tower/audit/emit.rb +113 -0
- data/lib/command_tower/audit/masking.rb +41 -0
- data/lib/command_tower/audit/payload.rb +128 -0
- data/lib/command_tower/audit/persistence/subscriber.rb +85 -0
- data/lib/command_tower/audit.rb +27 -0
- data/lib/command_tower/authorization/assignable_roles.rb +36 -0
- data/lib/command_tower/authorization/default.yml +99 -5
- data/lib/command_tower/authorization/effective_entity_grants.rb +55 -0
- data/lib/command_tower/authorization/entity.rb +15 -5
- data/lib/command_tower/authorization/role.rb +5 -4
- data/lib/command_tower/authorization.rb +71 -10
- data/lib/command_tower/configuration/admin_scope/config.rb +104 -0
- data/lib/command_tower/configuration/admin_scope/tool_registration.rb +28 -0
- data/lib/command_tower/configuration/authorization/config.rb +6 -0
- data/lib/command_tower/configuration/config.rb +20 -0
- data/lib/command_tower/configuration/impersonation/config.rb +38 -0
- data/lib/command_tower/configuration/registry/admin_workspace/config.rb +199 -0
- data/lib/command_tower/configuration/registry/admin_workspace/tool_definition.rb +150 -0
- data/lib/command_tower/configuration/registry/audit/config.rb +403 -0
- data/lib/command_tower/configuration/registry/audit/event_definition.rb +155 -0
- data/lib/command_tower/configuration/registry/config.rb +34 -0
- data/lib/command_tower/configuration/registry/principal_capabilities/capability_definition.rb +43 -0
- data/lib/command_tower/configuration/registry/principal_capabilities/config.rb +136 -0
- data/lib/command_tower/current.rb +12 -0
- data/lib/command_tower/engine.rb +19 -4
- data/lib/command_tower/events.rb +184 -0
- data/lib/command_tower/execution.rb +111 -0
- data/lib/command_tower/impersonation/activity_declaration.rb +23 -0
- data/lib/command_tower/impersonation/apply_overlay.rb +88 -0
- data/lib/command_tower/impersonation/clear_overlay_for_audit.rb +23 -0
- data/lib/command_tower/impersonation/establish_identity.rb +44 -0
- data/lib/command_tower/install/baseline.rb +3 -0
- data/lib/command_tower/logging/lifecycle_declaration.rb +27 -0
- data/lib/command_tower/logging/projection.rb +67 -0
- data/lib/command_tower/logging/subscriber.rb +103 -0
- data/lib/command_tower/principal_capabilities.rb +15 -0
- data/lib/command_tower/version.rb +1 -1
- data/lib/command_tower.rb +12 -0
- data/spec/factories/impersonation_session.rb +17 -0
- data/spec/factories/user.rb +16 -0
- metadata +112 -2
- data/app/services/command_tower/messaging/contract/observability/structured_logger.rb +0 -56
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: command_tower
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- matt-taylor
|
|
@@ -184,22 +184,32 @@ files:
|
|
|
184
184
|
- app/auth/command_tower/auth/auth_context.rb
|
|
185
185
|
- app/auth/command_tower/auth/password_recovery_session_context.rb
|
|
186
186
|
- app/auth/command_tower/auth/signup_session_context.rb
|
|
187
|
+
- app/controllers/command_tower/admin/application_controller.rb
|
|
188
|
+
- app/controllers/command_tower/admin/audit/events_controller.rb
|
|
187
189
|
- app/controllers/command_tower/admin/messaging/announcements_controller.rb
|
|
190
|
+
- app/controllers/command_tower/admin/users/identities_controller.rb
|
|
191
|
+
- app/controllers/command_tower/admin/users/impersonation_sessions_controller.rb
|
|
192
|
+
- app/controllers/command_tower/admin/users/roles_controller.rb
|
|
193
|
+
- app/controllers/command_tower/admin/users_controller.rb
|
|
194
|
+
- app/controllers/command_tower/admin/workspace_controller.rb
|
|
188
195
|
- app/controllers/command_tower/application_controller.rb
|
|
189
196
|
- app/controllers/command_tower/auth/email/availability_controller.rb
|
|
190
197
|
- app/controllers/command_tower/auth/email_verification/send_controller.rb
|
|
191
198
|
- app/controllers/command_tower/auth/email_verification/verify_controller.rb
|
|
192
199
|
- app/controllers/command_tower/auth/identity_policy_controller.rb
|
|
200
|
+
- app/controllers/command_tower/auth/impersonation_session_controller.rb
|
|
193
201
|
- app/controllers/command_tower/auth/logout_controller.rb
|
|
194
202
|
- app/controllers/command_tower/auth/password_recovery_session/create_controller.rb
|
|
195
203
|
- app/controllers/command_tower/auth/password_reset/reset_controller.rb
|
|
196
204
|
- app/controllers/command_tower/auth/password_reset/send_controller.rb
|
|
197
205
|
- app/controllers/command_tower/auth/password_reset/validate_controller.rb
|
|
198
206
|
- app/controllers/command_tower/auth/plain_text/login_controller.rb
|
|
207
|
+
- app/controllers/command_tower/auth/principal_capabilities_controller.rb
|
|
199
208
|
- app/controllers/command_tower/auth/register_controller.rb
|
|
200
209
|
- app/controllers/command_tower/auth/session_controller.rb
|
|
201
210
|
- app/controllers/command_tower/auth/signup_session/create_controller.rb
|
|
202
211
|
- app/controllers/command_tower/auth/username/availability_controller.rb
|
|
212
|
+
- app/controllers/command_tower/me/audit_events_controller.rb
|
|
203
213
|
- app/controllers/command_tower/me/inbox_controller.rb
|
|
204
214
|
- app/controllers/command_tower/me/name_controller.rb
|
|
205
215
|
- app/controllers/command_tower/me/password_controller.rb
|
|
@@ -218,8 +228,12 @@ files:
|
|
|
218
228
|
- app/controllers/concerns/command_tower/auth/invalid_credentials_deserializer_renderer.rb
|
|
219
229
|
- app/controllers/concerns/command_tower/auth/password_recovery_session_boundary.rb
|
|
220
230
|
- app/controllers/concerns/command_tower/auth/signup_session_boundary.rb
|
|
231
|
+
- app/controllers/concerns/command_tower/execution/http_boundary.rb
|
|
221
232
|
- app/deserializers/command_tower/deserializers/admin/messaging/create_announcement_deserializer.rb
|
|
233
|
+
- app/deserializers/command_tower/deserializers/admin/scope_parameter.rb
|
|
234
|
+
- app/deserializers/command_tower/deserializers/admin/users.rb
|
|
222
235
|
- app/deserializers/command_tower/deserializers/application_deserializer.rb
|
|
236
|
+
- app/deserializers/command_tower/deserializers/audit/events.rb
|
|
223
237
|
- app/deserializers/command_tower/deserializers/auth/email_availability_deserializer.rb
|
|
224
238
|
- app/deserializers/command_tower/deserializers/auth/email_verification/verify_deserializer.rb
|
|
225
239
|
- app/deserializers/command_tower/deserializers/auth/password_reset/reset_deserializer.rb
|
|
@@ -257,11 +271,16 @@ files:
|
|
|
257
271
|
- app/errors/command_tower/errors/account/pushover_verification_failed_error.rb
|
|
258
272
|
- app/errors/command_tower/errors/account/sms_capability_unavailable_error.rb
|
|
259
273
|
- app/errors/command_tower/errors/application_error.rb
|
|
274
|
+
- app/errors/command_tower/errors/auth/admin_unavailable_during_impersonation_error.rb
|
|
260
275
|
- app/errors/command_tower/errors/auth/csrf_mismatch_error.rb
|
|
261
276
|
- app/errors/command_tower/errors/auth/csrf_missing_error.rb
|
|
277
|
+
- app/errors/command_tower/errors/auth/default_membership_assignment_error.rb
|
|
262
278
|
- app/errors/command_tower/errors/auth/email_already_registered_error.rb
|
|
263
279
|
- app/errors/command_tower/errors/auth/email_verification_required_error.rb
|
|
280
|
+
- app/errors/command_tower/errors/auth/impersonation_session_expired_error.rb
|
|
281
|
+
- app/errors/command_tower/errors/auth/impersonation_session_missing_error.rb
|
|
264
282
|
- app/errors/command_tower/errors/auth/invalid_credentials_error.rb
|
|
283
|
+
- app/errors/command_tower/errors/auth/nested_impersonation_error.rb
|
|
265
284
|
- app/errors/command_tower/errors/auth/password_recovery_ip_rate_limit_error.rb
|
|
266
285
|
- app/errors/command_tower/errors/auth/password_recovery_session_expired_error.rb
|
|
267
286
|
- app/errors/command_tower/errors/auth/password_recovery_session_invalid_error.rb
|
|
@@ -269,6 +288,7 @@ files:
|
|
|
269
288
|
- app/errors/command_tower/errors/auth/password_recovery_session_rate_limit_error.rb
|
|
270
289
|
- app/errors/command_tower/errors/auth/password_reset_invalid_token_error.rb
|
|
271
290
|
- app/errors/command_tower/errors/auth/password_reset_unavailable_error.rb
|
|
291
|
+
- app/errors/command_tower/errors/auth/self_impersonation_error.rb
|
|
272
292
|
- app/errors/command_tower/errors/auth/signup_ip_rate_limit_error.rb
|
|
273
293
|
- app/errors/command_tower/errors/auth/signup_session_expired_error.rb
|
|
274
294
|
- app/errors/command_tower/errors/auth/signup_session_invalid_error.rb
|
|
@@ -276,6 +296,7 @@ files:
|
|
|
276
296
|
- app/errors/command_tower/errors/auth/signup_session_rate_limit_error.rb
|
|
277
297
|
- app/errors/command_tower/errors/auth/verification_code_invalid_error.rb
|
|
278
298
|
- app/errors/command_tower/errors/auth/verification_send_failed_error.rb
|
|
299
|
+
- app/errors/command_tower/errors/continuation_exhausted_error.rb
|
|
279
300
|
- app/errors/command_tower/errors/forbidden_error.rb
|
|
280
301
|
- app/errors/command_tower/errors/internal_error.rb
|
|
281
302
|
- app/errors/command_tower/errors/messaging/accept_rejected_error.rb
|
|
@@ -286,6 +307,7 @@ files:
|
|
|
286
307
|
- app/errors/command_tower/errors/validation_error.rb
|
|
287
308
|
- app/helpers/command_tower/application_helper.rb
|
|
288
309
|
- app/jobs/command_tower/application_job.rb
|
|
310
|
+
- app/jobs/command_tower/execution/job_boundary.rb
|
|
289
311
|
- app/jobs/command_tower/messaging/channel_delivery_execution_job.rb
|
|
290
312
|
- app/jobs/command_tower/messaging/communications/produce_recipient_job.rb
|
|
291
313
|
- app/jobs/command_tower/messaging/execution_recovery_job.rb
|
|
@@ -296,6 +318,8 @@ files:
|
|
|
296
318
|
- app/mailers/command_tower/messaging/channel_mailer.rb
|
|
297
319
|
- app/mailers/command_tower/password_reset_mailer.rb
|
|
298
320
|
- app/models/command_tower/application_record.rb
|
|
321
|
+
- app/models/command_tower/audit/event.rb
|
|
322
|
+
- app/models/command_tower/impersonation/session.rb
|
|
299
323
|
- app/models/command_tower/messaging/channel_delivery.rb
|
|
300
324
|
- app/models/command_tower/messaging/communication.rb
|
|
301
325
|
- app/models/command_tower/messaging/delivery_attempt.rb
|
|
@@ -307,9 +331,13 @@ files:
|
|
|
307
331
|
- app/models/user.rb
|
|
308
332
|
- app/models/user_secret.rb
|
|
309
333
|
- app/serializers/command_tower/serializers/admin/messaging/announcement_response_serializer.rb
|
|
334
|
+
- app/serializers/command_tower/serializers/admin/users.rb
|
|
335
|
+
- app/serializers/command_tower/serializers/admin/workspace/manifest_serializer.rb
|
|
310
336
|
- app/serializers/command_tower/serializers/application/envelope_serializer.rb
|
|
311
337
|
- app/serializers/command_tower/serializers/application/error_entry_serializer.rb
|
|
312
338
|
- app/serializers/command_tower/serializers/application_serializer.rb
|
|
339
|
+
- app/serializers/command_tower/serializers/audit/events.rb
|
|
340
|
+
- app/serializers/command_tower/serializers/audit/events/filter_options_serializer.rb
|
|
313
341
|
- app/serializers/command_tower/serializers/auth/email_availability_serializer.rb
|
|
314
342
|
- app/serializers/command_tower/serializers/auth/email_verification/message_response_serializer.rb
|
|
315
343
|
- app/serializers/command_tower/serializers/auth/identity_policy_serializer.rb
|
|
@@ -318,11 +346,13 @@ files:
|
|
|
318
346
|
- app/serializers/command_tower/serializers/auth/password_recovery_session_response_serializer.rb
|
|
319
347
|
- app/serializers/command_tower/serializers/auth/password_reset/message_response_serializer.rb
|
|
320
348
|
- app/serializers/command_tower/serializers/auth/password_reset/validate_response_serializer.rb
|
|
349
|
+
- app/serializers/command_tower/serializers/auth/principal_capabilities_serializer.rb
|
|
321
350
|
- app/serializers/command_tower/serializers/auth/register_response_serializer.rb
|
|
322
351
|
- app/serializers/command_tower/serializers/auth/session_response_serializer.rb
|
|
323
352
|
- app/serializers/command_tower/serializers/auth/signup_session_response_serializer.rb
|
|
324
353
|
- app/serializers/command_tower/serializers/auth/user_serializer.rb
|
|
325
354
|
- app/serializers/command_tower/serializers/auth/username_availability_serializer.rb
|
|
355
|
+
- app/serializers/command_tower/serializers/impersonation/session_serializer.rb
|
|
326
356
|
- app/serializers/command_tower/serializers/me/account_serializer.rb
|
|
327
357
|
- app/serializers/command_tower/serializers/me/change_password_response_serializer.rb
|
|
328
358
|
- app/serializers/command_tower/serializers/me/pushover_serializer.rb
|
|
@@ -406,7 +436,7 @@ files:
|
|
|
406
436
|
- app/services/command_tower/messaging/contract/not_found_error.rb
|
|
407
437
|
- app/services/command_tower/messaging/contract/observability/correlation.rb
|
|
408
438
|
- app/services/command_tower/messaging/contract/observability/operation_logger.rb
|
|
409
|
-
- app/services/command_tower/messaging/contract/observability/
|
|
439
|
+
- app/services/command_tower/messaging/contract/observability/publisher.rb
|
|
410
440
|
- app/services/command_tower/messaging/contract/requests/find_communication.rb
|
|
411
441
|
- app/services/command_tower/messaging/contract/results/channel_delivery_result.rb
|
|
412
442
|
- app/services/command_tower/messaging/contract/results/communication_result.rb
|
|
@@ -559,7 +589,12 @@ files:
|
|
|
559
589
|
- app/services/command_tower/services/account/pushover/show.rb
|
|
560
590
|
- app/services/command_tower/services/account/pushover/verify.rb
|
|
561
591
|
- app/services/command_tower/services/account/update_phone.rb
|
|
592
|
+
- app/services/command_tower/services/admin/users.rb
|
|
593
|
+
- app/services/command_tower/services/admin/workspace/manifest.rb
|
|
562
594
|
- app/services/command_tower/services/application_service.rb
|
|
595
|
+
- app/services/command_tower/services/audit/events.rb
|
|
596
|
+
- app/services/command_tower/services/audit/events/filter_options.rb
|
|
597
|
+
- app/services/command_tower/services/auth/assign_default_membership_role.rb
|
|
563
598
|
- app/services/command_tower/services/auth/authenticate_session.rb
|
|
564
599
|
- app/services/command_tower/services/auth/authorize_request.rb
|
|
565
600
|
- app/services/command_tower/services/auth/client_ip_resolver.rb
|
|
@@ -579,6 +614,7 @@ files:
|
|
|
579
614
|
- app/services/command_tower/services/auth/password_reset/token_verification.rb
|
|
580
615
|
- app/services/command_tower/services/auth/password_reset/validate.rb
|
|
581
616
|
- app/services/command_tower/services/auth/plain_text/login.rb
|
|
617
|
+
- app/services/command_tower/services/auth/principal_capabilities/project.rb
|
|
582
618
|
- app/services/command_tower/services/auth/register.rb
|
|
583
619
|
- app/services/command_tower/services/auth/signup_rate_limits/check_availability.rb
|
|
584
620
|
- app/services/command_tower/services/auth/signup_rate_limits/check_register.rb
|
|
@@ -589,6 +625,10 @@ files:
|
|
|
589
625
|
- app/services/command_tower/services/auth/signup_session/encode.rb
|
|
590
626
|
- app/services/command_tower/services/auth/signup_session/validate.rb
|
|
591
627
|
- app/services/command_tower/services/auth/username_availability.rb
|
|
628
|
+
- app/services/command_tower/services/impersonation/create.rb
|
|
629
|
+
- app/services/command_tower/services/impersonation/end.rb
|
|
630
|
+
- app/services/command_tower/services/impersonation/record_activity.rb
|
|
631
|
+
- app/services/command_tower/services/impersonation/terminate_open_sessions.rb
|
|
592
632
|
- app/services/command_tower/services/me/capabilities.rb
|
|
593
633
|
- app/services/command_tower/services/me/change_password.rb
|
|
594
634
|
- app/services/command_tower/services/me/pushover_product_gate.rb
|
|
@@ -605,6 +645,7 @@ files:
|
|
|
605
645
|
- app/services/command_tower/services/service_result.rb
|
|
606
646
|
- app/services/command_tower/user_attributes/mutate.rb
|
|
607
647
|
- app/services/command_tower/username/available.rb
|
|
648
|
+
- app/shared_sequences/command_tower/shared_sequences/admin/users/resolve_scoped_user.rb
|
|
608
649
|
- app/views/command_tower/email_verification_mailer/verify_email.html.erb
|
|
609
650
|
- app/views/command_tower/messaging/rendering/email.html.erb
|
|
610
651
|
- app/views/command_tower/messaging/rendering/email.text.erb
|
|
@@ -613,8 +654,28 @@ files:
|
|
|
613
654
|
- app/views/command_tower/password_reset_mailer/reset_password.html.erb
|
|
614
655
|
- app/views/layouts/mailer.html.erb
|
|
615
656
|
- app/views/layouts/mailer.text.erb
|
|
657
|
+
- app/workflows/command_tower/transactional.rb
|
|
616
658
|
- app/workflows/command_tower/workflows/admin/messaging/create_announcement_workflow.rb
|
|
659
|
+
- app/workflows/command_tower/workflows/admin/scope_resolution.rb
|
|
660
|
+
- app/workflows/command_tower/workflows/admin/users/error_mapping.rb
|
|
661
|
+
- app/workflows/command_tower/workflows/admin/users/identity_mutation.rb
|
|
662
|
+
- app/workflows/command_tower/workflows/admin/users/list_assignable_roles_workflow.rb
|
|
663
|
+
- app/workflows/command_tower/workflows/admin/users/list_workflow.rb
|
|
664
|
+
- app/workflows/command_tower/workflows/admin/users/set_email_validated_workflow.rb
|
|
665
|
+
- app/workflows/command_tower/workflows/admin/users/show_workflow.rb
|
|
666
|
+
- app/workflows/command_tower/workflows/admin/users/update_email_workflow.rb
|
|
667
|
+
- app/workflows/command_tower/workflows/admin/users/update_name_workflow.rb
|
|
668
|
+
- app/workflows/command_tower/workflows/admin/users/update_roles_workflow.rb
|
|
669
|
+
- app/workflows/command_tower/workflows/admin/users/update_username_workflow.rb
|
|
670
|
+
- app/workflows/command_tower/workflows/admin/workspace/manifest_workflow.rb
|
|
617
671
|
- app/workflows/command_tower/workflows/application_workflow.rb
|
|
672
|
+
- app/workflows/command_tower/workflows/audit/error_mapping.rb
|
|
673
|
+
- app/workflows/command_tower/workflows/audit/events/filter_options_for_admin_workflow.rb
|
|
674
|
+
- app/workflows/command_tower/workflows/audit/events/filter_options_for_user_workflow.rb
|
|
675
|
+
- app/workflows/command_tower/workflows/audit/events/list_for_admin_workflow.rb
|
|
676
|
+
- app/workflows/command_tower/workflows/audit/events/list_for_user_workflow.rb
|
|
677
|
+
- app/workflows/command_tower/workflows/audit/events/show_for_admin_workflow.rb
|
|
678
|
+
- app/workflows/command_tower/workflows/audit/events/show_for_user_workflow.rb
|
|
618
679
|
- app/workflows/command_tower/workflows/auth/authenticate_request_workflow.rb
|
|
619
680
|
- app/workflows/command_tower/workflows/auth/authentication_response_effects.rb
|
|
620
681
|
- app/workflows/command_tower/workflows/auth/authorize_request_workflow.rb
|
|
@@ -630,6 +691,7 @@ files:
|
|
|
630
691
|
- app/workflows/command_tower/workflows/auth/password_reset/send_workflow.rb
|
|
631
692
|
- app/workflows/command_tower/workflows/auth/password_reset/validate_workflow.rb
|
|
632
693
|
- app/workflows/command_tower/workflows/auth/plain_text/login_workflow.rb
|
|
694
|
+
- app/workflows/command_tower/workflows/auth/principal_capabilities/show_workflow.rb
|
|
633
695
|
- app/workflows/command_tower/workflows/auth/register_workflow.rb
|
|
634
696
|
- app/workflows/command_tower/workflows/auth/session/show_workflow.rb
|
|
635
697
|
- app/workflows/command_tower/workflows/auth/session_error_status.rb
|
|
@@ -637,6 +699,9 @@ files:
|
|
|
637
699
|
- app/workflows/command_tower/workflows/auth/signup_session/authenticate_workflow.rb
|
|
638
700
|
- app/workflows/command_tower/workflows/auth/signup_session/create_workflow.rb
|
|
639
701
|
- app/workflows/command_tower/workflows/auth/username_availability_workflow.rb
|
|
702
|
+
- app/workflows/command_tower/workflows/impersonation/error_mapping.rb
|
|
703
|
+
- app/workflows/command_tower/workflows/impersonation/start_workflow.rb
|
|
704
|
+
- app/workflows/command_tower/workflows/impersonation/stop_workflow.rb
|
|
640
705
|
- app/workflows/command_tower/workflows/me/change_password_workflow.rb
|
|
641
706
|
- app/workflows/command_tower/workflows/me/clear_phone_workflow.rb
|
|
642
707
|
- app/workflows/command_tower/workflows/me/error_mapping.rb
|
|
@@ -667,8 +732,13 @@ files:
|
|
|
667
732
|
- db/migrate/20260805000003_create_command_tower_messaging_core.rb
|
|
668
733
|
- db/migrate/20260805000004_create_messaging_notification_preferences.rb
|
|
669
734
|
- db/migrate/20260805000005_create_messaging_endpoints_and_pushover_credentials.rb
|
|
735
|
+
- db/migrate/20260816000001_create_command_tower_audit_events.rb
|
|
736
|
+
- db/migrate/20260817000001_add_scope_columns_to_command_tower_audit_events.rb
|
|
737
|
+
- db/migrate/20260817000003_create_command_tower_impersonation_sessions.rb
|
|
738
|
+
- docs/admin_workspace.md
|
|
670
739
|
- docs/api_reference.md
|
|
671
740
|
- docs/architecture.md
|
|
741
|
+
- docs/audit.md
|
|
672
742
|
- docs/authentication.md
|
|
673
743
|
- docs/authentication_authorization_guide.md
|
|
674
744
|
- docs/authorization.md
|
|
@@ -676,6 +746,7 @@ files:
|
|
|
676
746
|
- docs/controllers.md
|
|
677
747
|
- docs/cookie_authentication_guide.md
|
|
678
748
|
- docs/email_verification_workflow.md
|
|
749
|
+
- docs/eventing.md
|
|
679
750
|
- docs/extending.md
|
|
680
751
|
- docs/host_integration_guide.md
|
|
681
752
|
- docs/initializing.md
|
|
@@ -683,16 +754,36 @@ files:
|
|
|
683
754
|
- docs/models.md
|
|
684
755
|
- docs/pagination.md
|
|
685
756
|
- docs/password_reset_workflow.md
|
|
757
|
+
- docs/principal_capabilities.md
|
|
686
758
|
- docs/sensitive_routes.md
|
|
687
759
|
- docs/testing.md
|
|
688
760
|
- docs/upgrades/0.10.0.md
|
|
761
|
+
- docs/upgrades/0.11.0.md
|
|
689
762
|
- docs/upgrades/README.md
|
|
690
763
|
- lib/command_tower.rb
|
|
764
|
+
- lib/command_tower/admin_scope.rb
|
|
765
|
+
- lib/command_tower/admin_scope/apply_audit_scoping.rb
|
|
766
|
+
- lib/command_tower/admin_scope/apply_users_narrowing.rb
|
|
767
|
+
- lib/command_tower/admin_scope/manifest_projection.rb
|
|
768
|
+
- lib/command_tower/admin_scope/resolve.rb
|
|
769
|
+
- lib/command_tower/admin_scope/scope_context.rb
|
|
770
|
+
- lib/command_tower/admin_scope/scope_option.rb
|
|
771
|
+
- lib/command_tower/admin_workspace.rb
|
|
772
|
+
- lib/command_tower/audit.rb
|
|
773
|
+
- lib/command_tower/audit/attribution.rb
|
|
774
|
+
- lib/command_tower/audit/emit.rb
|
|
775
|
+
- lib/command_tower/audit/masking.rb
|
|
776
|
+
- lib/command_tower/audit/payload.rb
|
|
777
|
+
- lib/command_tower/audit/persistence/subscriber.rb
|
|
691
778
|
- lib/command_tower/authorization.rb
|
|
779
|
+
- lib/command_tower/authorization/assignable_roles.rb
|
|
692
780
|
- lib/command_tower/authorization/default.yml
|
|
781
|
+
- lib/command_tower/authorization/effective_entity_grants.rb
|
|
693
782
|
- lib/command_tower/authorization/entity.rb
|
|
694
783
|
- lib/command_tower/authorization/role.rb
|
|
695
784
|
- lib/command_tower/configuration/admin/config.rb
|
|
785
|
+
- lib/command_tower/configuration/admin_scope/config.rb
|
|
786
|
+
- lib/command_tower/configuration/admin_scope/tool_registration.rb
|
|
696
787
|
- lib/command_tower/configuration/application/config.rb
|
|
697
788
|
- lib/command_tower/configuration/authorization/config.rb
|
|
698
789
|
- lib/command_tower/configuration/base.rb
|
|
@@ -703,6 +794,7 @@ files:
|
|
|
703
794
|
- lib/command_tower/configuration/email/config.rb
|
|
704
795
|
- lib/command_tower/configuration/identity/config.rb
|
|
705
796
|
- lib/command_tower/configuration/identity/phone_verification.rb
|
|
797
|
+
- lib/command_tower/configuration/impersonation/config.rb
|
|
706
798
|
- lib/command_tower/configuration/jwt/config.rb
|
|
707
799
|
- lib/command_tower/configuration/jwt/cookie/config.rb
|
|
708
800
|
- lib/command_tower/configuration/jwt/cookie/csrf/config.rb
|
|
@@ -718,6 +810,13 @@ files:
|
|
|
718
810
|
- lib/command_tower/configuration/pagination/config.rb
|
|
719
811
|
- lib/command_tower/configuration/password_recovery_session/config.rb
|
|
720
812
|
- lib/command_tower/configuration/password_recovery_session/rate_limits.rb
|
|
813
|
+
- lib/command_tower/configuration/registry/admin_workspace/config.rb
|
|
814
|
+
- lib/command_tower/configuration/registry/admin_workspace/tool_definition.rb
|
|
815
|
+
- lib/command_tower/configuration/registry/audit/config.rb
|
|
816
|
+
- lib/command_tower/configuration/registry/audit/event_definition.rb
|
|
817
|
+
- lib/command_tower/configuration/registry/config.rb
|
|
818
|
+
- lib/command_tower/configuration/registry/principal_capabilities/capability_definition.rb
|
|
819
|
+
- lib/command_tower/configuration/registry/principal_capabilities/config.rb
|
|
721
820
|
- lib/command_tower/configuration/signup_session/config.rb
|
|
722
821
|
- lib/command_tower/configuration/signup_session/email_availability.rb
|
|
723
822
|
- lib/command_tower/configuration/signup_session/rate_limits.rb
|
|
@@ -732,11 +831,21 @@ files:
|
|
|
732
831
|
- lib/command_tower/current.rb
|
|
733
832
|
- lib/command_tower/engine.rb
|
|
734
833
|
- lib/command_tower/error.rb
|
|
834
|
+
- lib/command_tower/events.rb
|
|
835
|
+
- lib/command_tower/execution.rb
|
|
836
|
+
- lib/command_tower/impersonation/activity_declaration.rb
|
|
837
|
+
- lib/command_tower/impersonation/apply_overlay.rb
|
|
838
|
+
- lib/command_tower/impersonation/clear_overlay_for_audit.rb
|
|
839
|
+
- lib/command_tower/impersonation/establish_identity.rb
|
|
735
840
|
- lib/command_tower/install/baseline.rb
|
|
736
841
|
- lib/command_tower/install/doctor.rb
|
|
737
842
|
- lib/command_tower/jwt/authorization_helper.rb
|
|
738
843
|
- lib/command_tower/jwt/csrf_helper.rb
|
|
844
|
+
- lib/command_tower/logging/lifecycle_declaration.rb
|
|
845
|
+
- lib/command_tower/logging/projection.rb
|
|
846
|
+
- lib/command_tower/logging/subscriber.rb
|
|
739
847
|
- lib/command_tower/password_recovery/authorization_helper.rb
|
|
848
|
+
- lib/command_tower/principal_capabilities.rb
|
|
740
849
|
- lib/command_tower/redis_connection.rb
|
|
741
850
|
- lib/command_tower/schema.rb
|
|
742
851
|
- lib/command_tower/schema/error/base.rb
|
|
@@ -754,6 +863,7 @@ files:
|
|
|
754
863
|
- lib/tasks/install.rake
|
|
755
864
|
- lib/tasks/users.rake
|
|
756
865
|
- spec/factories/entity.rb
|
|
866
|
+
- spec/factories/impersonation_session.rb
|
|
757
867
|
- spec/factories/messaging.rb
|
|
758
868
|
- spec/factories/role.rb
|
|
759
869
|
- spec/factories/user.rb
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module CommandTower
|
|
4
|
-
module Messaging
|
|
5
|
-
module Contract
|
|
6
|
-
module Observability
|
|
7
|
-
class StructuredLogger
|
|
8
|
-
COMPONENT = "command_tower.messaging"
|
|
9
|
-
FORBIDDEN_KEYS = %w[
|
|
10
|
-
title
|
|
11
|
-
body
|
|
12
|
-
text
|
|
13
|
-
metadata
|
|
14
|
-
email
|
|
15
|
-
password
|
|
16
|
-
token
|
|
17
|
-
].freeze
|
|
18
|
-
|
|
19
|
-
class << self
|
|
20
|
-
def info(payload)
|
|
21
|
-
emit(:info, payload)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def warn(payload)
|
|
25
|
-
emit(:warn, payload)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def error(payload)
|
|
29
|
-
emit(:error, payload)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
private
|
|
33
|
-
|
|
34
|
-
def emit(level, payload)
|
|
35
|
-
envelope = build_envelope(level, payload)
|
|
36
|
-
Rails.logger.public_send(level, envelope.to_json)
|
|
37
|
-
rescue StandardError
|
|
38
|
-
nil
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def build_envelope(level, payload)
|
|
42
|
-
compact = payload.to_h.transform_keys(&:to_s).except(*FORBIDDEN_KEYS)
|
|
43
|
-
compact.reject! { |_key, value| value.nil? }
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
"timestamp" => Time.now.utc.iso8601(3),
|
|
47
|
-
"level" => level.to_s,
|
|
48
|
-
"component" => COMPONENT,
|
|
49
|
-
}.merge(compact)
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|