I'm having a hard time authenticating to the Object Storage Service in IBM Cloud from an external Java application using the OpenStack4j library (version 3.1.0). Here's how I'm trying:
Identifier domainIdentifier = Identifier.byName("DOMAIN");
Identifier projectIdentifier= Identifier.byName("PROJECT");
OSClient.OSClientV3 os = OSFactory.builderV3()
.endpoint("https://identity.open.softlayer.com/v3")
.credentials("USER", "PASS")
.scopeToProject(projectIdentifier, domainIdentifier)
.authenticate();
References:
https://github.com/acloudfan/IBM-Object-Storage-Sample/
https://github.com/ibm-bluemix-mobile-services/bluemix-objectstorage-sample-liberty
The problem seems to be that I can't figure out where to get the DOMAIN and PROJECT information mentioned above, and perhaps the endpoint. The documentation says to obtain them from the Object Storage page under Service Credentials and View Credentials. I do see a JSON output with the following fields:
{
"apikey": "...",
"endpoints": "...",
"iam_apikey_description": "...",
"iam_apikey_name": "...",
"iam_role_crn": "...",
"iam_serviceid_crn": "...",
"resource_instance_id": "..."
}
None of which seem to relate to domain or project information, at least by name. I even created a separate Web App with an Object Storage Connector, and tried to obtain the information from the Environment Variables page, as some of the documentation suggested, but with no luck.
What I ultimately want to achieve is to be able to ingest files to a container I created, and use the data & analytics services on top (Data Science Experience).