Skip to content

Support Per-Catalog AWS Credentials in MinIO Deployments #2970

Closed

Description

@duc-dn

Is your feature request related to a problem? Please describe.

Currently, Polaris requires AWS credentials to be provided via environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) at the service startup level. This creates the following problems in MinIO deployments:

  • Lack of Credential Isolation: All catalogs share a single set of AWS credentials, violating the principle of least privilege. Each catalog should have its own credentials with access restricted to its specific bucket.

  • Missing MinIO Support: Unlike AWS (which supports STS AssumeRole for credential vending), MinIO does not provide an equivalent service. Currently, the only option for MinIO users is to use a single shared credential set, which is not production-ready.

Describe the solution you'd like

Add support for inline AWS credentials (accessKeyId and secretAccessKey) in the storageConfigInfo object when creating a catalog. This would allow users to:

  • Pass per-catalog credentials during catalog creation:
{
  "name": "catalog1",
  "storageConfigInfo": {
    "accessKeyId": "catalog1_access_key",
    "secretAccessKey": "catalog1_secret_key",
    "endpoint": "https://minio.example.com",
    "storageType": "S3",
    "pathStyleAccess": true,
    "region": "us-west-2",
    "allowedLocations": ["s3://bucket1/catalog1"]
  }
}
  • Isolate credentials per catalog - each catalog uses only its own credentials for S3 operations

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added
    enhancement
    on Nov 4, 2025
  2. dimas-b commented on Nov 4, 2025

    @dimas-b
    Contributor

    Thanks for your proposal, @duc-dn ! The general direction of this issue LGTM. However, keeping secrets in storageConfigInfo is probably not advisable.

    I believe this issue relates to the old Secrets Manager discussion: https://lists.apache.org/thread/2y2vv8jrgps7s3sr241k6tgm440jzbp9

    I've added this issue to the agenda for the next community meeting: https://polaris.apache.org/community/meetings/

  3. snazy commented on Nov 13, 2025

    @snazy
    Member

    I'm actually dreaming a bit further ahead ... and allow that even on the namespace level ;) But that's quite another step.

    And yes, secrets should be managed, supporting externally triggered rotation, eventually leveraging all relevant sources for secrets (container provided, secrets managers, and "static configuration" encrypted and unencrypted). (Just dreaming...)

  4. tokoko commented on Dec 9, 2025

    @tokoko
    Contributor

    We would also like to have this (+1 on the namespace level), we have a use case where we need to have 2 catalogs in the same deployment, one pointing to s3 storage and another to minio. Is anyone working on secrets managers currently?

  5. tokoko commented on Jan 6, 2026

    @tokoko
    Contributor

    @dimas-b @snazy I was wondering if "secrets manager" should be the only way to accomplish this. While I understand the need for it in a general case, in our deployment catalogs are created exclusively by a central "data platform" team that manages polaris itself, never by the individual data teams. The idea is to abstract away the storage, so it would not really make sense for the teams themselves to have access to these credentials in the first place. Rather than relying on polaris to manage secrets, it would be easier for the platform team to manage secrets externally, mount them in pods as environment variables and let catalogs refer to environment variables. The config for catalog would be something like accessKeyIdEnvVar rather than accessKeyId.

    I suspect a lot of existing deployments might follow the same pattern (??) and would benefit from a simpler solution like this.

  6. snazy commented on Jan 6, 2026

    @snazy
    Member

    Well, every "secrets manager" needs some implementation in Polaris. So one implementation of a "secrets manager" could pull the secrets from Quarkus/SmallRye configurations, which can be "fed" from environment variables. ;)
    We'd "just" need a convention about how to map a "secrets reference" to the actual secrets.

  7. dimas-b commented on Jan 6, 2026

    @dimas-b
    Contributor

    +1 to starting simple with a config-based lookup. We do not have to call it "secrets manager" upfront. A simple provider of credentials for AWS (and other) clients would do initially, IMHO.

    Settings can be mounted as a config map in k8s or env. vars.

  8. dimas-b commented on Jan 8, 2026

    @dimas-b
    Contributor

    This was discussed in the Polaris Community sync on Jan 8, 2026. The general consensus was about proceeding with smaller PR addressing specific users' needs and gradually building towards a full Secrets Manager.

    @tokoko : would you be interested in contributing the first PR for this? For example, using config-based credentials (possibly binding to k8s secrets at deploy time)?.. or feel free to propose something else :)

  9. tokoko commented on Jan 8, 2026

    @tokoko
    Contributor

    sounds good. Right now I'm thinking of the possible solutions:

    1. Having thought a bit more about it, unless we go with some sort of secrets manager that will have it's own rbac, allowing arbitrary access to env variables during CreateCatalog (however secure one might think it may be) is a bad idea. There should not be a way for a StorageInfo config to control where the values come from, instead I think the easiest solution will be if we extend already existing polaris.storage.aws.access-key and polaris.storage.aws.secret-key configs. We could introduce similar catalog-scoped configs like polaris.storage.aws.<catalog-id>.access-key and polaris.storage.aws.<catalog-id>.secret-key. How the values are provided on startup will be completely up to the deployment owner, mounting k8s secrets as env variables is obviously the most straightforward solution. The only downside here is that we're effectively splitting up creation of a catalog in two parts: CreateCatalog call and prepopulation of keys in polaris config, but personally I can live with that.

    2. We can do a read-only secrets manager where values can be populated from env vars or polaris config, arbitrary StorageInfo configs (and other places) can refer to them in some way, but there should probably be some rbac in the mix as well.

    I'm heavily in favor of the first option, probably because I'm only interested in a single-tenant deployment where product-specific secret manager is not worth the trouble.

  10. dimas-b commented on Jan 8, 2026

    @dimas-b
    Contributor

    @tokoko : option 1 (above) SGTM, except I'm not sure about using catalog IDs. WDYT about using the storage location (e.g. bucket name) as the intermediate step for catalog access key lookup? Something like polaris.storage.aws.<bucket/path>.access-key? The bucket/path could be the default catalog storage location from Storage Config Info 🤔 This way it should be configurable before catalogs are created in Polaris.

    We should certainly cover this functionality with a feature flag, as I'm sure some deployments will not want to enable it.

  11. tokoko commented on Jan 8, 2026

    @tokoko
    Contributor

    I'm slightly bothered by the fact that bucket names would not be unique... you can have same bucket in aws and minio for example, but I guess we can work around that somehow.

    More important problem is that AwsStorageConfigurationInfo doesn't have a single defined location, only AllowedLocations, so not sure if this can be accomplished cleanly. We might have to defer StorageIntegration resolution on operation/table level. How okay would you be if we simply get first value from AllowedLocations and used that for resolution? 😆

  12. dimas-b commented on Jan 8, 2026

    @dimas-b
    Contributor

    Using the first "allowed" location works for me, especially considering https://github.com/apache/polaris/pull/3347/changes#diff-44520ac49adac41c621845817a0da9c52f3a30a388f82cdfb664639a8ecc8212R178

    I'd also suggest adding an optional "storage name" to catalog properties, which could be used for linking catalog to credentials in a many-to-one manner (defaulting to bucket name)... but this is subject to discussion, of course.

  13. tokoko commented on Jan 8, 2026

    @tokoko
    Contributor

    Using the first "allowed" location works for me, especially considering

    I think that refers to read locations, not the original list of allowed locations that's defined on catalog-level.

    I'd also suggest adding an optional "storage name" to catalog properties, which could be used for linking catalog to credentials in a many-to-one manner (defaulting to bucket name)... but this is subject to discussion, of course.

    If we do that, we might as well make it mandatory (if you want to override creds) and avoid bucket/endpoint resolution confusion.

    The main reason why I wanted to avoid using anything other than catalog name is that catalog name is part of rbac scope, using anything else sort of allows catalog creator to hijack credentials that might not have been meant for them. If we make storage name "mandatory", maybe we can mitigate this by including storage name (or entire storage config info) in the payload that's sent to OPA. wdyt?

  14. dimas-b commented on Jan 9, 2026

    @dimas-b
    Contributor

    Re: credential hijacking, I believe config-based credentials are not meant for open environments (like SaaS solutions). In controlled environments, this is hardly a security risk (users who can create catalogs are probably privileged already).

    Re: (mandatory) storage name - if it becomes too shaky in terms of initial impl. using the simple catalog name is ok from my POV. We can certainly add that to OPA inputs.

  15. ModEtchFill commented on Feb 10, 2026

    @ModEtchFill
    Contributor

    We have some internal code for azure that uses config for multiple storage account credentials.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions