8000 Feature proposal: Temporary credential renewal feature · Issue #94 · xtyxtyx/minio-dart · GitHub
[go: up one dir, main page]

Skip to content

Feature proposal: Temporary credential renewal feature #94

Open

Description

@JacoFaberSA

Currently, with S3 uploads using STS credentials, if the upload takes longer than the session token expiration, the upload fails.

I've implemented a simple example change here to demonstrate how this credential renewal could be achieved using a callback, along with a minor adjustment to retrieve credentials via a method rather than directly accessing accessKey and secretKey on the Minio class: https://github.com/JacoFaberSA/minio-dart/tree/credential-renewal-feature

However, this solution seems to benefit only S3 uploads as far as I can see.

Activity

  1. arrrrny commented on Oct 22, 2026

    @arrrrny

    Implemented in the fork (0.2.0), along the lines you proposed. The client can
    resolve its credentials through a callback and refresh them when they get
    old:

    final minio = Minio(
      endPoint: 's3.amazonaws.com',
      credentialsProvider: () async => MinioCredentials(
        accessKey: session.accessKey,
        secretKey: session.secretKey,
        sessionToken: session.sessionToken,
      ),
    );

    The credentials that are actually used are the ones that end up in the
    signature and in the x-amz-security-token header, and refreshCredentials()
    forces a refresh. The provider is used for every request, not only for
    uploads.

  2. arrrrny commented on Oct 22, 2026

    @arrrrny

    This ships in zuraffa_minio — the maintained fork of this package, which upstream has not touched since 4725 August 2025.

    The fork keeps the API of the original package unchanged, so moving over is an import swap:

    // before
    import 'package:minio/minio.dart';
    // after
    import 'package:zuraffa_minio/minio.dart';

    Source, the changelog and the sweep of the open issues of this tracker: https://github.com/arrrrny/zuraffa_minio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0