From 2208441e31e7df90b4fa437ad456b8ab4b12d6df Mon Sep 17 00:00:00 2001 From: Allan Roger Reid Date: Tue, 18 Feb 2025 11:25:57 -0800 Subject: [PATCH] Specify RFC3339 and not ISO-8601 data and time (#1419) MinIO uses RFC3339 data and time formatting and not ISO-8601. RFC3339 requires that there be a `T` as part of the data and time separation. ISO-8601 allows a space. The documentation also currently refers to using a date in the batch framework; this should be a RFC3339 date and time. e.g. ``` mc batch start play expire.yaml mc: Unable to start job. We encountered an internal error, please try again.: cause(parsing time "2006-01-02 15:04:05.00Z" as "2006-01-02T15:04:05Z07:00": cannot parse " 15:04:05.00Z" as "T"). ``` --------- Co-authored-by: Ravind Kumar --- source/administration/batch-framework-job-expire.rst | 2 +- source/administration/batch-framework-job-keyrotate.rst | 4 ++-- source/administration/batch-framework-job-replicate.rst | 4 ++-- .../security-token-service/AssumeRoleWithCustomToken.rst | 2 +- .../security-token-service/AssumeRoleWithLDAPIdentity.rst | 2 +- .../security-token-service/AssumeRoleWithWebIdentity.rst | 2 +- source/includes/code/expire.yaml | 4 ++-- source/includes/code/keyrotate.yaml | 4 ++-- source/includes/code/replicate.yaml | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/administration/batch-framework-job-expire.rst b/source/administration/batch-framework-job-expire.rst index 3f7f2d96..acb3685b 100644 --- a/source/administration/batch-framework-job-expire.rst +++ b/source/administration/batch-framework-job-expire.rst @@ -106,7 +106,7 @@ Expire Batch Job Reference * - ``rules.[n].createdBefore`` - *Optional* - Specify an ISO-8601 timestamp for filtering objects. + Specify an :rfc:`RFC3339 <3339>` date and time for filtering objects. The rule applies to only those objects created *before* the specified timestamp. diff --git a/source/administration/batch-framework-job-keyrotate.rst b/source/administration/batch-framework-job-keyrotate.rst index fec40977..cea80b08 100644 --- a/source/administration/batch-framework-job-keyrotate.rst +++ b/source/administration/batch-framework-job-keyrotate.rst @@ -62,11 +62,11 @@ For **flag based filters** Keys rotate only for objects older than the specified length of time. * - ``createdAfter:`` - - A date in ``YYYY-MM-DD`` format. + - A date in ``YYYY-MM-DDTHH:MM:SSZ`` :rfc:`RFC3339 <3339>` date and time format. Keys rotate only for objects created after the date. * - ``createdBefore:`` - - A date in ``YYYY-MM-DD`` format. + - A date in ``YYYY-MM-DDTHH:MM:SSZ`` :rfc:`RFC3339 <3339>` date and time format. Keys rotate only for objects created prior to the date. * - ``context:`` diff --git a/source/administration/batch-framework-job-replicate.rst b/source/administration/batch-framework-job-replicate.rst index 1ac966a1..daeb23d9 100644 --- a/source/administration/batch-framework-job-replicate.rst +++ b/source/administration/batch-framework-job-replicate.rst @@ -237,11 +237,11 @@ For **filters** Only objects older than the specified length of time replicate. * - ``createdAfter:`` - - A date in ``YYYY-MM-DD`` format. + - A date in ``YYYY-MM-DDTHH:MM:SSZ`` :rfc:`RFC3339 <3339>` date and time format. Only objects created after the date replicate. * - ``createdBefore:`` - - A date in ``YYYY-MM-DD`` format. + - A date in ``YYYY-MM-DDTHH:MM:SSZ`` :rfc:`RFC3339 <3339>` date and time format. Only objects created prior to the date replicate. diff --git a/source/developers/security-token-service/AssumeRoleWithCustomToken.rst b/source/developers/security-token-service/AssumeRoleWithCustomToken.rst index 27fb8a8a..4dd267c2 100644 --- a/source/developers/security-token-service/AssumeRoleWithCustomToken.rst +++ b/source/developers/security-token-service/AssumeRoleWithCustomToken.rst @@ -84,7 +84,7 @@ MinIO returns an ``AssumeRoleWithCustomTokenResult`` object, where the ``Assumed - ``AccessKeyId`` - The access key applications use for authentication. - ``SecretKeyId`` - The secret key applications use for authentication. -- ``Expiration`` - The ISO-8601 date-time after which the credentials expire. +- ``Expiration`` - The :rfc:`RFC3339 <3339>` date and time after which the credentials expire. - ``SessionToken`` - The session token applications use for authentication. Some SDKs may require this field when using temporary credentials. diff --git a/source/developers/security-token-service/AssumeRoleWithLDAPIdentity.rst b/source/developers/security-token-service/AssumeRoleWithLDAPIdentity.rst index 9272377b..e45fe7f6 100644 --- a/source/developers/security-token-service/AssumeRoleWithLDAPIdentity.rst +++ b/source/developers/security-token-service/AssumeRoleWithLDAPIdentity.rst @@ -133,7 +133,7 @@ credentials generated by MinIO: - ``AccessKeyId`` - The access key applications use for authentication. - ``SecretKeyId`` - The secret key applications use for authentication. -- ``Expiration`` - The ISO-8601 date-time after which the credentials expire. +- ``Expiration`` - The :rfc:`RFC3339 <3339>` date and time after which the credentials expire. - ``SessionToken`` - The session token applications use for authentication. Some SDKs may require this field when using temporary credentials. diff --git a/source/developers/security-token-service/AssumeRoleWithWebIdentity.rst b/source/developers/security-token-service/AssumeRoleWithWebIdentity.rst index f3b77efb..ddb587cd 100644 --- a/source/developers/security-token-service/AssumeRoleWithWebIdentity.rst +++ b/source/developers/security-token-service/AssumeRoleWithWebIdentity.rst @@ -143,7 +143,7 @@ credentials generated by MinIO: - ``AccessKeyId`` - The access key applications use for authentication. - ``SecretKeyId`` - The secret key applications use for authentication. -- ``Expiration`` - The ISO-8601 date-time after which the credentials expire. +- ``Expiration`` - The :rfc:`RFC3339 <3339>` date and time after which the credentials expire. - ``SessionToken`` - The session token applications use for authentication. Some SDKs may require this field when using temporary credentials. diff --git a/source/includes/code/expire.yaml b/source/includes/code/expire.yaml index e2f710ee..493009f9 100644 --- a/source/includes/code/expire.yaml +++ b/source/includes/code/expire.yaml @@ -6,7 +6,7 @@ expire: - type: object # objects with zero ore more older versions name: NAME # match object names that satisfy the wildcard expression. olderThan: 70h # match objects older than this value - createdBefore: "2006-01-02T15:04:05.00Z" # match objects created before "date" + createdBefore: "2006-01-02T15:04:05.00Z" # match objects created before this date and time in RFC3339 format tags: - key: name value: pick* # match objects with tag 'name', all values starting with 'pick' @@ -23,7 +23,7 @@ expire: - type: deleted # objects with delete marker as their latest version name: NAME # match object names that satisfy the wildcard expression. olderThan: 10h # match objects older than this value (e.g. 7d10h31s) - createdBefore: "2006-01-02T15:04:05.00Z" # match objects created before "date" + createdBefore: "2006-01-02T15:04:05.00Z" # match objects created before this date and time in RFC3339 format purge: # retainVersions: 0 # (default) delete all versions of the object. This option is the fastest. # retainVersions: 5 # keep the latest 5 versions of the object including delete markers. diff --git a/source/includes/code/keyrotate.yaml b/source/includes/code/keyrotate.yaml index fc178b77..a38e02be 100644 --- a/source/includes/code/keyrotate.yaml +++ b/source/includes/code/keyrotate.yaml @@ -13,8 +13,8 @@ keyrotate: filter: newerThan: "7d" # match objects newer than this value (e.g. 7d10h31s) olderThan: "7d" # match objects older than this value (e.g. 7d10h31s) - createdAfter: "date" # match objects created after "date" - createdBefore: "date" # match objects created before "date" + createdAfter: "date" # match objects created after this date and time in RFC3339 format + createdBefore: "date" # match objects created before this date and time in RFC3339 format tags: - key: "name" value: "pick*" # match objects with tag 'name', with all values starting with 'pick' diff --git a/source/includes/code/replicate.yaml b/source/includes/code/replicate.yaml index b9fa2659..7727c372 100644 --- a/source/includes/code/replicate.yaml +++ b/source/includes/code/replicate.yaml @@ -44,8 +44,8 @@ replicate: filter: newerThan: "7d" # match objects newer than this value (e.g. 7d10h31s) olderThan: "7d" # match objects older than this value (e.g. 7d10h31s) - createdAfter: "date" # match objects created after "date" - createdBefore: "date" # match objects created before "date" + createdAfter: "datetime" # match objects created after this date and time in RFC3339 format + createdBefore: "datetime" # match objects created before this date and time in RFC3339 format ## NOTE: tags are not supported when "source" is remote. # tags: