Skip to main content

InterSystems IRIS Managed Service Reference Information

This section describes how to perform various activities that are part of the day-to-day operations of InterSystems IRIS Managed Service, organized by page. Use the links in the Deployments section of the main menu in the Cloud Services Portal to navigate from page to page.

For a high-level overview of setting up InterSystems IRIS Managed Service, see Introducing InterSystems IRIS Managed Service.

Note:

Some of the functionality described in this section may not be available to all users, depending on their role on the development team. For more information, see Tenants PageOpens in a new tab.

Overview Page

The Overview page contains several sections, as described below. Some content may or may not appear, based on your configuration.

Deployment Details

In the Deployment Details section of the Overview page for your deployment, you can view the details of your deployment, including:

  • Deployment size

  • Creation date

  • Deployment ID

  • Cloud provider and region

  • High Availability State

  • Underlying InterSystems IRIS platform

Note:

If a deployment has a status where you cannot access the deployment’s Overview page (for example, CREATING or UPDATING), its card on the Deployments page will display the Deployment ID. The Deployment ID uniquely identifies your deployment.

xDBC Details

The xDBC Details section of the Overview page provides information on how to connect to your InterSystems IRIS Managed Service database using a JDBC or ODBC client. You can also find out how to install the necessary InterSystems IRIS JDBC or ODBC driver.

You also need to create an inbound firewall rule to open port 51773 on the Firewall page.

For more information on querying your InterSystems IRIS Managed Service database using JDBC or ODBC, see Query Your Data.

Interoperability Details

The Interoperability Details section of the Overview page displays the File System Interoperability directory name to be used by Interoperability Productions Opens in a new tab that need to store files on the file system. If you have a High Availability configuration, files in this directory are copied automatically from the primary mirror member to the backup mirror member.

This section also displays the CIDR Block for the private network used for this deployment, as well as the Virtual IP Address of the deployment. This CIDR block defines the range of IP addresses used for the internal InterSystems IRIS Managed Service components. The Virtual IP address is a static address within the CIDR block that you use to communicate with this InterSystems IRIS Managed Service deployment. If you have a High Availability configuration, this Virtual IP address will continue to work no matter which mirror member is the primary member.

The External IP is displayed only if you have enabled public access on the Firewall page.

System Management Page

From the System Management page for your deployment, you can launch the InterSystems IRIS Managed Service Management Portal, which allows you to create and manage Interoperability Productions Opens in a new tab to connect systems that use different communication protocols and message formats.

Before you can connect to the Management Portal, you need to complete several prerequisite steps:

  1. If you are connecting to InterSystems IRIS Managed Service using a VPN (or private circuit), create an InterSystems Network ConnectOpens in a new tab deployment. On the Network Connect Configurations pageOpens in a new tab, attach your InterSystems IRIS Managed Service deployment and your VPN (or private circuit).

  2. On the InterSystems IRIS Managed Service Firewall page, create a firewall rule to allow traffic to flow to the Management Portal.

  3. On the Connect Users page, create a username and password you can use to log in to the Management Portal. Then assign to the user any productions you need to access. You can also assign access to custom APIs at this point.

    Note:
    • You must create a firewall rule on the Firewall page to open port 443 to allow connect users to access the Management Portal.

    • You need to assign at least one production to the user in order to access the Management Portal. If no productions exist, create one on the Productions page.

After the prerequisite steps are complete, click Launch Management Portal and log in with the username and password of your connect user.

If you do not see a production you recently created, you might need to add access to that production for your user on the Connect Users page, or you might need to log out of the Management Portal and log back in.

For complete information on using the Management Portal, see the InterSystems IRIS documentation setOpens in a new tab. Note that some InterSystems IRIS functionality is not available to InterSystems IRIS Managed Service users, as these aspects of the service are managed for you by InterSystems.

Connect Users Page

The Connect Users page allows you to manage the users who need to log in to the InterSystems IRIS Managed Service Management Portal. The InterSystems IRIS Managed Service Management Portal can be launched from the System Management page.

For details on how to manage Connect Users, see The Connect Users Page.

Productions Page

The Productions page allows you to see all of the interoperability productions you have created and their current Production State (for example, Stopped or Running). In general terms, a production accepts messages from one or more external systems, transforms or processes the messages as required, and then sends them to one or more other external systems.

You can also use the Productions page to:

For general information on productions, see Introduction to Interoperability ProductionsOpens in a new tab. For configuration information specifically relevant to InterSystems IRIS Managed Service productions, see Configure InterSystems IRIS Managed Service Productions.

For information on how to grant access for a user to work on a production, see Connect Users page.

Create a Production

When you create an interoperability production, the Cloud Services Portal also creates a namespaceOpens in a new tab for the production, which includes a database for the code and data for that production. After creating a production, you can configure and manageOpens in a new tab it using the Management Portal.

For more information on developing productions, see the InterSystems IRIS documentation setOpens in a new tab.

If your InterSystems IRIS Managed Service deployment was created with the High Availability configuration, the databases for your interoperability productions are automatically mirrored to the backup server.

To create a production:

  1. On the Productions page, under Create Interoperability Production, type the desired name of your production.

  2. Click Create Production.

After you create a production, it shows up in the Productions list at the top of the page with a Production State of Stopped. When the creation process is finished, the Production State changes to Running. The Production Started column shows the time the production was started, in GMT. You may need to click Refresh to update the status.

To manage the production in the Management Portal, click Manage in the row for that production. You will need to log in as a user that you or a team member has created (and granted production access to) on the Connect Users page

Delete a Production

To delete an interoperability production:

  1. On the Productions page, click the Delete Production icon in the Actions column for that production.

  2. In the Delete Production dialog box, type Permanently Delete, and click Delete.

The production is removed from the Productions list at the top of the page.

SSL/TLS Configurations Page

Transport Layer Security (TLS) provides strong protection for communication between pairs of entities. It allows you to perform authentication, data integrity protection, and data encryption. TLS is the successor to the secure sockets layer (SSL).

InterSystems IRIS Managed Service supports the ability to create and store an SSL/TLS configuration and specify an associated configuration name. When you need an SSL/TLS connection (for example, to connect another system to InterSystems IRIS Managed Service or to connect InterSystems IRIS Managed Service to another system), you provide the applicable configuration name, and InterSystems IRIS Managed Service automatically handles the connection.

For more information on how to manage SSL/TLS configurations, see The SSL/TLS Configurations Page.

For information on using SSL/TLS configurations in an production, see Configure a Production to Use SSL.

If you want to receive a notification when an SSL certificate is about to expire, see Configure a Production to Send SSL Certificate Expiration Alerts for more information.

SQL Gateways Page

A SQL Gateway provides access from InterSystems IRIS Managed Service to external databases via JDBC and ODBC.

InterSystems IRIS Managed Service maintains a list of SQL Gateway configurations, which are logical names for connections to external databases. Each SQL Gateway configuration consists of a configuration name, information on connecting to the data source, and a username and password to use when establishing the connection.

The SQL Gateways page allows you to see all of the SQL Gateway configurations you have created, the driver used, the server URL, and username used to connect to the external database.

You can also use the SQL Gateways page to:

Create a SQL Gateway Configuration

To create a new SQL Gateway configuration:

  1. On the SQL Gateways page, under Create SQL Gateway Configuration, type the Configuration Name of your SQL Gateway configuration.

    Only alphanumeric characters are allowed. No spaces or special characters.

  2. Choose a Driver to use for the connection.

  3. In the Server box, type the URL of the server to use for this connection.

  4. In the Port box, type the port number to connect to on the server.

  5. In the Database box, type the name of the external database.

  6. In the User box, type the username to use to connect to the external database.

  7. In the Password box, type the password to use to connect to the external database.

  8. Click Create Configuration.

After you create a configuration, it shows up in the SQL Gateway Configurations list at the top of the page.

Test a SQL Gateway Configuration

To test a SQL Gateway configuration:

On the SQL Gateways page, click the Test Configuration icon in the Actions column for that configuration.

You should see the message “Successfully connected to remote server.”

If you see the message “There was an issue testing configuration. Please double check configuration parameters.” then edit the SQL Gateway configuration and try again.

Edit a SQL Gateway Configuration

To edit a SQL Gateway configuration:

  1. On the SQL Gateways page, click the Edit Configuration icon in the Actions column for that configuration.

  2. In the dialog box, edit any of the fields, and click Save.

See Create a SQL Gateway Configuration for information on each field.

Delete a SQL Gateway Configuration

To delete a SQL Gateway configuration:

  1. On the SQL Gateways page, click the Delete Configuration icon in the Actions column for that configuration.

  2. In the Delete Configuration dialog box, type Permanently Delete, and click Delete.

The configuration is removed from the SQL Gateway Configurations list at the top of the page.

Firewall Page

The Firewall page allows you to manage your deployment’s firewall, allowing (or denying) inbound traffic to your deployment or allowing (or denying) outbound traffic from your deployment.

Private rules allow (or deny) traffic to and from your deployment over the private network. To connect to your deployment over the private network, use InterSystems Network ConnectOpens in a new tab to connect a VPN gateway device (or a private circuit) to the deployment.

Public rules allow (or deny) traffic to and from your deployment over the internet. Enabling public access generates an external IP address, which can be viewed in the Global Network Settings section of the Firewall page and in the Interoperability Details section of the Overview page.

The following constraints apply to InterSystems IRIS Managed Service firewall rules:

  • For inbound rules, the allowed ports are 443 and 1024 through 65535. Use port 443 to allow a user to log into the deployment’s Management Portal. Use port 51773 to connect to your deployment’s database using a JDBC or ODBC client.

  • For outbound rules, the allowed ports are 22, 53, 80, 123, 443, 465, 587, and 1024 through 65535.

For details on how to manage your firewall rules, see Firewall Page.

DNS Mappings Page

The DNS Mappings page lets you set up rules that determine how your deployment handles DNS queries.

A DNS mapping can be one of two mapping types:

  • DNS Forward—When a DNS query for a particular domain is requested, the deployment forwards it to a specified DNS server for resolution.

    For instance, if you map the domain example.com to a DNS server located at IP address 203.0.113.1, then DNS queries from this deployment for the domain example.com are resolved by the DNS server at the specified address. This is useful if you are using a split DNS configuration for a VPN connected to this deployment. If the IP address you specify is the IP address of your corporate DNS server, then requests for ftp.example.com, smtp.example.com, and docs.example.com are all forwarded to your corporate DNS server to be resolved.

  • Static IP—When a DNS query for a particular domain is requested, the deployment resolves it locally to the specified IP address.

You can use the DNS Mappings page to enable the DNS mapping feature. After that, you can use the page to view any existing mappings, or to add mappings or delete mappings.

After you have created one or more mappings, each mapping is displayed in a table on the page, along with its domains, IP addresses, and mapping type.

Note:

You cannot edit an existing mapping. If you need to change a mapping, delete the old mapping and add a new one.

Enable the DNS Mapping Feature

To enable DNS mapping:

  1. On the DNS Mappings page, move the slider to the right to Enable the feature.

  2. Wait 5 minutes to make sure that the feature is fully enabled in the background. You will not see any visual indication that this is complete.

    Important:

    If you don’t wait until the feature is fully enabled, any mappings you attempt to create will fail.

Add a Mapping

To add a mapping:

  1. On the DNS Mappings page, click New.

  2. On the Add Mapping dialog, in the Mapping Type box, select either DNS Forward or Static IP.

  3. In the Domains box, type one or more domain names.

    To add multiple domains, press the Enter key after each domain name.

  4. In the IPs box, type one or more IP addresses.

    To add multiple IP address, press the Enter key after each IP address.

  5. On the Add Mapping dialog, click Save.

  6. On the DNS Mappings page, click New to add additional mappings, if needed.

  7. On the DNS Mappings page, click Save Changes to save all of your new mappings.

    Note:

    If you navigate to another page without saving your new mappings, they will be lost.

  8. After saving your changes, wait 5 minutes for the new mappings to be fully processed before making any other changes.

Delete a Mapping

To delete a mapping:

  1. On the DNS Mappings page, in the row for the mapping you want to delete, click the Delete Mapping icon in the Actions column.

  2. Delete any other mappings, if needed.

  3. Click Save Changes to save all of your deletions.

    Note:

    If you navigate to another page without saving your deletions, they will be lost.

  4. After saving your changes, wait 5 minutes for the deletions to be fully processed before making any other changes.

Network Page

The Network page can be used to test outbound connectivity from this deployment to a particular server, to test inbound connectivity from a client to this deployment, or to monitor flow logs of the traffic coming in and out of this deployment.

Test Outbound Connectivity

The Network Connectivity Test section of the Network page allows you to test connectivity from this deployment to a particular server and port. The server can be accessed over the public internet, a VPN, a private circuit, or a peer network.

To perform an outbound connectivity test:

  1. In the Network Connectivity Test section of the Network page, select Outbound as the Connection Type.

  2. In the IP or Hostname box, type the IP address (such as 203.0.113.0) or hostname (such as example.com) of the server to which you want to connect.

  3. In the Port box, type the port number to which you want to connect on that server.

    You can specify one of the following ports: 21, 22, 53, 443, 465, 587, or a port in the range 1024-65535.

  4. If your deployment has multiple virtual IP addresses (this is not common), select a Source Address.

    If the connection you are testing is routed over a private network and expects a specific source address that is defined for this deployment, select it from the drop-down list. Otherwise, select Default to use the standard routing rules for this deployment.

    Note:

    If your deployment has a single virtual IP address, the Source Address field will not appear.

  5. Click Test Connection.

    You will see either a success message or a failure message indicating the reason the connection could not be made.

Test Inbound Connectivity

The Network Connectivity Test section of the Network page also allows you to test connectivity from a client to particular port on this deployment. The client can access the deployment over the public internet, a VPN, a private circuit, or a peer network.

Testing inbound connectivity can be helpful when you are planning on setting up a new interface and you want to make sure it will be reachable.

To perform an inbound connectivity test:

  1. In the Network Connectivity Test section of the Network page, select Inbound as the Connection Type.

  2. In the Client IP box, type the IP address (such as 203.0.113.0) or hostname (such as example.com) from which you want to connect.

  3. In the Port box, type the port number on the deployment to which you want to connect.

  4. Click Test Connection.

    At this point, you can receive a number of different diagnostic messages:

    • No firewall rule exists to allow traffic from <IP Address>:<Port> means that you need to create an inbound firewall rule to allow access from the Client IP to this particular port. See The Firewall Page.

    • Firewall rule '<Rule Name>'.IRIS is listening on <Port Number> means that an existing interface is already using this port number. This is not an error, but indicates a new interface should be assigned to a different port number.

    • Firewall rule '<Rule Name>', followed by IRIS is ready to test inbound connections from the specified IP and Port means that you are cleared to test the inbound connection.

Test the Inbound Connection

When you see the message IRIS is ready to test inbound connections from the specified IP and Port, complete the following steps to test the inbound connection:

  1. In the Network Connectivity Test section of the Network page, click either Windows PowerShell or Linux, depending on the operating system of the computer from which you are testing the connection.

  2. Click Copy to copy the appropriate commands to your clipboard.

  3. On your computer, open PowerShell or the appropriate command line inferface, and paste and execute the commands.

  4. On the Network page, click Start Listener.

    You should see one of the messages below, depending on whether the test was successful or not:

    • Inbound network connection was successfully made from <IP Address> on port <Port Number>

    • No inbound connection was detected from <IP Address> on port <Port Number> within 15 seconds

    If the connection is successful, you should see CONNECTED to <Deployment Id> in <Port Number> in your command line interface.

    If the connection is not successful, it is likely to be a timing issue. Execute the commands in the command line interface and immediately start the listener. If you start the listener first, or wait too long before starting the listener, you may miss the 15-second window for the test.

Monitor Flow Logs

The VPC Flow Logs section of the Network page allows you to monitor the traffic coming in and out of this deployment. This allows you to confirm that your network configuration is correct, debug network issues, monitor traffic patterns, or identify unauthorized access attempts.

To view flow log entries:

  1. In the VPC Flow Logs section of the Network page, optionally filter the log by entering one or more of the following fields:

    • Actions — Choose ACCEPT to see only traffic that was permitted to flow from the source to the destination or REJECT to see only traffic that was blocked from reaching its intended destination.

    • Host IP — Type the IP address of either the source or destination.

    • Host Port — Type the port of either the source or destination.

  2. Enter the Start Time and End Time of the period of time you want to examine.

    The default window is the most recent 10 minutes. The maximum window is 30 minutes in duration.

  3. Click Find.

    Flow log entries matching the entered criteria are displayed.

  4. Optionally, click Load More to load more log entries.

    This button only appears if more log entries remain to be loaded.

Files Page (Deployment Level)

The Files page for a deployment allows you to transfer files from your desktop to that deployment. For example, you may want to transfer your SFTP key files to your deployment so you can use them in an interoperability production.

Note:

Do not confuse the tenant-level Files page with deployment-level Files pages. The tenant-level Files page lets you set up the SFTP feature for all of the deployments on your tenant. The deployment-level Files pages let you upload files from your local computer to a deployment.

Do not store key files in your GitLab repository, See Scanning Your GitLab Repository with TruffleHog for information on how to detect secrets that may be in your repository.

Transferring a file to your deployment is a two-step process. First, you upload the file from your desktop to an AWS S3 bucket. Then, the file is automatically synchronized from the bucket to your deployment. Files are scanned before being synced to your deployment and potentially malicious files are deleted for your protection.

To transfer files to your deployment:

  1. On the Files page, click Upload File, and select one or more files to upload.

    Files can be of any type, but they must be smaller than 20 MB.

  2. Type an optional description to identify the file (or files) you selected.

  3. Click Upload.

    The list of files on the page is updated with any files you uploaded.

    Potentially malicious files are blocked and flagged with the status THREATS_FOUND, and deleted is appended to the filename.

  4. Check the File Sync Jobs log to confirm that each file that passed the security scan is successfully synced to your deployment. (The Status column should say SUCCESS for that job.)

    You may need to click Refresh to update the status.

To use a file in an interoperability production, in the row for that file, click the Copy File Location icon in the Actions column. This copies the file path for that file to your clipboard. You can then paste the path where needed when you configure a business host.

In the case of SFTP key files you have created on the Files page for your tenant, the file location will look something like /connect/files/xyz-sftp-public-key.txt or /connect/files/xyz-sftp-private-key.txt. You will need to use this path when configuring your production.

If you no longer need a file, delete it by clicking the Delete File icon in the Actions column in the row for that file.

Tip:

To make it easier to find files after you have uploaded them, you can sort both the Files and File Sync Jobs tables by clicking the column headers, or filter either table by entering text in one of the Search boxes. For example, you can sort the Files table by Filename, or find all files with a particular file extension by typing the extension in the Search box.

Custom APIs Page

The Custom APIs page allows you to add a custom API to your Health Connect Cloud deployment and access it through a web gateway. You can create custom REST APIs and custom SOAP APIs.

To provide security, access to a custom API requires:

  • A firewall rule to allow traffic from a source CIDR block to the custom API.

  • A Connect User with the proper permissions to access the custom API.

  • A bearer token from the built-in Cognito instance to grant the Connect User access to the custom API, or an access token from an external authorization server, if you secure the custom API with OAuth 2.0.

  • A rate limit defined in the custom API security settings to limit the number of requests that can be sent to the custom API in a given period of time.

  • An allow list or deny list defined in the custom API security settings to further restrict the traffic that can reach the custom API.

  • Optionally, an mTLS (Mutual TLS) configuration to ensure a two-way authentication process before a connection is established.

Custom API Prerequisites

Before creating a custom API, complete the following prerequisite steps.

  1. On the Productions page, create a production and namespace to host the custom API.

  2. On the Firewall page, create firewall rules for ports 443, 9080, and 9443 to allow IP addresses in a given CIDR block to connect to the custom API.

  3. On the Connect Users page, create a Connect User you can use to connect to the custom API, and make sure the user has access to the production and namespace you created.

    A Connect User is not required for a custom API secured with OAuth 2.0.

  4. For a REST API, create a dispatch class to define the routes of the custom API and associate each with a method in the class.

  5. For a SOAP API, create a SOAP-enabled interface for the production. See Creating a Web Service in a ProductionOpens in a new tab for further details.

  6. If you are using mTLS, make sure you have the required certificates.

  7. If you are using OAuth 2.0, create a resource server on the OAuth 2.0 page. See Secure a Custom API with OAuth 2.0 for details.

Create a Dispatch Class (for REST APIs Only)

A custom REST API uses a dispatch class to define an endpoint and an accompanying REST API. The dispatch class defines all of the routes in the REST API and associates each with a method in the dispatch class.

From the System Management page, log in to the InterSystems IRIS Managed Service Management Portal.

In the namespace you created to host the custom API, create a dispatch class and check it in to source control. The dispatch class must extend %CSP.RESTOpens in a new tab. (For test purposes, you can create the class and upload it to the Management Portal (System Explorer > Classes > Import.)

The following sample class, Sample.RestApp, has three routes that all map to the class method Test(), which accepts up to two arguments.

Class Sample.RestApp Extends %CSP.REST
{

XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/test" Method="GET" Call="Test" Cors="true"/>
<Route Url="/test/:name" Method="GET" Call="Test" Cors="true"/>
<Route Url="/test/:name/:name2" Method="GET" Call="Test" Cors="true"/>
</Routes>
}

ClassMethod Test(name = "World", name2 = "") As %Status
{
    write "Hello ", name_" "_name2, "!<br/>", !
    quit 1
}

}

Certificates Needed for mTLS

Before setting up the optional mTLS configuration, make sure you have a Certificate Authority (CA) certificate containing the entire certificate chain and a client certificate signed by the CA.

If you need certificates for testing purposes you can create them with openssl using a procedure like the one below. This example was created on Linux.

First, create a private key (ca.key) for the root CA and a self-signed x.509 certificate (ca.crt) for the CA:

$ openssl genrsa -out ca.key 4096
$ openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 -out ca.crt -subj "/CN=MyTestRoot"

Then, create a private key (client.key) for the client, a certificate signing request (client.csr), and a client certificate (client.crt) that is signed by the root CA:

$ openssl genrsa -out client.key 2048
$ openssl req -new -key client.key -out client.csr -subj "/CN=MyTestClient"
$ openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt
Certificate request self-signature ok
subject=CN = MyTestClient

Finally, verify the client certificate to make sure it is properly signed by the CA:

$ openssl verify -CAfile ca.crt client.crt
client.crt: OK
Note:

The common names (CN) of the CA certificate and the client certificate must be different or validation will fail.

Upload the CA certificate to InterSystems IRIS Managed Service on the mTLS Client CAs tab of the Custom APIs page:

  1. On the mTLS Client CAs tab of the Custom APIs page, click Upload CA Cert.

  2. In the Upload Client CA Cert for mTLS dialog, in the Hostname Prefix box, type a prefix to distinguish requests that will be handled for the custom API with mTLS, for example, my-app.

    The prefix will be added to the base URL shown on the Custom APIs page in the Cloud Services Portal, for example, my-app.api.<deployment_id>.<server_name>.

  3. In the Client Certificate Authority Contents text box, copy and paste the contents of your ca.crt file.

  4. Click Save.

    Your CA will appear in the list on the mTLS Client CAs tab of the Custom APIs page.

After you create the custom API, send the client certificate and key along with each request to the custom API and InterSystems IRIS Managed Service will authenticate it against the CA. See Test a Custom API with mTLS for more information.

Create a Custom API

After performing the prerequisite steps and creating a dispatch class, you are ready to create your custom API, which includes a built-in web gateway to receive requests and direct them to your custom API.

  1. On the Custom APIs tab of the Custom APIs page, enable the Custom API feature, if it is not already enabled, by moving the Enable slider to the right.

    It will take a few seconds for the feature to be enabled.

  2. On the Custom APIs tab, click Create Custom API.

  3. On the Create Custom API dialog:

    1. Type the Custom API Name.

      This is the path representing the endpoint of your REST API, for example, /hcc/api.

      Important:

      The path you specify must not start with the following prefixes, as errors could occur: /api, /csp, /cloud, /isc, /ui.

    2. For Service Type, select either REST or SOAP.

    3. Check the Enabled box to enable the custom API.

    4. Select the Namespace you created to host the custom API.

    5. If this is a REST API, type the name of the Dispatch Class you created, for example, Sample.RestApp.

    6. Under Security Settings, type the Rate Limit Count and the Rate Limit Time Window for your custom API.

      For example, entering 1000 and 10 for these settings, respectively, means that you are limiting the number of API requests allowed through the web gateway to 1,000 in a 10-second window.

    7. Select an IP Restrict Mode:

      • None means allow requests from all IP addresses.

      • Allow means allow requests only from the IP addresses and CIDR blocks on the Allow List.

      • Deny means deny requests only from the IP addresses and CIDR blocks on the Deny List.

    8. If applicable, on the Allow List or Deny List, type single IP addresses or CIDR blocks, one per line.

      See the text box for examples.

    9. In the mTLS Client CA drop-down list, select the hostname prefix associated with a CA certificate you uploaded earlier.

      If you are not using mTLS, select None.

    10. To secure the custom API with OAuth 2.0, select the OAuth2 checkbox, and select a resource server in the OAuth2 Resource Server drop-down list. (Optional)

      See Secure a Custom API with OAuth 2.0.

    11. Click Save.

The custom API now appears in the list at the top of the screen.

Use the icons in the Actions column of the list to edit the settings for a custom API or to delete a custom API.

Before using the custom API, go to the Connect Users page and give your Connect User access to the custom API. This step is not needed for a custom API secured with OAuth 2.0.

Note:

If you are no longer using any custom APIs, slide the Enable slider to the left to disable all custom APIs. Any existing custom APIs are hidden on the page, but they are not deleted and will be displayed again if you re-enable custom APIs.

Test a Custom REST API

Using a custom REST API can be broken down into two parts, represented by the following HTTP requests.

The first request is sent to the built-in Cognito instance to authenticate the user and obtain a bearer token:

POST / HTTP/2 
Host: cognito-idp.<aws_region>.amazonaws.com 
x-amz-target: AWSCognitoIdentityProviderService.InitiateAuth 
content-type: application/x-amz-json-1.1 

Once the bearer token is received, it can be used to make subsequent requests to the custom REST API:

GET /hcc/api/test/<arg1>/<arg2> HTTP/2 
Host: api.<deployment_id>.<server_name>:9443 
authorization: Bearer ******

The above GET request uses the custom API name you chose when you created your custom API (in this case, /hcc/api) and the sample dispatch class shown above.

The section below gives an example of how to test your custom REST API from the command line. If you use an API client, such as Postman, you can use it for testing, as well.

Before testing a custom API, go to the Connect Users page and give your Connect User access to the custom API.

Test a Custom REST API from the Command Line

The following example demonstrates how to test a custom REST API from the command line, using curl. It is an annotated version of the one shown on the Help tab of the Custom APIs page in the Cloud Services Portal. On the Help tab, select your custom API from the drop-down at the top of the page to enable easier copy and paste from the displayed content.

The example uses jq to make the handling of JSON objects easier. If you don’t have jq, you can download it from https://github.com/jqlangOpens in a new tab.

Perform this workflow from a POSIX-compliant shell.

Make sure shell is POSIX compliant:

$ echo "$SHELLOPTS" | grep -o posix
posix

Set a variable to the cognitoClientId shown on the Help tab of the Custom APIs page in the Cloud Services Portal.

$ connectClientId=<cognitoClientId>

Set variables to hold the username and password of your Connect User:

$ connectUsername=<username>

$ connectPassword=<password>

Set a variable to the custom API name you chose when you created your custom API:

$ customApiName=/hcc/api

Use jq to format the body of the request to be sent to Cognito. The arguments in the jq command are passed into the body of the JSON string of the request. The line below is broken for readability.

$ BODY=$(jq -n --arg user "$connectUsername" --arg pwd "$connectPassword" --arg clientId "$connectClientId" \
'{"AuthParameters":{"USERNAME":$user,"PASSWORD":$pwd},"AuthFlow":"USER_PASSWORD_AUTH","ClientId":$clientId}')

Confirm that the JSON string of the body looks good:

$ printf "%s\n" "$BODY"
{
  "AuthParameters": {
    "USERNAME": "<connectUsername>",
    "PASSWORD": "<connectPassword>"
  },
  "AuthFlow": "USER_PASSWORD_AUTH",
  "ClientId": "<connectClientId>"
}

Send the authentication request to Cognito. The <aws_region> in the URL (for example, us-east-2) is shown in the example on the Help tab of the Custom APIs page in the Cloud Services Portal. The line below is broken for readability.

$ RESPONSE=$(curl -X POST --data "$BODY" -H 'X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth' \
-H 'Content-Type: application/x-amz-json-1.1' https://cognito-idp.<aws_region>.amazonaws.com/)

Verify that the response looks good. The following JSON string is formatted for readability.

$ echo $RESPONSE
{
  "AuthenticationResult": {
    "AccessToken": "******",
    "ExpiresIn": 3600,
    "IdToken": "******",
    "RefreshToken": "******",
    "TokenType": "Bearer"
  },
  "ChallengeParameters": {}
}

Use jq to extract the access token from the response:

$ ACCESS_TOKEN=$(echo $RESPONSE | jq -r ".AuthenticationResult.AccessToken")
Note:

Make sure to use the access token for all of your requests. If you use the ID token for the request instead of the access token, a 401 status code is returned.

Send a request to the custom API. This example uses the dispatch class above . The <base_url> is the customApiBaseURL shown on the Help tab of the Custom APIs page in the Cloud Services Portal and takes the form https://api.<deployment_id>.<server_name>. The variable $customApiName is the one set near the start of this example.

The client must also have the server’s CA certificate in its certificate store. For testing purposes, this cert can be downloaded and then included with the request (--cacert <server_ca>, in the example below).

$ curl -H "Authorization: Bearer $ACCESS_TOKEN" -vv <base_url>:9443${customApiName}/test/my/friend --cacert <server_ca>

The verbose option (-vv) allows you to see the entire handshake, which can be useful for debugging your configuration.

The response to the request, minus the handshake, is as follows:

Hello my friend !

Test a Custom REST API with mTLS

Sending a request to a custom REST API that uses mTLS is the same as for regular custom REST APIs, with the following differences:

  • The hostname prefix is added to the base URL, so requests are sent to <hostname_prefix>.api.<deployment_id>.<server_name>, instead of api.<deployment_id>.<server_name>, where <hostname_prefix> is the prefix you specified when you uploaded the CA certificate associated with this custom API.

  • The client certificate (--cert client.crt, in the example below) and client private key (--key client.key) are sent with the request.

  • The client must also have the server’s CA certificate in its certificate store. For testing purposes, this cert can be downloaded and then included with the request (--cacert <server_ca>, in the example below).

For more information, see Certificates Needed for mTLS.

Before sending your request to the custom API, set a variable to hold the hostname prefix. If the hostname prefix were my-app, the command would like this:

$ customApiHostPrefix=my-app

If the custom API in the example above were created with mTLS, a request to the custom API might look something like:

$ curl -H "Authorization: Bearer $ACCESS_TOKEN" -vv --cert client.crt --key client.key  --cacert <server_ca> \
https://${customApiHostPrefix}.<base_url>:9443${customApiName}/test/my/friend

Again, the verbose option (-vv) allows you to see the entire handshake, which can be useful for debugging your configuration.

The response to the request, minus the handshake, is again as follows:

Hello my friend !

Test a Custom SOAP API

Using a custom SOAP API can be broken down into two parts, represented by the following HTTP requests.

The first request is the same as for a custom REST API and is sent to the built-in Cognito instance to authenticate the user and obtain a bearer token:

POST / HTTP/2 
Host: cognito-idp.<aws_region>.amazonaws.com 
x-amz-target: AWSCognitoIdentityProviderService.InitiateAuth 
content-type: application/x-amz-json-1.1 

Once the bearer token is received, it can be used to make subsequent requests to the custom SOAP API:

POST /hcc/api/HCC.service.TestSoapSrv.cls HTTP/2
Host: api.<deployment_id>.<server_name>:9443 
authorization: Bearer ******
content-type: text/xml; charset=utf-8
soapaction: "http://www.example.com/HCC.service.TestSoapSrv.test"

The above POST request uses the custom API name you chose when you created your custom API (in this case, /hcc/api) and the class name of the Business Service of the SOAP-enabled production, in this case HCC.service.TestSoapSrv.cls. The SOAPAction identifies the namespace and operation name of the API. In this example, the operation name is the class name and method name that will handle the request.

The above example uses a production, represented by Production.cls, that has a simple SOAP-enabled interface:

Class HCC.Connect.Production Extends Ens.Production
{

XData ProductionDefinition
{
<Production Name="HCC.Connect.Production" LogGeneralTraceEvents="false">
  <Description>Health Connect Cloud Base Production</Description>
  <ActorPoolSize>1</ActorPoolSize>
  <Item Name="Ens.Activity.Operation.Local" Category="" ClassName="Ens.Activity.Operation.Local" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
  </Item>
  <Item Name="Ens.Enterprise.MsgBankOperation" Category="" ClassName="Ens.Enterprise.MsgBankOperation" PoolSize="1" Enabled="true" Foreground="false" Comment="Health Connect Cloud Message Bank" LogTraceEvents="false" Schedule="">
    <Setting Target="Adapter" Name="IPAddress">bank</Setting>
  </Item>
  <Item Name="HCC.service.TestSoapSrv" Category="" ClassName="HCC.service.TestSoapSrv" PoolSize="0" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
  </Item>
</Production>
}

}

The item HCC.service.TestSoapSrv represents this interface, and is defined by the class HCC.service.TestSoapSrv.cls:

Class HCC.service.TestSoapSrv Extends EnsLib.SOAP.Service
{

Parameter ADAPTER;

Parameter NAMESPACE = "http://www.example.com";

Parameter SERVICENAME = "TestSoapService";

/// Description
Method test() As HCC.service.TestSoapResp [ WebMethod ]
{
    set resp = ##Class(HCC.service.TestSoapResp).%New()
    set resp.Value = "test service response value"
    return resp
}

It uses the following SOAP response class, TestSoapResp.cls, to return a simple string value:

Class HCC.service.TestSoapResp Extends (%RegisteredObject, %XML.Adaptor)
{

/// Test SOAP response value
Property Value As %String;

}

Create any classes required for your production’s web service in the namespace you created to host the custom API. The business service class for your SOAP-enabled interface must extend EnsLib.SOAP.ServiceOpens in a new tab. Check your class files in to source control. (For test purposes, you can upload your classes to the Management Portal (System Explorer > Classes > Import.)

For details on how to create a production with a SOAP-enabled interface, see Creating a Web Service in a ProductionOpens in a new tab.

Before testing a custom SOAP API, make sure your production is running. (In the Management Portal, Interoperability > Configure > Production.)

The section below gives an example of how to test your custom SOAP API from the command line. If you use an API client, such as Postman, you can use it for testing, as well.

Before testing a custom API, go to the Connect Users page and give your Connect User access to the custom API.

Test a Custom SOAP API from the Command Line

The following example demonstrates how to test a custom SOAP API from the command line, using curl.

The procedure for obtaining a bearer token is the same as for REST APIs.

Once you have obtained your token, you can send a request to the custom SOAP API.

In the example below, the <base_url> is the customApiBaseURL shown on the Help tab of the Custom APIs page in the Cloud Services Portal and takes the form https://api.<deployment_id>.<server_name>. The variable $customApiName is the one set near the start of the REST APIs example.

The client must also have the server’s CA certificate in its certificate store. For testing purposes, this cert can be downloaded and then included with the request (--cacert <server_ca>, in the example below).

$ curl -H "Authorization: Bearer $ACCESS_TOKEN" -vv \
-H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction: \"http://www.example.com/HCC.service.TestSoapSrv.test\"" \
-d @request.xml
https:/<base_url>:9443${customApiName}/HCC.service.TestSoapSrv.cls \
--cacert <server_ca>

The -d flag indicates the file (in this example, request.xml) containing the request in SOAP format:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <s0:test xmlns:s0="http://www.example.com"/>
    </soap:Body>
</soap:Envelope>

The verbose option (-vv) allows you to see the entire handshake, which can be useful for debugging your configuration.

The response to the request, minus the handshake, is a SOAP message, for example:

<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:s='http://www.w3.org/2001/XMLSchema'>
  <SOAP-ENV:Body><testResponse xmlns="http://www.example.com"><testResult><Value>test service response value</Value></testResult></testResponse></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Test a Custom SOAP API with mTLS

Sending a request to a custom SOAP API that uses mTLS is the same as for regular custom SOAP APIs, with the following differences:

  • The hostname prefix is added to the base URL, so requests are sent to <hostname_prefix>.api.<deployment_id>.<server_name>, instead of api.<deployment_id>.<server_name>, where <hostname_prefix> is the prefix you specified when you uploaded the CA certificate associated with this custom API.

  • The client certificate (--cert client.crt, in the example below) and client private key (--key client.key) are sent with the request.

  • The client must also have the server’s CA certificate in its certificate store. For testing purposes, this cert can be downloaded and then included with the request (--cacert <server_ca>, in the example below).

For more information, see Certificates Needed for mTLS.

Before sending your request to the custom API, set a variable to hold the hostname prefix. If the hostname prefix were my-app, the command would like this:

$ customApiHostPrefix=my-app

If the custom API in the example above were created with mTLS, a request to the custom API might look something like:

$ curl -H "Authorization: Bearer $ACCESS_TOKEN" -vv \
-H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction: \"http://www.example.com/HCC.service.TestSoapSrv.test\"" \
-d @request.xml
https:/${customApiHostPrefix}.<base_url>:9443${customApiName}/HCC.service.TestSoapSrv.cls \
--cert client.crt --key client.key  --cacert <server_ca> 

Again, the verbose option (-vv) allows you to see the entire handshake, which can be useful for debugging your configuration.

The response to the request, minus the handshake, is again as follows:

<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:s='http://www.w3.org/2001/XMLSchema'>
  <SOAP-ENV:Body><testResponse xmlns="http://www.example.com"><testResult><Value>test service response value</Value></testResult></testResponse></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Create a Deployment Metrics Custom REST API

Your deployment comes with a built-in dispatch class that returns interoperability, storage, and other metrics. This class can be used to create a custom REST API and is available from any namespace. The custom API can also be used for testing purposes.

To monitor deployment metrics, create a custom API, giving it a custom API name of your choosing (for example, /hcc/monitor) and using the built-in dispatch class ISCCD.RestMetrics.

The route for this custom API is /metrics, so if you created the custom API with the custom API name /hcc/monitor, you would test the custom API by sending requests to the URL below.

<base_url>:9443/hcc/monitor/metrics

The <base_url> is the customApiBaseURL shown on the Custom APIs page in the Cloud Services Portal and takes the form https://api.<deployment_id>.<server_name>.

To filter metrics by namespace, use:

<base_url>:9443/hcc/monitor/metrics/<namespace>

The <namespace> is not case sensitive.

Note:

The dispatch class ISCCD.RestMetrics is provided in deployed modeOpens in a new tab, meaning you cannot view its source code.

For more information on the Deployment Metrics Custom API, including Swagger documentation, see the Dispatch Classes section on the Help tab of the Custom APIs page.

Secure a Custom API with OAuth 2.0

Instead of using a bearer token from the built-in Cognito instance, you can secure a custom API using OAuth 2.0 and an external authorization server of your choice.

This section describes the machine-to-machine scenario, in which a client application calls a custom API without any interactive user login. In this scenario:

  1. The client application requests an access token from the authorization server, using the OAuth 2.0 client credentials grant type. The client application authenticates with its own client ID and client secret.

  2. The authorization server issues a signed access token in the form of a JSON web token (JWT).

  3. The client application sends a request to the custom API, including the access token as a bearer token in the Authorization header of the request.

  4. Your deployment validates the access token, checking its signature, issuer, audience, expiration, and scope. If the token is valid, the request is passed to the custom API. Otherwise, the request is rejected.

You do not need a Connect User to access a custom API secured with OAuth 2.0, and you do not need a client configuration on the OAuth 2.0 page.

To secure a custom API using OAuth 2.0:

  1. Complete the prerequisites.

  2. Create a resource server on the OAuth 2.0 page. In the Audiences box, enter the identifier of your custom API, as registered on your authorization server.

  3. Enable OAuth 2.0 for the custom API.

  4. Test the custom API.

Prerequisites for Securing a Custom API with OAuth 2.0

Before securing a custom API using OAuth 2.0, complete the following prerequisite steps:

  1. On your authorization server, register your custom API as an API or resource, and note its identifier.

    The access tokens issued for the custom API contain this identifier in their audience (aud) claim. The details of this step depend on your authorization server.

  2. On your authorization server, define any scopes that a client application must have to access the custom API. (Optional)

  3. On your authorization server, register the client application as a machine-to-machine application that uses the client credentials grant type. Authorize the client application to access your custom API, and grant it any scopes you defined.

    If the client application is not authorized to access your custom API, the authorization server refuses to issue it an access token. The authorization server provides a client ID and client secret for the client application. The client application uses these to request access tokens. You do not enter them in the Cloud Services Portal.

  4. Complete the OAuth 2.0 prerequisites.

  5. Complete the custom API prerequisites and create the custom API, if you have not already done so.

    You can skip the prerequisite step of creating a Connect User. You can also enable OAuth 2.0 when you create the custom API, after you have created a resource server.

Enable OAuth 2.0 for a Custom API

After you have created a resource server, follow the steps below to secure a custom API with it:

  1. On the Custom APIs tab of the Custom APIs page, click the edit icon in the Actions column for the custom API.

    Alternatively, if you are creating a new custom API, click Create Custom API and fill in the settings as described in Create a Custom API.

  2. In the dialog, select the OAuth2 checkbox.

  3. In the OAuth2 Resource Server drop-down list, select the resource server you created. (Required)

  4. Click Save.

    In the list of custom APIs, the Authentication column shows OAuth2: followed by the name of the resource server.

The custom API now requires an access token issued by your authorization server, rather than a bearer token from the built-in Cognito instance. You do not need to give a Connect User access to the custom API.

Each custom API can use only one resource server, but you can use the same resource server for any number of custom APIs.

To return to using Cognito bearer tokens, edit the custom API and clear the OAuth2 checkbox.

Test a Custom API Secured with OAuth 2.0

The easiest way to test your OAuth 2.0 configuration is with a deployment metrics custom REST API, which uses the built-in ISCCD.RestMetrics dispatch class and requires no code of your own. The example below assumes that you created this custom API with the custom API name /hcc/monitor and enabled OAuth 2.0 for it.

Testing a custom REST API secured with OAuth 2.0 is similar to the procedure described in Test a Custom REST API from the Command Line, except that you obtain the access token from your authorization server instead of from the built-in Cognito instance.

To obtain an access token, send a request to the token endpoint of your authorization server, using the client ID and client secret of the client application. You can find the token endpoint by clicking the edit icon for the authorization server in the Server Definitions table on the OAuth 2.0 page.

The exact form of the request depends on your authorization server. For example, Auth0 requires an audience parameter containing the identifier of your custom API. A request to Auth0 using curl looks like the following. The --data-urlencode option makes sure that any special characters in the client secret are sent correctly. The line below is broken for readability.

$ RESPONSE=$(curl -X POST <token_endpoint> --data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<client_id>' --data-urlencode 'client_secret=<client_secret>' --data-urlencode 'audience=<audience>')

Use jq to extract the access token from the response:

$ ACCESS_TOKEN=$(echo $RESPONSE | jq -r ".access_token")

Then send a request to the /metrics route of the custom API, including the access token as a bearer token. The <base_url> and <server_ca> are the same as in Test a Custom REST API from the Command Line.

$ curl -H "Authorization: Bearer $ACCESS_TOKEN" -vv <base_url>:9443/hcc/monitor/metrics --cacert <server_ca>

If the request is successful, the response contains the metrics for your deployment.

If the request does not include a valid access token, or if the access token does not grant the required scope, a 401 status code is returned.

Swagger Specifications for Custom REST APIs

Swagger specifications are automatically generated when you create a custom REST API. To see the Swagger specification, in the Actions column in the row for your REST API, click the View Swagger Spec icon. The spec opens in a popup window and shows information such as the:

  • Base URL

  • API endpoints

  • Expected parameters and possible responses for each endpoint

The View Swagger Spec icon is disabled for custom SOAP APIs.

Custom API Logs and Metrics

The Logs and Metrics tab of the Custom APIs page lets you view metrics and access logs for a particular custom API over a given time period. The Metrics section shows you the number of total requests received by the custom API during that time period and gives a breakdown of the total by HTTP status code. The Logs section shows you a list of the requests received by the custom API during the time period. For each request, the log shows the:

  • timestamp (in UTC)

  • IP Address of the client making the request

  • HTTP status code (for example, 200 for success or 401 for unauthorized)

  • method (for example, GET or PUT)

  • URI, including any query parameters (for example, /hcc/api/test/my/friend)

An entry is only shown in the access log if the custom API received the request. If a valid endpoint is used, but the custom API does not accept the connection, no log entry is displayed (for example, if you configure the custom API to use mTLS, and the mTLS connection does not succeed).

To request metrics and logs for a custom API:

  1. On the Custom APIs page, click the Logs and Metrics tab.

  2. In the Search section of the page:

    1. In the Custom API drop-down, select a custom API.

    2. Specify a Start Time and End Time of the time period for which you want to view metrics and logs (in UTC).

    3. Optionally, filter the search by Status Code, Client IP, and/or URI Prefix.

    4. Click Search.

The search results appear in the Metrics and Custom API Logs sections of the page.

Use a DNS Alias with a Custom API

If you are using DNS aliases, you can use an alias instead of the default base URL when calling a custom API.

For example, you can use

https://<deployment_alias>.<tenant_alias>.<portal_domain>

instead of

https://api.<deployment_id>.<server_name>

Any DNS aliases defined for the deployments in your tenant are listed on the DNS Aliases page of the Cloud Services Portal. See the FQDN column in the list of aliases for the exact value to use when calling your custom API. For more information, see DNS Aliases PageOpens in a new tab.

Custom Packages Page

The Custom Packages page allows you to manage any third-party packages that you want to use with your deployment. The page shows you a list of all of the available packages and which ones you have installed. Installed packages are indicated with a check mark and are highlighted in green.

To install or remove packages:

  1. Select any uninstalled packages from the list that you want to install, and deselect any installed packages you want to remove.

    These packages now appear under Staged Changes, marked as either Pending Install or Pending Removal.

  2. Click Save to save your changes.

    The packages are now marked Needs Deployment.

  3. Click Deploy to deploy your saved changes.

    All saved changes are deployed, and the list of packages is updated to reflect your changes.

    It can take a few minutes for all of the changes to be deployed.

Note:

While most custom packages only need to be installed once per deployment, 7zip is installed for all existing productions. If you create a new production, and you want to use 7zip with that production, you need to remove 7zip on the Custom Packages page and install it again.

X.509 Credentials Page

The X.509 Credentials page allows you to create, edit, and delete X.509 credentials. You can think of an X.509 credential as a container for X.509 certificates. It is sometimes referred to as a credential set.

There are two general scenarios for using X.509 credentials:

  • You own the certificate. In this case, you also have the private key. You use this certificate at the following times:

    • When you sign outbound messages (if you also load the private key file).

    • When you decrypt messages that were encrypted with your public key.

  • You do not own the certificate. In this case, you obtained it from its owner and you do not have the private key file. You use this certificate at the following times:

    • When you encrypt messages that you send to the owner of the certificate.

    • When you validate digital signatures created by the owner of the certificate.

X.509 Prerequisites

Before creating an X.509 credential, make sure you have the following:

  • A personal X.509 certificate, in PEM-encoded X.509 format.

    This can be either your own certificate or a certificate obtained from an entity with which you expect to exchange messages.

  • An associated private key, in PEM-encoded PKCS#1 format. (Optional)

    This is applicable only if you own the certificate. If you do not want to sign outbound messages, you do not need to load the private key file.

  • A file containing root certificates, that is, trusted CA (certificate authority) X.509 certificates in PEM-encoded format, for use with this credential set. (Optional)

Upload these files to the server using the deployment-level Files page.

Create an X.509 Credential

After you have obtained and uploaded your X.509 certificate, private key (optional), and root certificate file (optional), following the steps below to create an X.509 credential:

  1. On the X.509 Credentials page, click Create X.509 Credential.

  2. On the dialog, in the Alias box, type a unique, case-sensitive string that identifies this credential set. (Required)

  3. In the File Containing X.509 Certificate box, select your X.509 certificate file. (Required)

    If you do not see your certificate in the list, make sure you have uploaded it using the deployment-level Files page.

  4. In the File Containing Associated Private Key box, select the private key file associated with the X.509 certificate. (Optional)

    If you do not see your private key file in the list, make sure you have uploaded it using the deployment-level Files page.

  5. If you are using a private key, type your Private Key Password and confirm it.

    If you do not specify the password and your key is encrypted, you will have to provide it when you retrieve the credential set.

    The password and confirmation fields only appear if you are using a private key.

  6. In the File Containing Trusted CA X.509 Certificate box, select the file containing the X.509 certificates of any CAs trusted by this credential set. (Optional)

    If you do not see your CA X.509 certificate file in the list, make sure you have uploaded it using the deployment-level Files page.

  7. In the Authorized User(s) box, enter a list of InterSystems IRIS users (Connect Users) who are authorized to use this credential set. (Optional)

    Use tabs to separate each user in the list.

    If this property is null, any user can use this credential set.

  8. In the Intended Peer(s) box, enter the DNS names of systems where the credential set can be used. (Optional)

    Use tabs to separate each DNS name in the list.

  9. Click Create X.509 Credential.

    The credential set appears in the list of X.509 Credentials.

Edit an X.509 Credential

To edit an X.509 credential:

  1. On the X.509 Credentials page, click the Edit X.509 Credential icon in the Actions column for that credential set.

    Only the following fields are editable: File Containing Trusted CA X.509 Certificate, Authorized User(s), and Intended Peer(s). See Create an X.509 Credential for details on these fields.

  2. After making the desired changes, click Save.

    The credential set is updated with your changes.

Delete an X.509 Credential

To delete an X.509 credential:

  1. On the X.509 Credentials page, click the Delete X.509 Credential icon in the Actions column for that credential set.

  2. In the dialog box, type Permanently Delete, and click Delete.

    The credential set is removed from the X.509 credentials list.

OAuth 2.0 Page

The OAuth 2.0 authorization framework enables an application (generally known as a client) to use an authorization server to obtain limited access to an HTTP service (a resource). The access is limited; the client can obtain only specific information or can use only specific services.

OAuth 2.0 involves the following roles:

  • Authorization server—Issues access tokens to clients. With Health Connect Cloud, the authorization server is an external service of your choice. It is sometimes referred to as an identity provider (IdP).

  • Client—An application that obtains an access token from the authorization server and uses it to access a resource server.

  • Resource server—Hosts protected resources and accepts requests that include a valid access token.

The OAuth 2.0 page allows you to configure your deployment to act as a resource server, a client, or both. It contains the following tables:

  • Client Configurations—Configurations that allow your deployment to act as a client of an authorization server. See Client Configurations.

  • Server Definitions—Authorization servers whose details have been retrieved by your deployment using discovery. See Server Definitions.

  • Resource Servers—Configurations that allow your deployment to act as a resource server, validating the access tokens sent to it. See Resource Servers.

For example, to secure a custom API so that client applications must present an access token from your authorization server, create a resource server and assign it to the custom API. See Secure a Custom API with OAuth 2.0.

OAuth 2.0 Prerequisites

Before using the OAuth 2.0 page, complete the following prerequisite steps:

  1. Note the issuer endpoint of your authorization server, for example, https://my-tenant.us.auth0.com/.

    The authorization server must support OpenID Connect discovery, that is, it must publish its configuration details (metadata) at /.well-known/openid-configuration under its issuer endpoint, so that your deployment can retrieve them.

  2. On the SSL/TLS Configurations page, create a client SSL/TLS configuration.

    Your deployment uses this configuration to communicate with the authorization server. You do not need a client certificate. However, for Certificate Verification, select Required and upload a file containing the trusted CA certificates that cover the certificate of your authorization server. Otherwise, your deployment does not verify the identity of the authorization server.

Server Definitions

A server definition contains the details of an authorization server, such as its token endpoint and the public keys it uses to sign access tokens. You do not create server definitions directly. Instead, your deployment creates a server definition when you discover an authorization server while creating a resource server or a client configuration.

Discover an Authorization Server

When you create a resource server or a client configuration, you can discover a new authorization server from the dialog, as described in those procedures. In both cases, you specify:

  • Issuer Endpoint—The issuer endpoint of your authorization server. (Required)

  • TLS Configuration—The client SSL/TLS configuration your deployment uses to communicate with the authorization server. (Required)

When you click Discover, your deployment retrieves the metadata of the authorization server and adds a server definition for it to the Server Definitions table. You can then use the same server definition for other resource servers and client configurations.

The server definition is created as soon as you click Discover, even if you then cancel the dialog. You may need to click Refresh to see it in the Server Definitions table.

View or Edit a Server Definition

To view or edit a server definition:

  1. On the OAuth 2.0 page, click the edit icon in the Actions column for the authorization server in the Server Definitions table.

    The Edit OAuth Server dialog shows the endpoints of the authorization server that were retrieved using discovery. You can change the Authorization Endpoint and Token Endpoint.

  2. To see all the metadata retrieved from the authorization server, select the Show Full Metadata checkbox. (Optional)

    The metadata is for display only.

  3. If you made any changes, click Save. Otherwise, click Cancel.

Delete a Server Definition

To delete a server definition:

  1. On the OAuth 2.0 page, click the delete icon in the Actions column for the authorization server in the Server Definitions table.

  2. In the dialog box, type Permanently Delete, and click Delete.

    The server definition is removed from the Server Definitions table.

Note:

You cannot delete a server definition if any resource servers or client configurations use it. On the OAuth 2.0 page, delete the resource servers and client configurations that use the server definition, or edit the resource servers to select a different server definition, and then delete the server definition.

Resource Servers

A resource server validates the access tokens sent to your deployment. For example, resource servers can be used to secure custom APIs. For a complete walkthrough, see Secure a Custom API with OAuth 2.0.

Create a Resource Server

After you have completed the prerequisite steps, follow the steps below to create a resource server:

  1. On the OAuth 2.0 page, in the header of the Resource Servers table, click New.

  2. In the Create OAuth2 Resource Server dialog, in the Name box, type a unique name for the resource server. (Required)

  3. In the Description box, type a description of the resource server. (Optional)

  4. Make sure the Enabled checkbox is selected.

  5. If no server definitions exist yet, discover the authorization server that issues the access tokens:

    1. In the Issuer Endpoint box, type the issuer endpoint of your authorization server. (Required)

    2. In the TLS Configuration drop-down list, select your client SSL/TLS configuration. (Required)

    3. Click Discover.

      Your deployment adds a server definition for the authorization server to the Server Definitions table. In the dialog, the discovery fields are replaced by a Server Definition drop-down list, with the new server definition selected.

  6. If one or more server definitions already exist, in the Server Definition drop-down list, select the issuer endpoint of your authorization server. (Required)

    To discover an additional authorization server, select New... from the drop-down list.

  7. In the Audiences box, type or paste the identifier of the API, as registered on your authorization server, and press Enter. (Required)

    You can also press Tab or click outside the box. To add another audience, type or paste it in the box in the same way.

    An access token is accepted only if its audience (aud) claim matches at least one of the audiences you specify.

  8. In the Required Scope drop-down list, select one of the following: (Optional)

    • Custom...: Require a custom scope. In the Custom Scope box that appears, type the scope an access token must grant (for example, api:read).

    • None: Do not require a scope. Any access token that meets the audience requirement is accepted.

    • A scope from the list: Choose from the list of the scopes supported by the authorization server, as retrieved using discovery. If an access token does not grant the selected scope, the request is rejected.

  9. Under Access Token Validation, make sure the JWT checkbox is selected.

    This option validates access tokens locally, using the public keys published by the authorization server.

  10. Make sure the Custom Authorizer checkbox is cleared.

    Without a custom authorizer, any valid access token that meets the audience and scope requirements is accepted.

  11. Click Save.

    The resource server appears in the Resource Servers table. You may need to click Refresh to see it.

Edit a Resource Server

To edit a resource server:

  1. On the OAuth 2.0 page, click the edit icon in the Actions column for the resource server in the Resource Servers table.

    You can edit all fields except Name. In the Server Definition drop-down list, you can select any existing server definition, but you cannot discover a new one. See Create a Resource Server for details on the fields.

  2. After making the desired changes, click Save.

Delete a Resource Server

To delete a resource server:

  1. On the OAuth 2.0 page, click the delete icon in the Actions column for the resource server in the Resource Servers table.

  2. In the dialog box, type Permanently Delete, and click Delete.

    The resource server is removed from the Resource Servers table.

Note:

You cannot delete a resource server if any custom APIs use it. On the Custom APIs tab of the Custom APIs page, check the Authentication column to find the custom APIs that use the resource server. Edit each of those custom APIs to clear the OAuth2 checkbox or select a different resource server, and then delete the resource server.

Client Configurations

A client configuration allows your deployment to act as an OAuth 2.0 client. Your deployment uses the client configuration to obtain access tokens from an authorization server, so that it can access resources protected by OAuth 2.0, such as an external API.

Client configurations can be used with some interoperability adapters, for example, in a business operation that calls an external API protected by OAuth 2.0.

The procedures below describe a client configuration that uses the client credentials grant type, in which your deployment authenticates with its own client ID and client secret, without any interactive user login.

Client Configuration Prerequisites

Before creating a client configuration, complete the OAuth 2.0 prerequisites, and then:

  1. On your authorization server, register your deployment as a machine-to-machine application that uses the client credentials grant type, and authorize it to access the API you want to call.

    The authorization server provides a client ID and client secret for your deployment. You enter these when you create the client configuration.

  2. Find out which methods your authorization server supports for authenticating clients at its token endpoint, such as client_secret_basic or client_secret_post.

    After you discover the authorization server, you can find these methods in the token_endpoint_auth_methods_supported property of its server definition.

Create a Client Configuration

After you have completed the prerequisite steps, follow the steps below to create a client configuration:

  1. On the OAuth 2.0 page, in the header of the Client Configurations table, click New.

  2. In the Create OAuth Client Configuration dialog, in the Issuer Endpoint box, select the issuer endpoint of an existing server definition, or type the issuer endpoint of a new authorization server. (Required)

  3. In the TLS Configuration drop-down list, select your client SSL/TLS configuration. (Required)

  4. Click Discover.

    If this is a new authorization server, your deployment adds a server definition for it to the Server Definitions table. The dialog then displays the General, JWT Settings, and Client Credentials tabs.

    To use a different authorization server, click Change Issuer. The dialog returns to the Issuer Endpoint and TLS Configuration fields, where you can select or discover a different authorization server. You then need to enter the values on the tabs again, so make sure you have the right authorization server before you fill in the tabs.

  5. On the General tab, specify the following details:

    1. In the Application Name box, type a unique name for the client configuration. (Required)

      You cannot change the application name after you create the client configuration.

    2. In the Client Name box, type a name for the client. (Required)

      You cannot change the client name after you create the client configuration.

    3. In the Description box, type a description of the client configuration. (Optional)

    4. Make sure the Enabled checkbox is selected.

    5. For Client Type, select Confidential. (Required)

    6. Leave the Redirect Host, Redirect Port, Redirect Prefix, and Redirect TLS fields as they are.

      The Redirect Host box contains the host name of your deployment by default. The redirect fields are not used with the client credentials grant type.

    7. For Required Grant Types, select Client Credentials. (Required)

    8. For Authentication Type, select the method your deployment uses to authenticate at the token endpoint of the authorization server: (Required)

      • Basic—Sends the client ID and client secret in the HTTP Authorization header. Corresponds to client_secret_basic.

      • Form Encoded Body—Sends the client ID and client secret in the body of the request. Corresponds to client_secret_post.

  6. On the JWT Settings tab, leave the default settings.

    JWT settings are typically needed only if the client performs token introspection, which is not described here.

  7. On the Client Credentials tab, specify the following details:

    1. In the Client ID box, type or paste the client ID provided by the authorization server. (Required)

    2. In the Client Secret box, type or paste the client secret provided by the authorization server, and type it again in the Client Secret (Confirm) box. (Required)

      The client secret boxes are displayed only if you selected Confidential for Client Type on the General tab.

    3. Leave the Client Secret Expires At and Client ID Issued At boxes empty.

  8. Click Save (Manual Registration).

    The client configuration appears in the Client Configurations table. You may need to click Refresh to see it.

Edit a Client Configuration

To edit a client configuration:

  1. On the OAuth 2.0 page, click the edit icon in the Actions column for the client configuration in the Client Configurations table.

    You can edit all fields except Issuer Endpoint, Application Name, and Client Name. See Create a Client Configuration for details on the fields.

  2. To change the client secret, on the Client Credentials tab, select Enter a new client secret, and then type or paste the new client secret and confirm it. (Optional)

    If you leave Leave as is selected, the existing client secret is kept.

  3. After making the desired changes, click Save.

Delete a Client Configuration

To delete a client configuration:

  1. On the OAuth 2.0 page, click the delete icon in the Actions column for the client configuration in the Client Configurations table.

  2. In the dialog box, type Permanently Delete, and click Delete.

    The client configuration is removed from the Client Configurations table.

CI/CD Pipeline Menu Option

The CI/CD Pipeline menu option provides an easy way for you to log in to GitLab, the Health Connect Cloud source control management tool.

Note:

Before using GitLab with this deployment for the first time, contact us using iService to get your deployment linked to your GitLab account. (For more information, see Getting HelpOpens in a new tab.)

To log in to GitLab:

  1. In the Deployments section of the main menu in the Cloud Services Portal, click CI/CD Pipeline.

  2. On the Health Connect Cloud Source Control Management screen, log in with your Cloud Services Portal username and password.

    This takes you to your Projects page in GitLab.

See the following resources for information on recommended source control best practices.

Managing Interfaces with GitLab for InterSystems Cloud ServicesOpens in a new tab (documentation)

Building Health Connect Cloud Interfaces with Source ControlOpens in a new tab (online learning)

Documentation

If you have any questions on how to use InterSystems IRIS Managed Service, on the main menu, click Documentation.

For documentation on all of the InterSystems cloud services, click your name at the top right of the Cloud Services Portal, and then click Documentation.

If you would like to submit any feedback to help InterSystems improve any of the InterSystems cloud services, click your name at the top right of the Cloud Services Portal, and then click Submit Feedback. While we cannot respond to all feedback we receive, we welcome your opinion and will take it into consideration when determining future directions and enhancements.

Common Cloud Services Portal Functionality

For information on common Cloud Services Portal functionality that is not specific to InterSystems IRIS Managed Service, see Cloud Services Portal Reference Information. This document includes material describing the following features in the Cloud Services Portal:

FeedbackOpens in a new tab