-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IAM Authentication for Cloudant #98
Comments
IAM apikey authentication works similar to OAuth2 where you have an API key, you go to a third party source with that key and get a temporary access_token. You then use that token in your "Authorization" header with the prefix "Bearer " for all your requests. The OAuth flow would be hard coded to IBM Cloudant and so shouldn't be implemented within Kitura-CouchDB. However generic use of the bearer authentication header could be supported. A user could then use a different repo to get their access token, provide that to Kitura-CouchDB and this would be attached to requests to allow a user to work with IAM authentication. |
@ricellis How would you recommend proceeding in terms of supporting IAM-only credentials? I understand the goal to keep this library CouchDB specific and environment agnostic. Cloudant is shown in a lot of our examples, and right now there is no way users can use IAM-only credentials in Swift. There is a distinct lack of a different repo to get their access token for IBM IAM - right now every SDK owner needs to add their own authentication methods to their SDKs - that is what the Watson SDK :( . @Andrew-Lees11 I am not convinced that this would be easy for users to do themselves . Even if we did document what the user would need to do with a bearer authentication headers, it still seems like substantial configuration is needed. Is there anyway we can make this more consumable for Cloudant? I don't see why the OAtuh flow could not be configurable, perhaps defaulting to cloudant but easily overwritten. Maybe a library could be shared with https://github.com/cloudant/swift-cloudant. |
@christiancompton I will try and prototype the bearer authentication on this repo and make a temporary repo for the IAM login to demonstrate how I think these should interact. |
The approach we've taken in our other Cloudant client libraries is to accept an IAM API key and exchange it with the IAM service for a token and then pass that token to Cloudant's |
Previously Cloudant, IBM's branded CouchDB service switched from using username/password authentication to using IAM apikey authentication. For the time being, Cloudant provides both sets of credentials when users select Legacy and IAM credentials as opposed to IAM credentials.
End of life support from Cloudant for the legacy credentials has not yet been announced, but we should support service instances that are IAM-only. https://console.bluemix.net/docs/services/Cloudant/guides/iam.html#ibm-cloud-identity-and-access-management-iam-
The text was updated successfully, but these errors were encountered: