IBM Cloud Docs
Locating your service credentials

Locating your service credentials

You can find the credentials for any service that is associated with your account.

Objectives

  1. Locate your service credentials in IBM Cloud.
  2. Understand your service credentials.

Before you begin

Create a service instance in the IBM Cloud Dashboard by following the Getting started with IBM Cloudant tutorial.

How to find your service credentials

  1. Go to IBM Cloud and log in.

  2. Find the service instance called Cloudant-o7 and open it.

    This instance is the one you created as in the Before you begin section.

    This Resource list is a list of all the instances in your service. Cloudant-07 is the instance we use in this tutorial.
    Figure 1. Selecting the IBM Cloudant service

  3. Click Service credentials.

  4. Click the chevron next to the service credentials to see the credentials that are required to access the service.

    Viewing the service credentials.
    Figure 2. Viewing the IBM Cloudant service credentials

    Now, you can see the service credentials:

    The service credentials in this image are surrounded by a red box. The credentials include apikey, host, iam_apikey_description, iam_apikey_name, iam_role_crn, iam_serviceid_crn, url, and username.
    Figure 3. The IBM Cloudant service credentials

    The service credentials in these examples were defined when a demonstration IBM Cloudant service was created on IBM Cloudant. The credentials are reproduced here to show how they would appear in the dashboard. However, the demonstration IBM Cloudant service was removed, so these credentials are no longer valid. You must supply and use your own service credentials.

Understanding your service credentials

Service credentials are valuable. If anyone or any application has access to the credentials, they can effectively do whatever they want with the service instance. For example, they might create spurious data, or delete valuable information. Protect these credentials carefully.

IBM Cloudant has two authentication methods available at provisioning time, either Use only IAM or Use both legacy credentials and IAM. You can see the details about your legacy credentials only if the Use both legacy credentials and IAM authentication method is chosen. The credentials display on the Service credentials tab for your instance. For more information, see the IAM guide and legacy authentication document for details about using either style of authentication.

The service credentials include the following fields, as well as designating the fields that are only shown if you select the Use both legacy credentials and IAM option:

Table 1. Service credential fields
Field Purpose Legacy-auth enabled
username The username that is required for applications to access the service instance.
password The legacy credentials password that is required for applications to access the service instance. X
host The hostname that is used by applications to locate the service instance. X
port The HTTPS port number for accessing the service instance on the host. It's 443 as only HTTPS access is allowed by IBM Cloudant. X
url The HTTPS URL to access the IBM Cloudant instance. X (If the Use both legacy credentials and IAM option is chosen, it also includes the embedded legacy username and password.)
apikey The IAM API key.
iam_apikey_description Description of the IAM API key.
iam_apikey_name ID of the IAM API key.
iam_role_crn The IAM role that the IAM API key has.
iam_serviceid_crn The CRN of the service ID. X

To create an application that can access your service instance, you need these credentials.