0

I am probably missing something simple in LDAP filter syntax here, I am trying to query the database created by the accesslog overlay in OpenLDAP by the reqStart attribute. I can filter on equality, but am failing to filter on a range or partial value. The goal being to find all accesslog entries after a certain date/time.

With a value of reqStart: 20180213144256.000008Z, the filter (reqStart=20180213144256.000008Z) works but the following do not:

  • (reqStart>=20180213000000)
  • (reqStart=20180213*)

1 Answer 1

0

I asked too soon; I found my answer by going back to the man pages (man slapo-accesslog) and re-reading.
reqStart uses the generalizedTime syntax which after a quick skimming on ldapwiki.com shows that I needed to append the timezone in order to compare with >=. These are filters that do work:

  • (reqStart>=20180213000000Z)
  • (reqStart>=20180213000000-0600)

The minimum requirements for this syntax is century year month day hour timezone, so the following is the minimum that would work:

  • (reqStart>=2018021300Z)

Or for the -06:00 offset for my timezone:

  • (reqStart>=2018021300-0600)

More details on the syntax at the link posted above.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.