Class: TCellAgent::SensorEvents::DlpEvent
Constant Summary
collapse
- FOUND_IN_BODY =
'body'.freeze
- FOUND_IN_LOG =
'log'.freeze
- FOUND_IN_CONSOLE =
'console'.freeze
- FRAMEWORK_VARIABLE_SESSION_ID =
'session_id'.freeze
- REQUEST_CONTEXT_FORM =
'form'.freeze
- REQUEST_CONTEXT_COOKIE =
'cookie'.freeze
'header'.freeze
Instance Attribute Summary
#ensure, #flush, #send
Instance Method Summary
collapse
#bucket_key, #calculate_offset
Constructor Details
#initialize(route_id, raw_uri, found_in, id = nil, hmac_session_id = nil, user_id = nil) ⇒ DlpEvent
Returns a new instance of DlpEvent.
19
20
21
22
23
24
25
26
27
|
# File 'lib/tcell_agent/sensor_events/dlp.rb', line 19
def initialize(route_id, raw_uri, found_in, id = nil, hmac_session_id = nil, user_id = nil)
super('dlp')
self['rid'] = route_id if route_id
self['found_in'] = found_in
self['uri'] = Util.strip_uri_values(raw_uri) if raw_uri
self['sid'] = hmac_session_id if hmac_session_id
self['uid'] = user_id if user_id
self['rule'] = id if id
end
|
Instance Method Details
#for_database(database, schema, table, field) ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'lib/tcell_agent/sensor_events/dlp.rb', line 29
def for_database(database, schema, table, field)
self['type'] = 'db'
self['db'] = database
self['schema'] = schema
self['table'] = table
self['field'] = field
self
end
|
#for_framework(variable) ⇒ Object
38
39
40
41
42
43
|
# File 'lib/tcell_agent/sensor_events/dlp.rb', line 38
def for_framework(variable)
self['type'] = 'fw'
self['context'] = 'framework'
self['variable'] = variable
self
end
|
#for_request(variable_context, variable) ⇒ Object
45
46
47
48
49
50
|
# File 'lib/tcell_agent/sensor_events/dlp.rb', line 45
def for_request(variable_context, variable)
self['type'] = 'req'
self['context'] = variable_context
self['variable'] = variable
self
end
|