Skip to content

Defang AWS OIDC audience is not sts.amazonaws.com #2090

@lionello

Description

@lionello

The default AWS GHA credential provider uses sts.amazonaws.com, as do the related docs. Defang CLI does not specify an audience when requesting the JWT from GitHub, so ends up with the default audience = GitHub org, eg. https://github.com/DefangLabs.

One reason is that we use one JWT for two purposes:

  • to authenticate with our backend (Fabric)
  • to authenticate to the cloud (AWS)

Ideally, we should use two separate tokens, each with specific audience:

  • fabric-prod1.defang.dev for Fabric auth
  • sts.amazonaws.com for AWS

It's OK to request multiple tokens from the ULR that GitHub provides us.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions