Manage REST Proxy Nodes

This topic contains information to help you understand how the REST proxy is used, add enrollments to the REST proxy, and view and edit the REST proxy nodes.

How's the REST Proxy Used?

The REST proxy maps an application identity to a blockchain member, which allows users and applications to call the Oracle Blockchain Platform REST APIs.

Instead of using the native Hyperledger Fabric APIs, Oracle Blockchain Platform can use the REST proxy to interact with the Hyperledger Fabric network. When you use the native Hyperledger Fabric APIs, you connect to the peers and orderer directly. However, the REST proxy allows you to query or invoke a Fabric chaincode through the RESTful protocol.

Add Enrollments to the REST Proxy

You can add Hyperledger Fabric enrollments to the REST proxy. Enrollments allow users to call the REST proxy without an enrollment certificate.

If you want to add a user to an enrollment, they must already exist in IDCS, and be assigned to the REST_USER role.

Use the Blockchain Platform console to add new enrollments and associate IDCS users with these enrollments. The enrollments are managed entirely within Blockchain Platform, not within IDCS.

For information about how users access the REST resources, see REST API for Oracle Blockchain Platform.

  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, find the REST proxy node you want to add an enrollment to, and click the Action menu for this node.
  3. Click View or Manage Enrollments to see a list of the node’s current enrollments.
    A list of the current enrollments is displayed. You can delete existing enrollments as well as adding new ones from this page.
  4. Expand Create New Enrollment.
  5. In the Enrollment ID field, enter the name of the enrollment to add.
    The enrollment ID can include only alphanumeric characters, hyphens (-), and underscores (_).
  6. Optionally, in the User ID field, enter the ID of a user with the REST_USER role to associate with the enrollment. Click Enroll.
    After you click Enroll:
    • The enrollment is created and displays in the Enrollments table.
    • The new enrollment is copied to each REST Proxy node in the network.
    • If you specified a user ID, that ID is associated with the enrollment, and cannot be removed from the associated REST users list. If the user ID is not a valid REST user, an error is returned.
    • If you specified a user ID, the generated enrollment certificate includes the ID as the username attribute.
    • User IDs that contain a colon (:) are not supported for REST API calls that use basic authentication.
  7. In the Associated REST Client Users pane you can view and manage any users associated with a current enrollment, including deleting a user from an enrollment.
  8. Add another user to the enrollment by expanding Associate New Users. Enter the email or ID of a user that is already assigned the REST_USER role. Click Associate.
After you've created an enrollment and associated a user with it, when you use REST to run transactions on the blockchain the initiator listed in the details of the block will be listed as the new enrollment rather that the original default user.

View and Edit the REST Proxy Node Configuration

A REST proxy node’s configuration determines how the node performs and behaves on the network.

Only administrators can change a node’s configuration. If you've got user permissions, then you can view a node’s configuration settings. See REST Proxy Node Attributes.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, go to the Nodes table, locate the REST proxy node that you want configuration information for, and click the node’s More Actions button.
  3. The configuration option is determined by your permissions. If you're an administrator, locate and click Edit Configuration. If you're a user, locate and click View.
    The Configure dialog is displayed.
  4. If you're an administrator, then modify the node’s Proposal Wait Time (ms), Transaction Wait Time (ms), Log Level, and Transaction Event Logging attributes as needed.
  5. Click Submit to save the configuration changes, or click X to close the Configure dialog.

View Health Information for a REST Proxy Node

You can check a REST proxy node’s metrics to see how the node is performing on the blockchain network. This information helps you discover and diagnose performance problems.

The Health pane displays these performance metrics: CPU utilization and memory utilization.
  1. Go to the console and select the Nodes tab.
  2. In the Nodes tab, click the REST proxy node you want to see health information for.
    The Node Information page is displayed.
  3. Click the Health pane to view the node’s performance metrics.
    If the utilization percentages are consistently high, then contact Oracle Support.