Skip to content

Commit

Permalink
RSA SecurID timestamps (#616)
Browse files Browse the repository at this point in the history
* Fix time/date parsing in RSA SecurID
* Nit: Should fix all references to this source as `SecurID` (with no "e")
  • Loading branch information
mbonsack authored and GitHub committed Aug 7, 2020
1 parent ab4c01f commit 2e90af6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ log {
#parse the date
date-parser-nofilter(format(
'%Y-%m-%d %H:%M:%S,%f')
template("${.rsa.time} ${.rsa.ms}")
template("${LEGACY_MSGHDR} ${.rsa.time},${.rsa.ms}")
);
};
if {
Expand Down
15 changes: 7 additions & 8 deletions tests/test_dell_rsa_secureid.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def test_dell_rsa_secureid_admin(

dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
rsatime = dt.strftime("%H:%M:%S,%f")
rsatime = dt.strftime("%H:%M:%S,%f")[:-3]

# Tune time functions
epoch = epoch[:-7]
epoch = epoch[:-3]

mt = env.from_string(event + "\n")
message = mt.render(mark="<166>", bsd=bsd, host=host, date=date, rsatime=rsatime)
Expand Down Expand Up @@ -65,10 +65,10 @@ def test_dell_rsa_secureid_system(

dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
rsatime = dt.strftime("%H:%M:%S,%f")
rsatime = dt.strftime("%H:%M:%S,%f")[:-3]

# Tune time functions
epoch = epoch[:-7]
epoch = epoch[:-3]

mt = env.from_string(event + "\n")
message = mt.render(mark="<166>", bsd=bsd, host=host, date=date, rsatime=rsatime)
Expand Down Expand Up @@ -99,10 +99,10 @@ def test_dell_rsa_secureid_runtime(

dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
rsatime = dt.strftime("%H:%M:%S,%f")
rsatime = dt.strftime("%H:%M:%S,%f")[:-3]

# Tune time functions
epoch = epoch[:-7]
epoch = epoch[:-3]

mt = env.from_string(event + "\n")
message = mt.render(mark="<166>", bsd=bsd, host=host, date=date, rsatime=rsatime)
Expand Down Expand Up @@ -147,13 +147,12 @@ def test_dell_rsa_secureid_trace(
]
dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
rsatime = dt.strftime("%H:%M:%S,%f")

# Tune time functions
epoch = epoch[:-7]
for event in events:
mt = env.from_string(event + "\n")
message = mt.render(mark="<166>", bsd=bsd, host=host, date=date, rsatime=rsatime)
message = mt.render(mark="<166>", bsd=bsd, host=host, date=date)
sendsingle(message, setup_sc4s[0], setup_sc4s[1][514])

st = env.from_string(
Expand Down

0 comments on commit 2e90af6

Please sign in to comment.