'Cloud ibm cos Iam api key or hmac v4

Im using cloud ibm as paas.

With the use of cloud object storage, I need to authenticate to the service to get cos access. I have the choice between iam api keys or hmac (v4 signature is possible).

Which one is the best choice? Is hmac b4 more safe than iam apikey? The iam way seems to be very coupled to ibm cloud as they develops a aws sdk to handle this authentication.

And the hmac v4 cos authentication hides the iam process. So my application will be less coupled to iam process.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source