Skip to content

mc admin accesskey: --expiry-duration accepts only time units (up to hours) #5100

@trilga

Description

@trilga

Expected behavior

As per documentation, --expiry-duration should accept also days (--expiry-duration)

Actual behavior

When passing 30d, the parameter is ignored:

mc admin accesskey create myminio/ minio_user --expiry-duration 30d
Access Key: PYWZXA0Y4H33NZFQ9TXJ
Secret Key: uWXlQJ24YtoXrNi0Hp+hjxuVzuXbJpLcAbjTGERc
Expiration: NONE
Name:
Description:

Though it works well with hours, for example:

mc admin accesskey create myminio/ minio_user --expiry-duration 30h
Access Key: T2FZHTFM82DL0Q2IARB7
Secret Key: fMypggp3wDkHiMChNR+FLlq1Ay3zaNyFBQXgpcjZ
Expiration: 2024-12-31 19:37:16 +0000 UTC
Name:
Description:

Steps to reproduce the behavior

Run mc admin accesskey create myminio/ minio_user --expiry-duration 30d

mc --version

  • mc version RELEASE.2024-10-08T09-37-26Z (commit-id=cf128de2cf42e763e7bd30c6df8b749fa94e0c10)
    Runtime: go1.22.8 linux/amd64
    Copyright (c) 2015-2024 MinIO, Inc.
    License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html

System information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions