Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@endriu0
Copy link
Contributor

@endriu0 endriu0 commented Feb 14, 2022

This allows using the action with iam role / tested this with IAM role
in our environment and it worked.

Disclaimer: Not a developer so if something else needs to be done to get
this working correctly let me know.

Changes

  • Change 1 - Adding new session token input
  • Change 2 - Using the session token in utils when passed

This allows using the action with iam role / tested this with IAM role
in our environment and it worked correctly.

Disclaimer: Not a developer so if something else needs to be done to get
this working correctly let me know.
@jackieli-tes
Copy link
Contributor

thanks for the contribution. It looks like you didn't commit the full source? I only see it getting retrieved in utils.ts, but where is the session token used?

@endriu0
Copy link
Contributor Author

endriu0 commented Feb 14, 2022

So tbh that's all that was needed for this to work. With my limited node knowledge I assumed all that's needed is to update this function

return new minio.Client({

and then it gets used automatically below :

export async function findObject(
mc: minio.Client,

actions-cache/src/utils.ts

Lines 102 to 103 in 7772cfd

export function listObjects(
mc: minio.Client,

Since the session token is part of the credentials and is returned from assume-role in aws / needs to be passed together with access-key / secret-key.

@jackieli-tes
Copy link
Contributor

you're right, my mistake. running pipeline.

@jackieli-tes jackieli-tes merged commit b9186d3 into tespkg:main Feb 14, 2022
@endriu0 endriu0 deleted the session_token_addition branch February 14, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants