Closed NathanHazout closed 5 years ago
However in Cloudant I am also able to generate key/password pairs. I'm not sure what to call them
In the documentation we refer to these as IBM Cloudant legacy API keys.
However, can I use this key/pass pair with IAM? Is it relevant?
No, the legacy API keys can only be used as a Cloudant user/password, they cannot be exchanged with the IAM service.
Passing the key to the iamauth plugin does not seem to work.
That is the correct and expected behaviour, only IAM API key credentials can be used with the iamauth plugin.
You can read more on the differences between IAM API keys and IBM Cloudant legacy API keys in the Cloudant documentation. In general if you are able to use IAM credentials you probably don't need to use any Cloudant legacy API keys.
Thanks, So let's say I don't want to use any "legacy" stuff. How do I grant access to a specific table?
It seems the newer IAM keys are global for the entire instance?
I think I found the answer to my question here:
In the IAM "Disadvantages" column, it says: "No database-level permissions (yet)."
So if I want database-level permissions, no choice but to stick to legacy permissions...
Oh yeah, at the moment there is only the one IAM permission; I believe others will be available eventually.
And yes, it's still a case of "not there yet" for the database level permissions. Sorry on that, I know it's a bit frustrating and we've been working to solve it but it goes slowly.
I am a little confused by something.
On the instance level, I have access to a IAM apikey, which I am able to use using the
iamauth
plugin as such:{ iamauth: { iamApiKey: apikey }
However in Cloudant I am also able to generate key/password pairs. I'm not sure what to call them, the naming is confusing (instance credentials vs api credentials?)
I can use this pair as described in the readme:
var cloudant = Cloudant({ account:"me", key:api.key, password:api.password });
However, can I use this key/pass pair with IAM? Is it relevant? Passing the key to the iamauth plugin does not seem to work.