iits-consulting / otc-auth

Open Source CLI for the Open Telekom Cloud written in go.
GNU General Public License v3.0
44 stars 5 forks source link

otc-auth temp-access-token create doesn't seem to create usable token #139

Closed nevotheless closed 1 week ago

nevotheless commented 3 weeks ago

I did

otc-auth login iam --os-username IAM_USER --os-password "IAM_USER_PASSWORD"

which seemed to work without a error (wrong credentials result in unauthorized error).

Then i'm trying to generate a temp-access-token to use within our terraform project. I run

otc-auth temp-access-token create

and it creates a ak-sk-env.sh file with content, seemingly the command did work. I proceed to source the new file and run a terraform plan but the error says that the newly created access key doesn't exist.

Error: failed to authenticate:
│ error generating project client: Authentication Failed, error message: {"error_msg":"Incorrect IAM authentication information: ak SOMEACCESSKEYID not exist","error_code":"APIGW.0301","request_id":"somerequestid"}

Since these temp keys doesn't exist within the otc console i can't check if they actually exist. Is there another way via an API i could check if those keys actually are getting created?

nevotheless commented 1 week ago

I close this as i just forgot to set security_token on the provider to work with temp AK/SK authentication.