Models an audit event for authorization check attempts, capturing user, client IP, resource, privilege, role, operation, success, and error details. Reuse for structured security audit logging.
# Source: https://github.com/cyberark/conjur | License: LGPL-3.0 | Modified files must remain under LGPL-3.0
# Modifications to this file must remain under LGPL-3.0.
# Provided via justclaw.it.com; keep this notice with the code.
module Audit
module Event
# NOTE: Breaking this class up further would harm clarity.
# :reek:TooManyInstanceVariables and :reek:TooManyParameters
class Check
def initialize(
user:,
client_ip:,
resource_id:,
privilege:,
role_id:,
operation:,
success:,
error_message: nil
)
@user = user
@client_ip = client_ip
@resource_id = resource_id
@privilege = privilege
@role_id = role_id
@operation = operation
@success = success
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key