Oracle by Example brandingCreating a Service Account and Service

section 0Before You Begin

This 15-minute tutorial shows how to create a service account and a service, and issue service grants in Oracle API Platform Cloud Service.

In this series of tutorials, you learn how to implement APIs. This is the first tutorial in Implementing APIs in Oracle API Platform Cloud Service. Read the tutorials in the order listed.

Background

In Oracle API Platform Cloud Service, you can apply API policies to secure, limit, and route requests sent to APIs. If the API requests do not meet the API policy criteria you specify, requests to APIs are rejected. A service account contains credentials. Policies using outbound calls or routing, refer to the account to provide the necessary credentials.

In this series of tutorials, you are an API manager working for the NexGen Company and you are given a task of creating service accounts and issuing service grants and applying policies to the Warranty Claims API that helps handle warranty claim tickets. In this tutorial, you create a service account and issue service grants that help you control access to the service account.

What Do You Need?

  • An Oracle API Platform Cloud Service instance
  • Access to the instance as a user with the API Manager role

section 1Create a Service Account

Create an entry for a service account you want to manage in the Management Portal of Oracle API Platform Cloud Service.

  1. Sign in to the Management Portal in Oracle API Platform Cloud Service as an API Manager using the following URL format:

    https://instance-identityDomain.apiplatform.ocp.oraclecloud.com/management

    Where instance-identityDomain is the identity domain of your Oracle API Platform Cloud Service instance.

  2. In the Management Portal navigation menu, click Service Accounts.
    Oracle API Platform Cloud Service Management Portal Create Service Account Screen
    Description of the illustration service-account_screen.png
  3. On the Service Accounts page, click Create.
  4. In the Create Service Account dialog, enter the following:
    • Service Account Name: Enter Warranty Claim Service Account.
    • Description: Enter This is a service account for Warranty Claim API.
    • Account Type: Select Basic Auth.
    • Username: Enter Manager.
    • Password: Enter Manager!23.
    Oracle API Platform Cloud Service Management Portal Create Service Account screen
    Description of the illustration service-account_create-account.png
  5. Click Create.
  6. The Service Accounts page lists Warranty Claim Service Account.


section 2Create a Service

A service is a resource that represents the backend service for an API.

  1. In the Management Portal navigation menu, click Services.
  2. In the Services page, click Create.
  3. In the Create Service dialog, enter the following:
    • Name: Enter Warranty Claim Service.
    • Version: Enter 1
    • Description: Enter This is a service for Warranty Claim API.
    • Service Type: Select HTTP.
    • Endpoint Name: Enter Warranty Claim Endpoint.
    • Endpoint URL: Enter http://warrantyclaim.com.
    • Select Use Gateway Node Proxy option.
    Oracle API Platform Cloud Service Management Portal Create Service screen
    Description of the illustration service-account_create-service.png
  4. Click Create.
  5. The Services page lists Warranty Claim Service.


section 3Select Service Account for Service

Select Warranty Claim Service Account for Warranty Claim Service.

  1. In the Services page, click Warranty Claim Service.
  2. Click Select Account.
  3. In the Select Service Account dialog, select Warranty Claim Service Account.
    Oracle API Platform Cloud Service Management Portal Select Service Account screen
    Description of the illustration service-account_select-account.png
  4. Click Select.
  5. In the Warranty Claim Service page, click Save.
  6. Warranty Claim Service Account is added to Warranty Claim Service.


section 4Issue Service Account Grants

Service account grants allow you to issue fine-grained permissions to users or groups for each service account.

  1. In the Services page, click Warranty Claim Service.
  2. Click User Management Illustration of User Management button.
  3. On the Manage Service tab, in the Grants page, click Add Grantee.
  4. In the Add Grantee dialog, choose a user or group and click Add.
    Oracle API Platform Cloud Service Management Portal Add Grantee screen
    Description of the illustration service-account_account-grant.png
  5. The Manage Service tab lists the grantee


next stepNext Tutorial

Applying API Policies