lib/ah/lograge/audit_logger.rb
#
# Save audit logs for multiple resources
#
# @param [Array[Resource]] resources - array of accessed resource by user
# @param [Symbol] action - type of operation performed on sensitive resource (GET/DELETE/UPDATE/CREATE)
# @param [String] requester - unique user ID - e.g. OAUTHID (if action is triggered by external application,
#                              user ID must be passed (client application must also add
#                              "user" field in the request) so it can be logged in
#                              destination application - situation when user name is lost
#                              and only external_application_name is logged is unacceptable)
#
# @param [String] app - source of the request - if it is external request (from external application)
#                       name of that application must be placed / when request is local "self" must be placed
#
Save audit logs for multiple resources
Save audit logs for multiple resources
def log_resources_action(resources:, action:, requester:, customer_uid:, app: DEFAULT_APP)
          resources.each do |resource|
            log_resource_action(
              resource: resource,
              action: action,
              requester: requester,
              customer_uid: customer_uid,
              app: DEFAULT_APP
            )
          end
        end
def log_resources_action ( resources : , action : , requester : , customer_uid : , app : DEFAULT_APP ) resources . each do | resource | log_resource_action ( resource : resource , action : action , requester : requester , customer_uid : customer_uid , app : DEFAULT_APP ) end end
Save audit logs for multiple resources
Save audit logs for multiple resources
resources
action
requester
customer_uid
app
]
array of accessed resource by user
array of accessed resource by user
source of the request - if it is external request (from external application) name of that application must be placed / when request is local "self" must be placed
source of the request - if it is external request ( from external application ) name of that application must be placed / when request is local " self " must be placed