CircleCI-Public / aws-cli-orb

Install and configure the AWS command-line interface (awscli)
https://circleci.com/orbs/registry/orb/circleci/aws-cli
MIT License
57 stars 51 forks source link

CIRCLE_OIDC_TOKEN_V2 and CIRCLE_OIDC_TOKEN are not present on Server 4.x #161

Open thedoc31 opened 1 year ago

thedoc31 commented 1 year ago

CircleCI Server 4.x does not export CIRCLE_OIDC_TOKEN_V2 nor CIRCLE_OIDC_TOKEN because OIDC is not supported yet. Error [1] is shown instead when you try to use role assumption using this orb.

The orb documentation should probably state specifically that role assumption will not work on Server until such time as the feature is added. In the meantime, access_key/secret_key still work fine on 3.2.x.

If there is a different way to work around this without OIDC support by force-specifying/generating a token or giving an override parameter, that would be even better. Not sure if it's possible though.

[1]

OIDC Token cannot be found. A CircleCI context must be specified.
brivu commented 10 months ago

Hey @thedoc31,

Thanks for letting us know. As of now, the OIDC token is not available with server yet. It's on our roadmap for Q1 of next year.

Having said that, you can work around this by storing your static aws keys as environment variables and simply use the aws-cli/setup command without any other parameters to authenticate yourself.

Hope that helps! -Brian