You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But either way, I think it’s reasonable to target something easy to support for clients in Pebble, but not match Boulder exactly so we don’t freeze on too specific a value unless it’s standardized as such
It would be great if Pebble would have more variety in its answers (use nanoseconds, microseconds, milliseconds, use Z, or +00:00 or -00:00 or even other time offsets, maybe even random ones?) to ensure that clients support all kind of timestamp formats that are allowed according to RFC 3339. It's annoying if you adjust your parser to what Pebble sends and then your parser goes belly up with the first timestamp it gets from a real CA.
Nice catch! Thanks. That makes things easier for me, because the tests for my parser were failing on "EDT"/"EST" on some python versions -- though UTC and GMT work.
The code I settled on uses some string manipulation instead of regex; instead of trying different formats, I also just use strings to determine what the strptime likely is. I will likely redo based on your code.
I did open an issue against Pebble (ietf-wg-acme/acme-ari#93). I do think the precision should be dropped.
The rfc5280 states, regarding the notAfter/notBefore validity periods:
I don't think citing RFC 5280 is particularly relevant here, since those timestamps are encoded as strings within certificates themselves. A more relevant comparison would be RFC 8555, which unfortunately appears to have nothing to say about the precision with which the various ACME timestamps (e.g. authz expiry, new-order notBefore/notAfter) should be represented.
I'll file a PR to have Pebble truncate these to hundredths of a second, which python should be able to parse, and which will exercise fractional-second-parsing codepaths, and will be different from what Boulder does, but won't be a useless amount of precision.
Or maybe microseconds, to be a bit less surprising.
Activity
jvanasco commentedon Feb 12, 2025
Cross referencing to letsencrypt/boulder#7779 ; wherein Boulder drops down precision due to .NET limitations.
mcpherrinm commentedon Feb 12, 2025
I don't think I've seen this feedback in IETF, so it would be good to try to get this addressed at spec-level
mcpherrinm commentedon Feb 13, 2025
But either way, I think it’s reasonable to target something easy to support for clients in Pebble, but not match Boulder exactly so we don’t freeze on too specific a value unless it’s standardized as such
jvanasco commentedon Feb 13, 2025
Perhaps pebble could also use different timezones: i.e.
Z,UTC,-00:00are all equivalentfelixfontein commentedon Feb 13, 2025
@jvanasco according to https://www.rfc-editor.org/rfc/rfc3339#section-5.6
Zand-00:00are valid, butUTCis not (seetime-offset).It would be great if Pebble would have more variety in its answers (use nanoseconds, microseconds, milliseconds, use
Z, or+00:00or-00:00or even other time offsets, maybe even random ones?) to ensure that clients support all kind of timestamp formats that are allowed according to RFC 3339. It's annoying if you adjust your parser to what Pebble sends and then your parser goes belly up with the first timestamp it gets from a real CA.BTW, while looking at RFC 3339, it says
time-secfrac = "." 1*DIGIT, which I guess means that you can only have one fractional digit. Which is interesting, since https://www.rfc-editor.org/rfc/rfc3339#section-5.8 shows an example with two fractional digits.(If anyone is interested in code to reduce the precision to something Python accepts: https://github.com/ansible-collections/community.crypto/blob/a42e541326796aae2b5ff02504af925df14546e5/plugins/module_utils/acme/backends.py#L51-L67)
jvanasco commentedon Feb 13, 2025
Nice catch! Thanks. That makes things easier for me, because the tests for my parser were failing on "EDT"/"EST" on some python versions -- though UTC and GMT work.
The code I settled on uses some string manipulation instead of regex; instead of
trying different formats, I also just use strings to determine what the strptime likely is. I will likely redo based on your code.I did open an issue against Pebble (ietf-wg-acme/acme-ari#93). I do think the precision should be dropped.
The rfc5280 states, regarding the notAfter/notBefore validity periods:
https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.5.1
and
Dropping fractional seconds would make the window in-line with the x509 constraints itself.
aarongable commentedon Feb 13, 2025
I don't think citing RFC 5280 is particularly relevant here, since those timestamps are encoded as strings within certificates themselves. A more relevant comparison would be RFC 8555, which unfortunately appears to have nothing to say about the precision with which the various ACME timestamps (e.g. authz expiry, new-order notBefore/notAfter) should be represented.
I'll file a PR to have Pebble truncate these to hundredths of a second, which python should be able to parse, and which will exercise fractional-second-parsing codepaths, and will be different from what Boulder does, but won't be a useless amount of precision.
Or maybe microseconds, to be a bit less surprising.
Truncate ARI timestamps to millisecond resolution (letsencrypt#485)