[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [ldapext] [Fwd: New Version Notification for draft-pluta-ldap-srv-side-current-time-match-00]




Hi Daniel,

Daniel Pluta wrote:
Hi Steven,


Steven Legg wrote:

Hi Daniel,
>>> Daniel Pluta wrote:

If there is no positive feedback regarding any demand for our add-on ideas we would like to focus on the current time matching from now on.

That would be best, unless someone else wades into this discussion expressing support for the add-ons.


I'm currently preparing version 01 of our draft which is focusing on the
two extensible matching rules and their related assertion syntaxes (aka
now / nowOffset).

The current time (aka now) is represented by the NULL syntax based on
its GSER. Another result of our discussion concerns the "chronological
offset" to the current time (aka nowOffset) for which you have suggested
to use the well known DURATION syntax.

However, I could not find a document that specifies the GSER for
DURATION. As you've mentioned that you already have implemented this
kind of syntax I would like to ask whether you also have (possibly just
prepared?) a formal specification for the DURATION's GSER?

I haven't gotten around to documenting the GSER encoding for any of ASN.1's
new time types. However, the GSER encoding that my implementation is currently
producing is the same as the tstring lexical item defined in the ASN.1
time types amendment. Note that a tstring begins and ends with double quotes.


Currently I've used the generalized Time syntax specification as the
basis and I'm struggling with the correct ABNF. Our prepared version 01
of the draft states:


----8<----
   A value of the DURATION type is encoded according the <DurationValue>
   rule.

   DurationValue = [ MINUS ] designator century year month day hour
                   [ minute [ second ] ]
                   [ fraction ]

   MINUS         = %x2D  ; minus sign ("-")
   designator    = %x50  ; "P"
   century       = 2(%x30-39) ; "00" to "99"
   year          = 2(%x30-39) ; "00" to "99"
   month         =   ( %x30 %x31-39 ) ; "01" (January) to "09"
                   / ( %x31 %x30-32 ) ; "10" to "12"
   day           =   ( %x30 %x31-39 )    ; "01" to "09"
                   / ( %x31-32 %x30-39 ) ; "10" to "29"
                   / ( %x33 %x30-31 )    ; "30" to "31"
   hour          = ( %x30-31 %x30-39 ) / ( %x32 %x30-33 ) ; "00" to "23"
   minute        = %x30-35 %x30-39                        ; "00" to "59"

   second        = ( %x30-35 %x30-39 ) ; "00" to "59"
   fraction      = ( DOT / COMMA ) 1*(%x30-39)
----8<----

The value notation for the DURATION type is quite different.
The details can be found in clause 34 bis.3.6.1 of
http://www.itu.int/rec/T-REC-X.680-200606-S!Amd3/en .
I've had a go at expressing the rules in ABNF and come up with this:

    DurationValue  = DQUOTE designations DQUOTE
    designations   =   P week-fraction
                     / P year-fraction
                     / P [ year ] month-fraction
                     / P [ year ] [ month ] day-fraction
                     / P [ year ] [ month ] [ day ] hours-mins-sec

    P              = %x50 ; "P"

    hours-mins-sec =   T hours-fraction
                     / T [ hours ] mins-fraction
                     / T [ hours ] [ mins ] sec-fraction

    T              = %x54 ; "T"

    week-fraction  = number [ fraction ] %x57 ; "W"
    year-fraction  = number [ fraction ] %x59 ; "Y"
    year           = number %x59 ; "Y"
    month-fraction = number [ fraction ] %x4D ; "M"
    month          = number %x4D ; "M"
    day-fraction   = number [ fraction ] %x4D ; "D"
    day            = number %x44 ; "D"
    hours-fraction = number [ fraction ] %x48 ; "H"
    hours          = number %x48 ; "H"
    mins-fraction  = number [ fraction ] %x4D ; "M"
    mins           = number %x4D ; "M"
    sec-fraction   = number [ fraction ] %x53 ; "S"


    number         = %x30 / ( %x31-39 *( %x30-39 ) )
    fraction       = ( DOT / COMMA ) 1*( %x30-39 )

I think it's complete and accurate, but I still need to double check.



I would appreciate any feedback especially regarding the need to
represent a negative nowOffset value (please see the MINUS in the above
rule).

I had forgotten that the DURATION type doesn't allow a leading minus.
I see two ways to address this.

(1) Have DurationValue associated with the ASN.1 DURATION type (no minus) and
split the nowOffset rule into a nowBefore rule and a nowAfter rule, where
the nowBefore rule subtracts the (positive) DurationValue in the assertion
value from the current time. This would be my preference.

(2) Define the underlying ASN.1 type of the assertion syntax as being simply
UTF8String with the contents constrained by the ABNF (including the optional
leading minus, maybe dropping the DQUOTEs). In principle you could make the
ABNF anything you want, but there would still be value in having everything
following the optional minus being the same as the format of <designations>
(to exploit common code).

Regards,
Steven


Many thanks for your support!

Best regards,
Daniel

_______________________________________________
Ldapext mailing list
Ldapext@ietf.org
https://www.ietf.org/mailman/listinfo/ldapext