ION - Administration Guide
ION - Administration Guide
ION - Administration Guide
2021-x
Copyright © 2021 Infor
Important Notices
The material contained in this publication (including any supplementary information) constitutes and
contains confidential and proprietary information of Infor.
By gaining access to the attached, you acknowledge and agree that the material (including any
modification, translation or adaptation of the material) and all copyright, trade secrets and all other
right, title and interest therein, are the sole property of Infor and that you shall not gain right, title or
interest in the material (including any modification, translation or adaptation of the material) by virtue
of your review thereof other than the non-exclusive right to use the material solely in connection with
and the furtherance of your license and use of software made available to your company from Infor
pursuant to a separate agreement, the terms of which separate agreement shall govern your use of
this material and all supplemental related materials ("Purpose").
In addition, by accessing the enclosed material, you acknowledge and agree that you are required to
maintain such material in strict confidence and that your use of such material is limited to the Purpose
described above. Although Infor has taken due care to ensure that the material included in this publication
is accurate and complete, Infor cannot warrant that the information contained in this publication is
complete, does not contain typographical or other errors, or will meet your specific requirements. As
such, Infor does not assume and hereby disclaims all liability, consequential or otherwise, for any loss
or damage to any person or entity which is caused by or relates to errors or omissions in this publication
(including any supplementary information), whether such errors or omissions result from negligence,
accident or any other cause.
Without limitation, U.S. export control laws and other applicable export and import laws govern your
use of this material and you will neither export or re-export, directly or indirectly, this material nor any
related materials or supplemental information in violation of such laws, or use such materials for any
purpose prohibited by such laws.
Trademark Acknowledgements
The word and design marks set forth herein are trademarks and/or registered trademarks of Infor and/or
related affiliates and subsidiaries. All rights reserved. All other company, product, trade or service
names referenced may be registered trademarks or trademarks of their respective owners.
Publication Information
Release: Infor ION API 2021-x
Publication Date: June 9, 2021
Document code: ionapi_2021-x_ionapiag_cloud_en-us
Contents
Contents
Appendix B: Policies........................................................................................................................68
FaultHandling..................................................................................................................................68
Header.............................................................................................................................................70
Quota...............................................................................................................................................72
CacheResponse..............................................................................................................................74
JsonThreatProtection......................................................................................................................76
JsonTransform.................................................................................................................................78
QueryParam....................................................................................................................................85
RegExThreatProtection...................................................................................................................87
XmlThreatProtection........................................................................................................................91
XmlToJson.......................................................................................................................................94
CookieRewrite.................................................................................................................................94
Throttling.........................................................................................................................................97
Transformation...............................................................................................................................100
Setting query-string parameters for a target API call.................................................................100
Setting headers for a target API call..........................................................................................101
SetReqHeader...........................................................................................................................101
Appendix C: Third Party catalog...................................................................................................103
Contacting Infor
If you have questions about Infor products, go to Infor Concierge at https://concierge.infor.com/ and
create a support incident.
The latest documentation is available from docs.infor.com or from the Infor Support Portal. To access
documentation on the Infor Support Portal, select Search > Browse Documentation. We recommend
that you check this portal periodically for updated documentation.
If you have comments about Infor documentation, contact documentation@infor.com.
ION API is a software system for brokering requests from API consumers, such as web and mobile
applications, and API providers, such as Infor enterprise or third-party services.
As a broker sits between consumers and providers (technically it is a reverse proxy), it can provide
many benefits to both consumers and providers.
Below is a list of some of the benefits ION API offers:
• Common base URL path
• Common authentication mechanism
• Authorize client access
• Ability to enhance the API capabilities without modifying the target API server or its code, for
example:
• Provide performance statistics
• Log API usage patterns and search those logs
Client applications
These are the mobile and web applications built by Infor and by Infor customers.
These applications are the ones that are calling the APIs. Rather than calling the many different API
servers directly as they did in the past they are now calling via the ION API Gateway. A client application
cannot use the ION API Gateway unless it is registered as an authorized client application.
• Sets a context for the request; this is like a blackboard where we can keep track of the details of
each of many possible in-process requests
• Verifies “inbound” (client application-to-gateway) security using the authentication server
• Obtains the execution plan for the request from the backend service
• Passes the (possibly adjusted) request to the target API server
• Receives the response from the target API server
• Passes the (possibly adjusted) response back to the original calling client application
At any point during processing, we may need to abort the request and return an error response. Finally,
we clean up and dispose of the context for the completed request.
Authentication server
Infor has built an OAuth 2.0 authentication server that the ION API Gateway uses to validate the OAuth
2.0 bearer token that is passed as part of the request.
If the token is valid, then the Tenant and Identity2 GUID (unique user identifier) are saved into the
gateway’s request context. If the token is missing or not valid, the gateway immediately returns a 401
unauthorized error to end the request.
Backend security
The following sections discuss backend security, which refers to the security scheme that is implemented
as part of your target API server in addition to the OAuth 2.0 inbound security that is built into the ION
API Gateway.
Backend authentication
The ION API Gateway offers a first line of security by requiring that a valid OAuth 2.0 bearer token be
passed in the authorization header of the request and that “belongs to” the tenant called out in the
request URL.
We still want you to be sure to have a second layer of security at your target API server.
This second layer of security is needed for several reasons:
• Because your target API server is accessible via the public internet as required for ION API to be
able to reach it.
• Because you may still have legacy applications that access your target API server directly and
have not yet been modified to access the API via the ION API Gateway.
Basic authentication
Basic authentication is the simplest and least secure authentication scheme.
Basic authentication can only be considered because the traffic is encrypted using SSL. It is a username
+ colon + password that is encoded in Base64 and passed in the authorization header of the request.
The gateway at runtime builds and adds the proper basic authentication header value to the request
before it passes it on to the target API server. The target server verifies that the header is present and
decodes the username and password from the header and verifies the values against a database. The
target server could use the username to decide what data and actions to which a user has permissions.
Different endpoints can be configured to use different username/password combinations.
OAuth oauth_consumer_key="YourConsumerKey",oauth_signature_method="HMAC-
SHA1",oauth_timestamp="1444671481",oauth_nonce="19z7xA",oauth_ver
sion="1.0",oauth_signature="NHuhgYNoWFAigBwQidd00Fypjo4%3D”
The gateway adds or replaces this signature as the valid authorization header that is passed on to your
target API server. Your target API, knowing the ConsumerKey and secret and having access to the
same request variables, timestamp, and nonce, should be able to generate the same value as passed
in the oauth_signature. If the signatures match, you know the call is valid and can proceed. If they do
not match, something is wrong and your server can reject the request as unauthorized.
MutualSSL Authentication
Mutual SSL Authentication or certificate-based mutual authentication refers to two parties authenticating
each other through verifying the provided digital certificate so that both parties are assured of the others'
identity.
The process of authenticating and establishing an encrypted channel using certificate-based mutual
authentication involves these steps:
1 A client (ION API Gateway) requests access to a protected resource (your target server).
2 The target server presents its certificate to the client.
3 The ION API Gateway verifies the server’s certificate.
4 If successful, the ION API Gateway sends its copy of your target’s certificate to the server.
5 The target server verifies the supplied certificate.
6 If successful, the target server grants access to the API resource requested by the gateway.
To use MutualSSL on your target server, you must supply a PKCS#12.pfx file that contains your server’s
certificate, the private key used to generate the certificate, and all the intermediate certificates up to
and including the CA root certificate. It is best security practice that your .pfx file is protected by a
passphrase. You must supply this passphrase as well. These items will be required at the time of
configuration.
At runtime ION API Gateway reads the BASE64 string from the certificate and converts it back into a
binary buffer, which it attaches to the request along with the passphrase. Thus, your target server
receives its own certificate as part of the request, which ION API Gateway forwards to it. If the certificate
is not correct, your server would reject the call, but that should never happen unless there has been a
misconfiguration or the supplied .pfx was incorrect in some way.
This section of the guide is for developers who will be calling APIs via the ION API Gateway to implement
applications (API consumers).
The application might be mobile for an Android or iPhone, it might be a web application, or it might be
a system-to-system integration.
For more information, see https://github.com/infor-cloud/ion-api-sdk
Application workflow
The following information explains the steps that a developer must perform to build an application that
consumes APIs offered via the ION API Gateway.
These documentation URLs are secured in the same method as the proxy endpoint.
Property Description
ti Tenant identifier
cn Application name
ci ClientID that must be passed to the Authorization Server
cs Client Secret to pass to the Authorization Server
iu Base URL for calling the ION API Gateway for this tenant/environment
pu Base URL for calling the authorization server for this tenant/environment
oa Path to append to "pu" to create the Authorization URL
ot Path to append to "pu" to create the Access Token URL
or Path to append to "pu" to revoke a previously obtained token
SAAK Service Account Access Key
SASK Service Account Secret Key
Time-outs
There are multiple time-outs in the communication process between an authorized app and the target
product API:
Stage Time-out
1 ION API Authorized App/Client (t1) HTTP Timeout – Controlled by the Autho-
rized App. 5+ minutes recommended.
2 ION API ALB (t2) Idle Timeout – 5 minutes.
3 ION API Gateway (t3) Target Timeout – 1 minute.
Can be extended up to 5 minutes by using
a policy.
4 Product ALB/ELB (t4) Idle Timeout – Controlled by the product.
5 minutes, 30 seconds or more recom-
mended.
5 Product API Processing Time – Controlled by the
product. 1 minute or less recommended.
This section is for server administrators who need to diagnose and troubleshoot problems with the ION
API Gateway.
Available APIs
The Available APIs page shows all available API suites that the tenant is authorized to use.
On this page, you can:
• Search all available API suites with the use of the search bar
• Filter the API suites by type:
• All suites
• Infor Provisioned
• Infor Non-Provisioned
• Non-Infor
• Delete an API suite
• Add an API suite
• Export a Non-Infor suite
• Import a Non-Infor suite
Caution: ION API acts as a proxy for target APIs and can help mitigate some vulnerabilities in target
APIs with policies (for example: threat protection, quota, rate limiting, transformation) and high standards
for communication between clients and ION API (for example: strong TLS, inbound security, access
control). Infor APIs follow secure development practices to address such concerns. Before adding
non-Infor third-party APIs, review the target API vulnerabilities and make sure proper mitigation and
monitoring is in place. The customer is responsible for either mitigating or accepting risks with
customer-provisioned APIs.
Infor Non-Provisioned
1 Select a Suite Name
2 Specify the API Context. The API Context must be unique, and changing the API Context will
break any Infor mobile applications or Homepages widgets that are expecting to use this API suite.
3 Select a Suite Icon. For Infor Non-Provisioned applications, the icon is preselected. Click Choose
Icon to change the color of the icon.
4 To add deployment information, click Add Deployment and enter a Deployment Name.
5 If the application does not use HTTPS, click the Use HTTPS slider to disable the use of HTTPS.
6 If the application ignores certificate errors, click the Ignore Certificate Errors slider to ignore the
certificate errors.
7 Specify Host Name.
8 Specify Port.
9 Specify Context.
10 Specify Default Tenant ID.
11 If the application will use mutual SSL, click the Use Mutual SSL slider to enable mutual SSL.
Enabling this setting adds the Key Password field and the Load Certificate button.
12 Specify an Authentication Type. The details displayed depend on your selection:
OAuth 1.0a
Specify the Algorithm, Target Endpoint Access Key, and the Target Endpoint Secret Key.
Anonymous
No additional fields are displayed.
Basic
Specify the User ID and Password.
OAuth 2.0
a Specify the Token Endpoint and the Revoke Endpoint.
b Specify the Grant Type. The details displayed depend on your selection:
• If you select Resource Owner, specify the Username, Password, Client ID, and Client
Secret.
• If you select Client Credentials, specify the Client ID and the Client Secret.
Sales Force
a Specify the Token Endpoint. This is prepopulated with https://login.salesforce.
com/services/oauth2/token but can be edited.
13 Click Save.
Endpoints and deployments can be configured if needed.
Custom or Non-Infor
1 Specify Application Name.
2 Specify Suite Name.
3 Specify API Context.
4 Specify Description.
5 To select a suite icon, click Choose Icon.
a Select an icon.
b Select an icon color.
c Click Save.
6 To add a target endpoint, click Add Endpoint.
7 Specify the Target Endpoint URL.
8 If the application ignores certificate errors, click the Ignore Certificate Errors slider to ignore the
certificate errors.
9 Specify the Target Endpoint Description.
10 Specify the Proxy Endpoint URL.
The Public Facing Proxy Endpoint is prepopulated and cannot be edited.
11 Select the Proxy Security from the drop-down list. Options are:
• OAuth 2.0
• Anonymous
12 If the application will use mutual SSL, click the Use Mutual SSL slider to enable mutual SSL.
Enabling this setting adds the Key Password field and the Load Certificate button.
13 Specify an Authentication Type. The details displayed depend on your selection:
OAuth 1.0a
Specify the Algorithm, Target Endpoint Access Key, and the Target Endpoint Secret Key.
Anonymous
No additional fields are displayed.
Basic
Specify the User ID and Password.
OAuth 2.0
a Specify the Token Endpoint and the Revoke Endpoint.
b Specify the Grant Type. The details displayed depend on your selection:
• If you select Resource Owner, specify the Username, Password, Client ID, and Client
Secret.
• If you select Client Credentials, specify the Client ID and the Client Secret.
Sales Force
a Specify the Token Endpoint. This is prepopulated with https://login.salesforce.
com/services/oauth2/token but can be edited.
b Specify the Revoke Endpoint. This is prepopulated with https://login.salesforce.
com/services/oauth2/revoke but can be edited.
c Resource Owner is the only selection available for Grant Type.
d Specify the Username, Password, Client ID, and Client Secret.
14 Click Save.
Endpoints can be configured if needed.
Adding policies
Suite policies are applied to every endpoint within the suite and are applied before any endpoint-specific
policies.
If the same policy is set at the suite and endpoint levels, the endpoint-specific policies overwrite the
suite policy.
See Policies on page 68 for more information on the policies available.
This is available only for Non-Infor API suites.
API endpoints
This section contains information on API endpoints.
Adding an endpoint
This is available only for non-Infor API suites.
1 Go to Available APIs in ION API.
2 Click an API suite.
3 Click Endpoints.
4 Click Add Endpoint.
5 Specify the Target Endpoint URL.
6 If the application ignores certificate errors, click the Ignore Certificate Errors slider to ignore the
certificate errors.
7 Specify the Target Endpoint Description.
8 If the application will use mutual SSL, click the Use Mutual SSL slider to enable mutual SSL.
Enabling this setting adds the Key Password field and the Load Certificate button.
9 Specify an Authentication Type. The details displayed depend on your selection:
OAuth 1.0a
Specify the Algorithm, Target Endpoint Access Key, and the Target Endpoint Secret Key.
Anonymous
No additional fields are displayed.
API Key
Provide the applicable Key Name and Key Value.
AWS Signature
a Specify the AWS Access Key ID.
b Specify the AWS Secret Access Key.
c Specify the AWS Region.
d Specify the AWS Service.
IONAPI Bridge
For information on how to set up ION API bridge, see ION API bridge solution on page 106.
Basic
Specify the User ID and Password.
OAuth 2.0
a Specify the Token Endpoint and the Revoke Endpoint.
b Specify the Grant Type. The details displayed depend on your selection:
• If you select Resource Owner, specify the Username, Password, Client ID, and Client
Secret.
• If you select Client Credentials, specify the Client ID and the Client Secret.
Sales Force
a Specify the Token Endpoint. This is prepopulated with https://login.salesforce.
com/services/oauth2/token but can be edited.
b Specify the Revoke Endpoint. This is prepopulated with https://login.salesforce.
com/services/oauth2/revoke but can be edited.
c Resource Owner is the only selection available for Grant Type.
d Specify the Username, Password, Client ID, and Client Secret.
Deleting an endpoint
This is available only for non-Infor API suites.
1 Go to Available APIs in ION API.
2 Click an API suite.
3 Click Endpoints.
4 Select the endpoint to delete.
5 Click Delete.
6 Click Yes.
API deployments
Deployment information is available only for Infor non-provisioned API suites.
Adding a deployment
1 Go to Available APIs in ION API.
2 Click an API suite.
3 Click Add Deployment.
4 Select and specify Deployment Name.
5 If the application does not use HTTPS, click the Use HTTPS slider to disable the use of HTTPS.
6 If the application ignores certificate errors, click the Ignore Certificate Errors slider to ignore the
certificate errors.
7 Specify the Host Name.
8 Specify the Port.
9 Specify the Context.
10 Specify the Default Tenant ID.
11 If the application will use mutual SSL, click the Use Mutual SSL slider to enable mutual SSL.
Enabling this setting adds the Key Password field and the Load Certificate button.
12 Specify an Authentication Type. The details displayed depend on your selection:
OAuth 1.0a
Specify the Algorithm, Target Endpoint Access Key, and the Target Endpoint Secret Key.
Anonymous
No additional fields are displayed.
Basic
Specify the User ID and Password.
OAuth 2.0
a Specify the Token Endpoint and the Revoke Endpoint.
b Specify the Grant Type. The details displayed depend on your selection:
• If you select Resource Owner, specify the Username, Password, Client ID, and Client
Secret.
• If you select Client Credentials, specify the Client ID and the Client Secret.
Sales Force
a Specify the Token Endpoint. This is prepopulated with https://login.salesforce.
com/services/oauth2/token but can be edited.
b Specify the Revoke Endpoint. This is prepopulated with https://login.salesforce.
com/services/oauth2/revoke but can be edited.
c Resource Owner is the only selection available for Grant Type.
d Specify the Username, Password, Client ID, and Client Secret.
13 Click Save.
Editing a deployment
1 Go to Available APIs in ION API.
2 Click an API suite.
3 Click Deployment Information.
4 Click Edit.
5 Make your changes.
6 Click Save.
Deleting a deployment
1 Go to Available APIs in ION API.
2 Click an API suite.
3 Click Deployment Information.
4 Click Delete.
5 Click Yes.
Associating endpoints
1 Go to Available APIs in ION API.
2 Click an API suite.
3 Click Deployment Information.
4 Click Associate Endpoints
5 Select the endpoints to be associated with this deployment.
6 Click Save.
Authorized Apps
This page shows all of the authorized applications.
Each application listed displays the application name, type, source, and status. You can delete the
app, download credentials, or view the QR code (for mobile apps). You can use the search bar to
search through all the authorized apps, and you can add new applications.
• Mobile - Windows
a Specify the Description.
b Specify the Redirect URL.
c Select the length of time for OAuth 2.0 Access Token.
d If the application does not request refresh tokens, click the slider to disable Issue Refresh
Tokens.
• If Issue Refresh Tokens is disabled, Refresh Token Grant Lifetime is also disabled.
• If Issue Refresh Tokens is enabled, specify the desired length of time and specify
whether the value is in hours or days.
Note: The Refresh Token Grant Lifetime value must be greater than or equal to the
OAuth 2.0 Access Token value.
• Mobile - Others
a Specify the Description.
b Specify the Redirect URL.
c Specify the Download URL.
d Select the length of time for OAuth 2.0 Access Token.
e If the application does not request refresh tokens, click the slider to disable Issue Refresh
Tokens.
• If Issue Refresh Tokens is disabled, Refresh Token Grant Lifetime is also disabled.
• If Issue Refresh Tokens is enabled, specify the desired length of time and specify
whether the value is in hours or days.
Note: The Refresh Token Grant Lifetime value must be greater than or equal to the
OAuth 2.0 Access Token value.
• Web
a Specify the Description.
b Specify the Redirect URL.
c Specify the Authorized JavaScript Origins.
d Specify the Logout URL.
e Select a Signing Certificate Fingerprint (SHA1): Click Load Certificate, select the
certificate file, and click Open.
f Select the length of time for OAuth 2.0 Access Token.
g If the application does not request refresh tokens, click the slider to disable Issue Refresh
Tokens.
• If Issue Refresh Tokens is disabled, Refresh Token Grant Lifetime is also disabled.
• If is enabled, specify the desired length of time and specify whether the value is in
hours or days.
Note: The Refresh Token Grant Lifetime value must be greater than or equal to the
OAuth 2.0 Access Token value.
• Backend Service
Note: There are options for User Impersonation and ID Translation that are described in
ION API bridge solution on page 106. If you are not setting up a hybrid system, leave disabled.
a Specify the Description.
b Select the length of time for OAuth 2.0 Access Token.
c If the application does not request refresh tokens, click the slider to disable Issue Refresh
Tokens.
• If Issue Refresh Tokens is disabled, Refresh Token Grant Lifetime is also disabled.
• If Issue Refresh Tokens is enabled, specify the desired length of time and specify
whether the value is in hours or days.
Note: The Refresh Token Grant Lifetime value must be greater than or equal to the
OAuth 2.0 Access Token value.
5 Click Save.
Editing an application
1 Go to Authorized Apps in ION API.
2 Select an application.
3 Make your changes.
4 Click Save.
Deleting an application
1 Go to Authorized Apps in ION API.
2 Delete the application by clicking Delete, or select an application.
3 At the bottom of the details page of the selected application, click Delete.
4 Click Yes.
5 Click OK.
Disabling an application
1 Go to Authorized Apps in ION API.
2 Select an Infor application.
3 Click Disable.
4 Click Yes.
Enabling an application
1 Go to Authorized Apps in ION API.
2 Select an Infor application.
3 Click Enable.
4 Click Yes.
Cloning an application
Note: Specific cases in which an application can or cannot be cloned are:
• The Clone button is available only when the application is disabled.
• An application cannot be enabled if a cloned version of the application is enabled.
• The Clone button is disabled if a clone of the application already exists.
• Cloned applications cannot be cloned.
1 Go to Authorized Apps in ION API.
2 Select a disabled application.
3 Click Clone.
4 Make your changes.
5 Click Save.
API metadata
API metadata provides a way for users to get information about suites, products, and operations within
these suites and products through the use of Swagger UI.
ION API metadata is an index of suites, products, and operations as found in each endpoints’ Swagger
documentation. The ION API indexing service runs every five days or whenever an API suite is added
or deleted.
While you can search within ION API metadata by using the provided Swagger UI, ION API metadata
is used by other applications to query what suites, products, and operations are available in your
environment. To be sure your API is included in ION API metadata, add swagger documentation to
each of your endpoints as specified in Adding API endpoint documentation on page 26.
Configuration
TLS version
For all incoming traffic between authorized apps and the ION API Gateway, only TLS version 1.2 is
supported; however, for outbound communication between the Gateway and target APIs, ION API is
more accommodating. As tenant administrator, you can set a minimum TLS version for target endpoints
from the General Settings tab.
The versions available are:
• 1.0
• 1.1
• 1.2
• 1.3
The default value supported is the lowest version: 1.0.
Once the minimum TLS version is set, all target APIs using a lower TLS version will fail.
Additionally, when the minimum TLS version is updated from the General Settings page, endpoints
that were recently called still use the previous TLS version until the cache is cleared for that endpoint.
Note: The available TLS versions are applicable for communication between ION API and target
APIs. This does not apply to communication between authorized apps and ION API.
Communication with any target APIs using a TLS version lower than TLSv1.3 will not work.
General Settings
General Settings contains settings that can be applied.
Export
By default, the setting to enable the export of target endpoint credentials while exporting API suites is
disabled.
If enabled, target endpoint credentials are exported in plain text.
You are responsible for keeping the export file safe as the credentials allow access to the target
endpoint.
JWK management
When setting up JWT target authentication for an endpoint in the ION API user interface, a JWK key
is generated. The JWK Management table, located on the General Settings tab, is used to keep track
of generated JWK keys.
The JWK Management table can also be used for setting up ION API bridge credentials for a backend
service application. To set up ION API bridge credentials:
1 Navigate to the ION API application.
2 Click Configuration.
3 Click General Settings.
4 Download a generated key from the ION API JWK Management table. The key generates into a
.json file.
5 Click Authorized Apps on the side-panel.
6 While creating a backend service application, engage the Use Bridge Credentials slider.
7 Click the User Impersonation and/or theID Translation slider.
8 Click Upload Public Key.
9 Select the ionapi-bridge-public-jwt.json file downloaded previously.
OAuth 2.0
If you need to authorize ION API in your third-party system, you can use the Authentication Code
Grant Redirect URL as the redirect URL or the callback URL.
Copy the link in this field and paste it in the appropriate field in the third-party system.
Best practices
These are the best practices for managing the OAuth 2.0 token:
• Obtain an access token when you access the API for first time or when the existing access token
expires.
• When the access token is issued, its “expires_in” time is provided as well. Use this as a guideline
for keeping the access token.
For example, if the access token expires in 2 hours, continue to use it for 1h55m. Then, obtain a
new token when the current token expires or is revoked.
• Obtaining an access token for each API call is an anti-pattern and must be avoided.
• If you receive a refresh token along with an access token, use the refresh token to refresh the
access token when the access token expires.
• For a clustered application, there should be a common OAuth2 token management layer that
obtains and securely stores the tokens.
Monitoring
Monitoring allows you to view all transactions that have passed through your gateway.
Monitoring data is purged after 30 days.
This feature is available only to users with one of these security roles:
• IONAPI-Administrator
• Infor-SystemAdministrator
• IONAPI-Tracing
Monitoring is based on searching for a transaction. Monitoring also has some general gateway
information dashboard tiles:
• ION API Health
• ION API Monitoring
• ION API Info
Search
ION API Monitoring is based on searching for a particular transaction.
You can filter your search by:
• All
• API Suite – the suite that contains the requested transaction
• Path - the last part of the path on which the request was made, starting with /{Tenant}/{API
Context}/{Endpoint}/{Resource}
• Request ID – each request is assigned an ID in GUID format
• User name – the name of the user who made the request, if available
•
You can limit your search by time:
• Last 5 minutes – the From time and Service account – the ID of the service account that made
the request, if availableTo time display search results from the last five minutes.
• Last 1 Hour – the FromService account – the ID of the service account that made the request, if
time and To time display search results from the last hour.
• Last 24 Hours – the From time and To time display search results from the last 24 hours.
• Custom – select your own From time and To time.
Monitoring data is purged after 30 days.
Most Recent
Most Recent shows the three most recent transactions that have passed through your gateway.
An option to refresh the transaction list is available.
Search Results
Search Results display:
• API suite – the suite of the requested transaction
• Path – the last part of the path in which the request was made, starting with /{Tenant}/{API
Context}/{Endpoint}/{Resource}
• Request ID – each request is assigned an ID in GUID format
• User name – the name of the user who made the request, if available
• Service account – the ID of the service account that made the request, if available
• Response time – the total round trip time the request was handled by the gateway (in milliseconds)
• Request time stamp – the gateway time stamp at the time the request was received
You can filter your search results:
• Success – transactions that successfully completed
• Failure – transactions that have a failure somewhere in the request and response round trip
You can sort your search results:
• Time stamp ascending – oldest results first
• Time stamp descending (default) – newest results first
• Response time ascending – shortest response time first
• Response time descending – longest response time first
Clicking a search result displays the transaction details of that request.
Transaction Details
Transaction Details display:
• API suite – the suite for the requested transaction
• Path – the last part of the path on which the request was made, starting with /{Tenant}/{API
Context}/{Endpoint}/{Resource}
• Request ID – each request is assigned an ID in GUID format
• User name – the name of the user who made the request, if available
• Service account – the ID of the service account that made the request, if available.
• Response time – the total round trip time the request was handled by the gateway (in milliseconds)
• Request time stamp – the gateway time stamp at the time the request was received.
Also displayed is each step the gateway took to process this transaction. Any failure is highlighted.
Clicking each step shows details about that step.
For transactions that used API flows, this display first lists each API that was used. Click an API to
shows details about the steps that were taken, as defined above.
An option to download the transaction details is available. The transaction detail JSON file contains
application-level monitoring and system-level monitoring (if enabled).
Authorizations
The Authorizations page enables you to authorize ION API to access a third-party API on the users’
behalf.
The items displayed on the Authorizations page correspond to each endpoint that uses OAuth 2.0
authentication or deployment.
Enterprise Connector
Use the Enterprise Connector to establish communication between ION API and an on-premises target
API without a direct network connection. The ION API hybrid service runs as an independent
application/service in the Enterprise Connector. This feature is available only on Cloud Edition.
To access the option, the desired enterprise location must first be provisioned in ION Desk by a user
with the IONDeskAdmin role. See the Infor ION Desk User Guide-Cloud Edition for details.
This feature can be accessed in non-Infor target endpoint details, Infor non-provisioned deployment
details, or third-party deployment details.
Prerequisites
For prerequisites for the Enterprise Connector service, see the “Enterprise Connector prerequisites”
section of the Infor ION Desk User Guide-Cloud Edition.
Additionally, note these prerequisites for using the Enterprise Connector service with ION API:
• Only SQL Server is supported.
• Only Windows is supported.
• The Enterprise Connection version must be at least 2020-08.
Limitations
Payload limit
As of now, only a payload size up to 256 KB is supported by Enterprise Connector.
*EC OK*
HB: OK -> Icon: Green -> Tooltip: EC running, EC version supports hybrid services, ION service running
HB: Pending -> Icon: Green -> Tooltip: Hybrid Service installation is pending
HB: Unknown -> Icon: Green -> Tooltip: Hybrid Service not available
HB: Error/Not Ok -> Icon: Red -> Tooltip: Hybrid Service not running, EC version supports hybrid service
EC ERROR*
Icon: Yellow -> Tooltip: EC not running
Infor ION API Gateway is a powerful API management tool. For additional information go to infor.com.
You can use the SDK to:
• Use a previously configured ClientID and Secret to handshake with the Infor Authorization Server
to obtain a valid OAuth 2.0 Bearer token. The token is expected by the gateway unless the API
endpoint is configured to use the AnonymousInboundSecurity policy, which should be used sparingly.
• Send and receive responses for HTTPS requests using various methods such as GET, PUT, POST,
DELETE and provide the appropriate headers and payload (body).
• Handle errors indicated by HTTP status codes other than 200.
Note: Information on developing mobile client applications that authenticate through and access ION
API Gateway services can be found separately in the Infor Mobile SDK.
No
No
Is
Use OAuth2
Is Client Web App
Yes Yes SAML Bearer
Web App? integrated with
Grant
Infor Ming.le?
No
Is Client
Use OAuth2
Single Page Yes
Implicit Grant
App?
No
Use OAuth2
Is Client
Resource Owner
Backend Service Yes
Grant with
App?
Service Accounts
No
redirect_uri
Specify the URL where the IFS authorization server sends the code upon user consent. This must
be the same URL as registered in IFS during integration.
response_type=code
Indicate the IFS authorization server to send the authorization code upon user consent parameters.
3 Exchange the authorization code for an access token and refresh token.
Using the token endpoint of the IFS authorization server, exchange the authorization code for an
OAuth access token and refresh token. Send these parameters as Content-Type
"application/x-www-form-urlencoded"
client_id
Specify the OAuth Client ID specific to your app.
client_secret
Specify the OAuth client secret received while acquiring OAuth client details.
grant_type=authorization_code
Specify the hint authorization server about the grant type being used.
redirect_ur
Specify the URL where the authorization server sends the access token. This URL must match
the URL registered in ION API CE/IFS CE during integration.
code
Specify the authorization code sent by authorization server in the previous step.
In exchange, the authorization server provides the token_type, for example, Bearer.
Example implementation
You can use an OAuth client library to ease OAuth 2.0 adoption for your application.
The OAuth 2.0 client library handles OAuth-related low-level functionality and provides a simple interface
to implement steps documented in the above sections.
See http://oauth.net/2/ for lists of popular OAuth 2.0 client libraries for Java. A sample implementation
based on the Apache Oltu OAuth 2.0 Client is provided here. This implementation is a simple web
application that integrates with ION API and Infor IFS. These are code snippets to implement OAuth:
Rf9e0xE2G_mJhjqPCZXUPYHTqXQdMPKEqCwEO94rzmYleBg")
.setRedirectURI("http://sample-oauth2-client.infor.com:8080/Sam
pleAppOAuth2/redirect")
.setCode(code)
.buildQueryMessage();
OAuthClient oAuthClient = new OAuthClient(new URLConnectionClient());
OAuthAccessTokenResponse oauthResponse = oAuthClient.accessToken(request);
String accessToken = oAuthResponse.getAccessToken();
String expiresIn = oAuthResponse.getExpiresIn();
Refresh token
Revoke token
Sample application
A sample Java web application is included in this SDK. The application uses the userdetails endpoint
of the Infor Ming.le API by default.
To change the endpoint, modify the URL in bearerClientRequest of com/infor/ionapi/sample/
client/web/OAuth2Servlet.java. To run the source, extract the source and run mvn jetty:
run to use an embedded jetty or to deploy to your container.
1 Extract the source and run the mvn package (maven 2 required).
2 Deploy the war file to the j2ee container. The redirect URL for your client application changes
depending on your context root. The preregistered client has the redirect URL configured with
redirect_url=http://sample-oauth2.infor.com:8080/RedirectServlet. This
assumes the sample application runs at the root context and port 8080.
3 Add sample-oauth2.infor.com to the hosts file to point to the j2ee container IP address
(windows hosts or /etc/hosts).
4 Open this URL in the browser: http://sample-oauth2.infor.com:8080
redirect_uri
Specify the URL where the IFS authorization server sends the code upon user consent. This must
be the same URL as registered in IFS during integration.
response_type=code
Specify the IFS authorization server to send the authorization code upon user consent.
client_secret
Specify the OAuth client secret received while acquiring the OAuth client details.
grant_type=authorization_code
Specify the hint authorization server about the grant type being used.
redirect_uri
Specify the URL where the authorization server sends the access token. This URL must match
the URL registered in ION API CE/IFS CE during integration.
code
Specify the authorization code sent by the authorization server in the previous step.
Example implementation
You can use an OAuth client library to ease OAuth 2.0 adoption for your application.
The OAuth 2.0 client library handles OAuth-related low-level functionality and provides a simple interface
to implement the steps in the previous sections.
See http://oauth.net/2/ lists of popular OAuth 2.0 client libraries for Java. A sample implementation
based on the Apache Oltu OAuth 2.0 Client is provided here. This implementation is a simple thick-client
application that integrates with ION API and IFS. These are code snippets to implement OAuth:
Refresh token
Revoke token
Sample application
A sample rich client java application is included in this SDK. To run the source:
1 Extract the source and run dist/SampleThickClientOAuth2.jar.
2 Alternatively, compile the source and run the resulting jar.
redirect_uri
Specify the URL where the IFS CE authorization server sends the code upon user consent. This
must be the same URL as registered in IFS CE during integration.
response_type=code
Specify the IFS authorization server to send the authorization code upon user consent.
client_secret
Specify the OAuth client secret received while acquiring OAuth client details.
grant_type=authorization_code
Specify the hint authorization server about the grant type being used.
redirect_uri
Specify the URL where the authorization server sends the access token. This URL must match
the URL registered in ION API CE/IFS CE during integration.
code
Specify the authorization code sent by the authorization server in the previous step.
When you revoke the tokens depends on how your application is handling the refresh and access
token. Tokens should be revoked before they are discarded by your application or when you want the
user/resource owner to reconfirm the grant. After the refresh token is revoked, the corresponding
access token and grant are revoked as well.
Use these parameters to revoke the token using the HTTP POST operation for the IFS CE token
endpoint:
• token - refresh token
• token_type_hint=refresh_token
• client id - Use as the username for HTTP basic authentication
• client secret - Use as the password for HTTP basic authentication
Example implementation
You can use an OAuth client library to ease OAuth 2.0 adoption for your application.
The OAuth 2.0 client library handles OAuth-related low-level functionality and provides a simple interface
to implement the steps in the previous sections.
See http://oauth.net/2/ lists of popular OAuth 2.0 client libraries for .Net. A sample implementation
based on the ThinkTecture IdentityServer3 Sample is provided here. This implementation is a simple
thick-client application that integrates with ION API CE and IFS CE. These are code snippets to
implement OAuth:
code, Constants.RedirectUrl);
await ValidateResponseAndSignInAsync(response, tempState.Item2);
return View("Token", response);
Refresh token
Sample application
A sample rich client java application is included in this SDK. To run the source:
1 Build and deploy the solution. Use port 443 and context root /SampleAppOAuth2.
2 Add sample-oauth2-client.infor.com to the host files to point to the IIS host ip address
(windows hosts or /etc/hosts).
3 Open this URL in a browser: https://sample-oauth2-client.infor.com/SampleApp
OAuth2
webView.Show();
webView.Start(new Uri(startUrl), new Uri(RedirectUri));
Note: There is a special case for javascript:void(0). While testing, it was detected that such
navigation makes the browser unresponsive. Be aware that this functionality works when using WPF
WebView as in the sample provided. Using the Winforms browser may not provide all the events as
expected. In this scenario, the Thinktecture library was leveraged to parse the response URL: Autho
rizeResponse = new AuthorizeResponse(e.Uri.AbsoluteUri); the AuthorizeResponse
includes an error if there is a problem while obtaining the authorization code.
In the sample application, this is done in two steps to showcase the difference. Applications can obtain
an access token directly out of the authorization code without user interaction. The response is
TokenResponse. Additionally, it indicates if there is an error. If there is no error, it includes the
access_token and refresh token.
_revokeToken(this.AccessTokenTextBox.Text, OAuth2Constants.AccessToken);
The refresh token is a token with a longer expiration time that allows clients to obtain a new set of
access_token and refresh_token without requiring the user to authenticate again.
Use this code to refresh the access token:
_revokeToken(this.RefreshTokenTextBox.Text, OAuth2Constants.RefreshToken);
.Net applications
There are multiple OAuth2.0 libraries available, including http://www.nuget.org/packages/Thinktectur
e.IdentityModel.Client/.
It is a library with utility functions to implement the OAuth2.0 protocol. The client application can leverage
the library to construct the correct URL query parameters and the form post required as part of the
interaction with the authorization service.
Sample application
A .NET sample application is provided in this SDK and leverages the Thinktecture library to obtain,
refresh, and revoke tokens and call a webservice client with the token.
The sample client showcases the functionality available by the library. The sample application is based
on samples from the Thinktecture team located at: https://github.com/IdentityServer/IdentityServer3.S
amples/tree/master/source/Clients
The sample application showcases the interaction of the client with the authorization service. This
sample application does not treat the access_token or refresh_token securely. Maintaining the
access_token and refresh_token secure is the responsibility of the final application and should be
secured as any other existing secret.
Create client
With the provided token_endpoint, ClientId, and ClientSecret, you can construct a client to use in further
interactions. You can make a request authentication using the ClientId and ClientSecret.
Obtain access_token
With the service account accessKey and secretKey, you can request an access token. The response
type is TokenResponse. This indicates if there is an error obtaining the token. If successful, then it
includes the access_token and, if available for the client, the refresh_token.
_oauth2.RequestResourceOwnerPasswordAsync(ServiceAccountAccessKey, Ser
viceAccountSecretKey).Result;
Calling service
With the token from the TokenResponse, you can call the service passing the access token as a bearer
token.
RevokeToken(token.AccessToken, OAuth2Constants.AccessToken);
Refresh token
If a refresh token is available as part of the response, you can obtain a new access_token and
refresh_token without requiring the service account credentials.
_oauth2.RequestRefreshTokenAsync(refreshToken).Result;
RevokeToken(token.RefreshToken, OAuth2Constants.RefreshToken);
Go applications
Go programming language (Golang) provides a package golang.org/x/oauth2 to implement the
OAuth2.0 protocol.
conf := &oauth2.Config{
ClientID: <Application ClientID>,
ClientSecret: <Application Client-Secret>,
Scopes: []string{
"openid profile",
},
Endpoint: oauth2.Endpoint{
AuthURL: <pu> + <oa>,
TokenURL: <pu> + <ot>,
},
}
Obtain tokens
Now you are ready to obtain tokens. Token struct in Go contains both access and refresh tokens.
// handle error
}
Note: You do not need to refresh the token manually; the client does it automatically.
Revoke tokens
The package does not provide methods to revoke any token. You can call the revoke service directly.
Appendix A: Troubleshooting
If you do not receive this response, then double-check the URL you are using. If you are sure the URL
is correct, then check that the ion-apis-server service is running.
To discover the problem, you can run ION API Gateway directly without using the NSSM64 service
wrapper. This can be done by changing to the installation folder, which is typically: CD “C:\program
files\infor\mingle\components\ionapi\iongateway” node bin\launch
If there is a problem, the gateway will fail to start, and one or more error messages will be displayed
on the console. Some typical problems might be: •
• Port number in use
ION API Gateway uses port 8443 by default, but this is overridden by a value it receives from the
backend service. Make sure the selected port is not in use by some other service.
• Improper configuration settings
Ensure that there are no @xxx@ placeholders in the config/production .json file. Check that the
“MCC” URL, key, and Secret settings are correct near the bottom of the file.
You can also check the start, stop, and check the state of the ion-apis-server service via the Windows
services.msc snap-in. It is important that the service be marked to start automatically.
Appendix B: Policies
Policies are available at API suite level and proxy endpoint level.
FaultHandling
Use the FaultHandling policy to modify the code or message returned by the server in case of an error.
Example
In this example, the status code and message are replaced by the specified status code and message.
<faultHandling
xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="faultHandling-example" displayName="faultHandling-example" en
abled="true" version="1.0">
<rules>
<rule>
<statusCode>500</statusCode>
<set>
<statusCode>502</statusCode>
<message>Please contact the system administrator.</mes
sage>
<set>
</rule>
</rules>
</faultHandling>
Configuration
<faultHandling> attributes
<faultHandling name="faultHandling-example" displayName="faultHandling-example" enabled="true"
version="1.0">
<rules> element
List of rules to be enforced by this policy.
<rules.rule> element
Rule to be enforced by this policy.
<rules.rule.statusCode> element
Http code that in the response that would trigger the execution of this rule.
<rules.rule.set> element
Elements in the response that are set if this rule is executed.
<rules.rule.set.statusCode> element
Http code to set if the enclosing rule is executed.
<rules.rule.set.message> element
Message to return if the enclosing rule is executed.
Header
This policy allows you to set or delete headers to either the response or the request.
Note: Setting a header creates a new header unless it already exists, in which case it updates the
existing header.
Example 1
In this example, a header is set for a request.
<header
xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="header-example" displayName="header-example" enabled="true"
version="1.0" >
<action>set<action>
<headerName>x-cache</headerName>
<headerValue>true</headerValue>
</header>
Example 2
In this example, the header value is extracted from the context.
<headerName>x-cache</headerName>
<headerValue ref='context.url.tenant'/>
</header>
In the example, reference is made to a variable in the context object. The context object is a shared
dictionary of information that can be accessed from the policies.
Configuration
<header> attributes
<action> element
The action indicates the intention of this policy:
• set: set the header value. Insert if the header does not already exist. Otherwise, update.
• delete: remove the header. If the header name is '*', the policy deletes all the headers.
<action>set<action>
<headerName> element
Name of the affected header.
<headerName>x-cache</headerName>
<headerValue> element
Value of the header being set. This element is required only if you are setting a header.
<headerValue>true</headerValue>
<headerValue ref="context.url.tenant"/>
Quota
Use the Quota policy to configure the number of request messages that an app is allowed to submit
to an API over the course of a second, minute, hour, or day.
Example
Use this sample code to enforce a quota of 1,000 calls. The policy starts and stops the counter based
on the interval and unit of time of the time stamp for the first request message received by the API
proxy.
For example, the first message is received at 2011-01-07 08:31:15. The quota counter starts at
2011-01-07 08:31:15 and the counter stops and resets to 0 at 2011-01-07 09:31:15 (1 hour from the
start time). The start time is the clock or calendar start time of the defined TimeUnit value, such as
second, minute, hour, or day. The end time is based on the elapsing of the Interval value in the defined
TimeUnit.
If the counter reaches the 1,000-call quota before the end of the hour, calls beyond 1,000 are rejected.
Example:
<quota
xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="quota-example" displayName="quota-example" enabled="true" ver
sion="1.0" >
<userLevel>true</userLevel>
<interval>1</interval>
<timeUnit>hour</timeUnit>
<allow>1000</allow>
</quota>
Configuration
<quota> attributes
<interval> element
Use to specify the interval of time (in seconds, minutes, hours, or days as defined by TimeUnit) applicable
to the quota.
For example, an Interval of 10 with a TimeUnit of hours means that the quota is calculated over period
of 10 hours.
<interval>1</interval>
<timeUnit> element
Use to specify the unit of time applicable to the quota.
For example, an Interval of 10 with a TimeUnit of hours means that the quota is calculated over period
of 10 hours.
The valid time units are: second, minute, hour, and day.
<timeUnit>hour</timeUnit>
<allow> element
Specifies a message count for the quota.
<allow>1000</allow>
<userLevel> element
This flag indicates if the quota should be set at the user level.
<userLevel>true</userLevel>
CacheResponse
This policy uses a cache to store and retrieve a response from a back-end resource, reducing the
number of requests to the resource.
Examples
In this example, a cache response policy is configured to cache responses for an hour based on the
tenant, product name, and the request query parameters name and last name.
Although the tenant and product name are not mentioned as part of the key, these values are implied
and automatically added by the system.
For example:
<cacheResponse
xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="cache-response-example" displayName="cache-response-example"
enabled="true" version="1.0" >
<userLevel>false</userLevel>
<cacheKey>
<prefix>acme</prefix>
<keyFragment ref="request.queryparam.name"><keyFragment>
<keyFragment ref="request.queryparam.lastName"><keyFrag
ment>
<keyFragment ref="context.my_variable"><keyFragment>
<keyFragment>Infor<keyFragment>
</cacheKey>
<expireSettings>
<timeoutInSeconds>3600</timeoutInSeconds>
</expireSettings>
</cacheResponse>
In this example, reference is made to a variable in the context object. The context object is a shared
dictionary of information that can be accessed from the policies.
Configuration
<cacheResponse>
Attributes:
<userLevel> element
This flag indicates if the cache should be set at the user level.
<userLevel>true</userLevel>
<cacheKey> element
<CacheKey> constructs the name of the key for the response stored in the cache. The key is often
set using a value from context variables or query parameters.
<cacheKey>
<prefix>acme</prefix>
<keyFragment ref="request.queryparam.name"><keyFragment>
<keyFragment ref="request.queryparam.lastName"><keyFragment>
<keyFragment ref="context.my_variable"><keyFragment>
<keyFragment>Infor<keyFragment>
</cacheKey>
<cacheKey.prefix> element
Sets a prefix for the cache key.
<cacheKey.keyFragment> element
Sets a key fragment that is concatenated as part of the cache key. The keyFragment can either be a
literal string or a value retrieved from the context. Use the attribute ref to retrieve a value from the
context.
<expireSettings> element
Configuration of cache expiration for the response.
<expireSettings>
<timeoutInSeconds>3600</timeoutInSeconds>
</expireSettings>
<expireSettings.timeoutInSeconds> element
Contains the number of seconds a response should be cached.
JsonThreatProtection
This policy enables you to reduce the risk of content-level attack by specifying limits on various JSON
structures, such as arrays and strings.
This policy executes only if the content type header is set to json.
Example
In this example, a header is set for a request.
<jsonThreat xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="jsonThreat-example" displayName="jsonThreat-example" en
abled="true" version="1.0">
<arrayElementCount>255</arrayElementCount>
<containerDepth>5</containerDepth>
<objectEntryCount>100</objectEntryCount>
<objectEntryNameLength>25</objectEntryNameLength>
<stringValueLength>25</stringValueLength>
</jsonThreat>
Configuration
<jsonThreat> attributes
<arrayElementCount> element
Optional element that indicates the maximum number of elements allowed in an array.
<arrayElementCount>255</arrayElementCount>
<containerDepth> element
Optional element that indicates the maximum allowed nested depth.
<objectEntryCount>100</objectEntryCount>
<objectEntryCount> element
Optional element that indicates the maximum number of entries allowed in an object.
<objectEntryNameLength>25</objectEntryNameLength>
<objectEntryNameLength> element
Optional element that indicates the maximum string length allowed for an object's entry name.
<objectEntryNameLength>25</objectEntryNameLength>
<stringValueLength> element
Optional element that indicates the maximum length allowed for a string value.
<stringValueLength>25</stringValueLength>
JsonTransform
Use the JsonTransform policy to adjust the JSON data returned from the target server.
The JSON can be adjusted in these ways:
• Selected properties can be deleted.
• Properties can be added with default values.
• An entirely new JSON response can be created by using selected parts of the original response.
• Any/All of the above can be applied during the same invocation of the policy.
Note that any/all deletions are done before any/all default values additions and before any/all
transformations. In the case of deletions if your JSON paths refer to properties/objects/array-elements
that do not exist, the delete request is ignored. In the case of deletions if your JSON paths refer to
properties/objects/array-elements that do not exist, the resulting property will have a value of
undefined.
Resources
The JSON transform policy relies on a special language called JSONPath that is used to select objects,
sub-objects, properties, and array elements with the JSON document.
Examples
For these examples, assume that the target server normally returns the JSON response shown below:
Sample JSON Response from Target Server:
{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 199.95,
"size": "24-inch",
"safetyRated": true,
"features": {
"style": "mountain",
"brakes": "disc"
}
}
}
}
The example below shows how parts of a response can be deleted. This can be used to reduce the
payload size if it contains items that are never used by the calling client.
Policy Options to Delete Selected Properties:
{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"price": 199.95,
"size": "24-inch",
"safetyRated": true,
"features": {
"style": "mountain",
"brakes": "disc"
}
}
}
}
The next example shows how sub-objects and properties can be added if missing from the document.
The policy uses the JSONPaths to check if the objects/properties already exist in the document. If they
already exist, those existing values are returned in the document untouched. If they do not exist, they
are added to the document with the values you specify.
Policy Options to Add Default Values:
{
"store": {
"book": [
... (book array is unchanged and omitted for the sake of brevity)
],
"bicycle": {
"color": "red",
"price": 199.95,
"size": "24-inch",
"safetyRated": true,
"features": {
"style": "mountain",
"brakes": "disc"
},
"terms": {
"warranty": "1 year parts and labor"
},
"contactInfo": {
"email": "sales@infor.com",
"phone": "678-319-8000"
}
}
}
}
This example shows how deletions, defaults, and full transformations can be combined. Note that all
deletes are done before all default value additions and before any transformations.
{
"allPrices": [8.95, 8.99, 22.99, 199.95], (Only 4 prices since 2nd book
price was deleted)
"contact": { (contactInfo did not even
exist in document until we used defaultValues to add it)
"email": "sales@infor.com",
"phone": "678-319-8000"
},
"book3": {
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
}
}
Configuration
<jsonTransform> Attributes
Elements
<delete> Element
Zero or more <delete> elements can appear under the <deletions> element.
<default> Element
Zero or more <default> elements can appear under the <defaultValues> element.
<transform> Element
Zero or more <transform> elements can appear under the <transformations> element.
QueryParam
Use the QueryParam policy to set, update, or delete a query parameter in the request.
Examples
Set using reference variable:
In this example, the value of the query parameter tenant is set to the tenant ID found in the ION API
request context.
<queryParam
xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="queryParam-example" displayName="queryParam-example" en
abled="true" version="1.0">
<action>set<action>
<paramName>tenant</paramName>
<paramValue ref="context.tenant"></paramValue>
</queryParam>
In the example, reference is made to a variable in the context object. The context object is a shared
dictionary of information that can be accessed from the policies.
Set hard-coded value:
In this example, the query parameter sort is set to the value true.
delete all:
In this example, all query-string parameters are being deleted. One reason you might want to do this
is that the query-string values are used to create to create headers (using the Header policy) and you
do not want the query-string values passed to the target server.
Configuration
<queryParam> attributes
<action> element
The set action indicates the intention of this policy, which updates the query parameter value. Insert
if the parameter does not already exist.
<action>set<action>
<name> element
Name of the affected query parameter.
<paramName>sort</paramName>
<value> element
Value of the query parameter being set.
<paramValue>true</paramValue>
<paramValue ref="context.auth.tenant"/>
RegExThreatProtection
This policy enables you to reduce the risk of content-level attack by evaluating the request content
against predefined regular expressions.
In case that specified regular expressions evaluate to true, the message is considered a threat and
rejected.
No regular expression can eliminate all content-based attacks, and multiple mechanisms should be
combined to enable defense-in-depth. With this in mind, these are recommended patterns for blacklisting
content.
Blacklisted Patterns
Examples
Example 1:
In this example, the uriPath, query parameters, headers, and jsonPayload are checked for threats:
<regExThreatProtection xmlns="http://www.infor.com/ion/api"
nxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="regExThreatProtection-example"
displayName="regExThreatProtection-example" enabled="true" ver
sion="1.0">
<uriPath>
<pattern>\\d{3}[-.]?\\d{3}[-.]?\\d{4}</pattern>
</uriPath>
<jsonPayload>
<jsonPath>
<expression>^.*</expression>
<pattern>.*uglyThreat.*</pattern>
</jsonPath>
</jsonPayload>
<queryParam name="name">
<pattern>[tT]rue</pattern>
<pattern>.*true.*</pattern>
</queryParam>
<header name="greetings">
<pattern>[tT]rue</pattern>
<pattern>.*true.*</pattern>
</header>
<header name="greeting">
<pattern>[tT]rue</pattern>
<pattern>.*true.*</pattern>
</header>
</regExThreatProtection>
Example 2:
In this example, the xmlPayload is checked for threats:
<regExThreatProtection xmlns="http://www.infor.com/ion/api"
nxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="regExThreatProtection-example"
displayName="regExThreatProtection-example" enabled="true">
<xmlPayload>
<namespaces>
<namespace prefix="infor">http://www.infor.com</namespace>
<namespace prefix="acme">http://www.acme.com</namespace>
</namespaces>
<xPath>
<expression>//infor:title/text()</expression>
<pattern>.*ThreatTitle.*</pattern>
</xPath>
</xmlPayload>
</regExThreatProtection>
Configuration
<regExThreatProtection> attributes
<uriPath> element
This is an optional element that configures the regular expressions that must be evaluated against the
URIPath.
This element is used to match the path of the URI.
The path starts with a forward slash and is the string that comes after the host and port. The path does
not include the protocol, host, and port of the URI. For example, the path of the URI is the mywebsite/
customers section in the following URI:
https://myserver:8443/mywebsite/customers
Only one uriPath element is allowed. The uriPath can contain multiple patterns.
<uriPath>
<pattern>\\d{3}[-.]?\\d{3}[-.]?\\d{4}</pattern>
</uriPath>
<jsonPayload> element
This is an optional element that configures the string to be extracted from a JSON payload and evaluated
against the regular expressions provided.
Only one jsonPayload element is allowed. The jsonPayload can contain multiple jsonPath elements,
which in turn can contain multiple patterns.
This rule executes only if the content type header is set to json.
<jsonPayload>
<jsonPath>
<expression>^.*</expression>
<pattern>.*uglyThreat.*</pattern>
</jsonPath>
</jsonPayload>
<queryParam> element
This is an optional element that indicates the regular expressions that must be evaluated against a
given query parameter.
Multiple queryParam elements are allowed. The queryParam element can contain multiple patterns.
<queryParam name="name">
<pattern>[tT]rue</pattern>
<pattern>.*true.*</pattern>
</queryParam>
<xmlPayload> element
This is an optional element that configures the string to be extracted from an XML payload and evaluated
against the regular expressions provided.
Only one xmlPayload element is allowed. The xmlPayload can contain multiple xPath elements, which
in turn can contain multiple patterns.
This rule executes only if the content type header is set to xml.
<xmlPayload>
<namespaces>
<namespace prefix="infor">http://www.infor.com</namespace>
<namespace prefix="acme">http://www.acme.com</namespace>
</namespaces>
<xPath>
<expression>//infor:title/text()</expression>
<pattern>.*ThreatTitle.*</pattern>
</xPath>
</xmlPayload>
<nameSpaces> element
This is an optional element that indicates the allowed name spaces to be used in an xmlPayload
element.
<header> element
This is an optional element that indicates the regular expressions that must be evaluated against the
a given header.
Multiple header elements are allowed. The header element can contain multiple patterns.
<header name="greeting">
<pattern>[tT]rue</pattern>
<pattern>.*true.*</pattern>
</header>
XmlThreatProtection
This policy enables you to reduce the risk of content-level attack by specifying limits on various XML
structures.
This rule executes only if the content type header is set to xml.
Example
In this example, a header is set for a request.
<xmlThreatProtection xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="xmlThreatProtection-example" displayName="xmlThreatProtection-
example" enabled="true" version="1.0">
<nameLimits>
<element>20</element>
<attribute>20</attribute>
</nameLimits>
<valueLimits>
<text>500</text>
<attribute>100</attribute>
<comment>200</comment>
</valueLimits>
</xmlThreatProtection>
Configuration
<xmlThreatProtection> attributes
<nameLimits> element
This is an optional element that indicates the maximum number of characters allowed for element and
attribute names in an xml document. All the elements inside the nameLimits element are also optional.
<nameLimits>
<element>20</element>
<attribute>20</attribute>
</nameLimits>
In the example above, the name limits are set so that an xmlThreatProtection event is raised if either
an element name or attribute name exceeds 20 characters.
<valueLimits> element
This is an optional element that indicates the maximum number of characters allowed for the values
of attributes, text, and comments. All the elements inside the valueLimits element are also optional.
<valueLimits>
<text>500</text>
<attribute>100</attribute>
<comment>200</comment>
</valueLimits></objectEntryCount>
In the example above, the value limits are set so that an xmlThreatProtection event is raised in one of
these cases:
• The text section of an xml element exceeds 500 characters.
• An attribute value exceeds 100 characters.
• A comment exceeds 200 characters.
XmlToJson
Use the XmlToJson policy to automatically convert an XML response from the target server to a JSON
response returned to the calling client.
<xmlToJson xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="queryParam-example" displayName="queryParam-example" en
abled="true" version="1.0">
</queryParam>
Configuration
There are currently no configurable options for this policy.
CookieRewrite
Use the CookieRewrite policy to modify the path and/or domain string in a cookie set on the response.
If the policy is placed in the response flow, the cookie is flagged as secure.
Examples
Example 1:
In this example, the path of the cookie is replaced by a path built using the tenant ID and product name.
<cookieRewrite
xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="cookieRewrite-example" displayName="cookieRewrite-example"
enabled="true" version="1.0" >
<cookieName>sessionId</cookieName>
<path>/{context.mcc.Tenant.Id}/{context.mcc.Context}</path>
</cookieRewrite>
In the example above, reference is made to a variable in the context object. The context object is a
shared dictionary of information that can be accessed from the policies.
Example 2:
In this example, the domain of the cookie is replaced by a string built using the tenant ID.
<domain>/{context.mcc.Context}</domain>
</cookieRewrite>
In the previous two examples, the path and domain are overwritten with a string literal. A smarter way
of modifying a cookie is achieved through a set of rules as shown in the next example.
Example 3:
This example shows the use of two rules:
• Replace the beginning of the root up to the version (v1.0) with /ACME_PRD/BI/
• Add /extra_path/ to the end of the path
For example:
/mycompany/mobile/v1.0/Best_Practices_Templates -> /ACME_PRD/BI/api/mobile/
Best_Practices_Templates/extra_path
Configuration
<cookieRewrite> attributes
<cookieName> element
Use to specify the name of the cookie affected by this policy. The cookie name can be either a static
string or a regular expression. A regular expression is denoted by forward slashes.
<cookieName>sessionId</cookieName>
<cookieName>/^sessionId.*/</cookieName>
<unsecureHttpTarget> element
If this element is placed in the request flow and the target uses http instead of https, this configuration
element removes the secure flag from the given cookie.
<unsecureHttpTarget/>
<domain> element
This element is used to specify the desired string value for the cookie domain.
<domain>/myCompany</domain>
<path> element
This element is used to specify the desired string value for the cookie path.
<path>/myCompany/</path>
<rewriteRules> element
This element is used to specify the list of rules to apply to either the path of domain.
<rewriteRules on="path">
<rule>
<pattern>\/.*\/v1.0\/</pattern> <!--Matches
the character strings up to "v1.0"-->
<replacement>/ACME_PRD/BI/api/mobile/</replacement> <!--Replaces
the found characters with /ACME_PRD/BI/ -->
</rule>
<rule>
<pattern>$</pattern> <!--Matches
the end of the path-->
<replacement>/extra_path</replacement> <!--Replaces
(actually appends) with /extra_path -->
</rule>
</rewriteRules>
<rule> element
This element configures a rule to overwrite a cookie element.
<pattern> element
This element determines the regex pattern to match. Keep in mind that the regex expressions are
evaluated in Javascript.
Throttling
Use the Throttling policy to smooth the rate of requests or to arrest any spikes in the number of requests
that may occur.
Example
In this example, Rate Smoothing is used to delay requests by one second after 5 requests in a minute
have arrived. Also the Spike Arrest is set to reject, with a 429 status code, the 21st and greater requests
in the same minute.
<throttling
name="throttling-example" displayName="throttling-example" en
abled="true" version="1.0"
xmlns="http://www.infor.com/ion/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.infor.com/ion/api throttling.xsd">
<timePeriodInMilliseconds>60000</timePeriodInMilliseconds> <!-- one minute
-->
<rateSmoothing>
<delayAfterCount>5</delayAfterCount>
<!-- start delaying requests after more then 5 have arrived during the
same minute
-->
<delayFactorInMilliseconds>1000</delayFactorInMilliseconds> <!-- delay
by a factor of 1 second -->
</rateSmoothing>
<spikeArrest>
<maxRequestsPerPeriod>20</maxRequestsPerPeriod>
<!-- Start rejecting with a 429 status requests 21, 22, etc. arriving
during the same minute →
</spikeArrest>
</throttling>
Configuration
<throttling> attributes
<timePeriodInMilliseconds> element
This is the time period within which to smooth the rate or arrest the spike.
<rateSmoothing> element
Specify this element to perform rate smoothing.
<rateSmoothing>
<delayAfterCount>5</delayAfterCount>
<!-- start delaying requests after 5 have arrived during the same minute
-->
<delayFactorInMilliseconds>1000</delayFactorInMilliseconds> <!-- delay
by a factor of 1 second -->
</rateSmoothing>
<rateSmoothing.delayAfterCount> element
Sets the number of requests to accept in the time period before delaying any additional requests.
<delayAfterCount>5</delayAfterCount>
<rateSmoothing.delayFactorInMilliseconds> element
Sets the time (in ms) to delay any additional requests.
<delayFactorInMilliseconds>1000</delayFactorInMilliseconds>
<spikeArrest> element
Specify this element to perform Spike Arrest.
<spikeArrest>
<maxRequestsPerPeriod>20</maxRequestsPerPeriod>
<!-- Start rejecting with a 429 status requests 21, 22, etc. arriving
during the same minute -->
</spikeArrest>
<spikeArrest.maxRequestsPerPeriod> element
Sets the number of allowed requests in the time period before rejecting the next request with a 429
status code.
<maxRequestsPerPeriod>20</maxRequestsPerPeriod>
Transformation
The transformation policy is used to transform query and/or header parameter values to be received
in the correct format. The transformation policy can be used at the endpoint level only, as a request or
response.
<transformations>
Adding a query parameter with a constant value can also be done using the QueryParam policy.
Adding a query parameter using a transformation comes from accessing the value from anywhere in
the POST body or from any of several useful "request context" variables.
You can take a value from a POST payload and turn it into a query-parameter. For example, if our
endpoint takes a POST JSON payload of the form:
Example
You can use the following helper to add the creditLimit to the query-string:
Example
You can also take the value of a request header and pass it to the target as a query-parameter if your
request includes a header called 'some-data' with a value of abc123.
We can send this to the target as a query-param called 'data' using this helper:
Example
The gateway would call the target server using this URL: https://myserv
er/path?p1=v1&p2=v2&data=abc123
SetReqHeader
For example, taking the value of the request header 'fred' and passing it as as 'wilma' to the target API:
Example
Suppose you do not want the 'fred' header to be passed to the target. In that case, you can apply a
Header policy after the transformation policy to remove the 'fred' header (for example, remove it after
the header was used by the transformation policy to set the 'wilma' header).
You could also transform a query-parameter into a header:
Example
Example
Important:
In addition to using these helpers to manipulate query-parameters and headers, you must make sure
your transformation leaves the POST request or response payload.
A transformation policy that has only SetReqQuery, SetReqHeader, or SetResHeader helpers in
it would leave the payload empty.
The information in this appendix applies to Infor OS 12.0.29 and later upgrades.
Overview
ION API bridge solution refers to deployment topologies where ION API and its authorized app reside
in different network boundaries, for example, ION API running in the multi-tenant cloud and the authorized
app running on premises.
These scenarios require ION API functionality to handle identity translation and/or user impersonation.
Common terms
Identity translation
Localization of the user identity claim (Identity2) while crossing network boundaries.
User Impersonation
Allowing an authorized app to make API calls on behalf of a different user.
Multi-Tenant (MT)
Infor cloud-based architecture in which a single instance of a software application serves multiple
customers. Each customer is called a tenant.
Single-Tenant (ST)
In single-tenant architecture, the tenant purchases a copy of the software. Infor Single Tenant usually
refers to an on-premises installation hosted on the Infor Cloud.
On-Premises (OP)
A single-tenant architecture, where the tenant purchases a copy of the software and the software is
installed at the customer’s premises.
Prerequisites
These prerequisites are required to set up an ION API bridge solution:
• An on-premises or single-tenant ION API instance
• A multi-tenant ION API instance
• An API suite to be used as a proxy in the bridge solution
• Users that exist in both a multi-tenant and single-tenant/on-premises instance with at least one
user management (IFS) property that matches, for example: the multi-tenant EmailAddress matches
the single-tenant/on-premises Identity2 for each user
• ION API Administrator security role
Overview
This image shows an authorized app accessing a multi-tenant API suite via an ION API proxy that has
been secured using the ION API Bridge:
This image shows the steps required to set up this bridge solution:
Configuration
Note: These steps must be performed in the order listed in this section.
To set up the bridge solution:
During planned or unplanned maintenance windows, the APIs return a standard response indicating
the application is under maintenance.
The response will help API consumers identify maintenance apart from errors.
When applications are in maintenance mode, ION API displays the following response:
• HTTP Status - 503
• HTTP Header retry-after : <endTime in UTC datetime format > (https://www.ietf.org/rfc/rfc2616.txt)
• Response body:
{
"error":"This product is currently under maintenance. Normal operations
are expected to resume on Friday, May 8 2020 8PM.",
"startTime" : "UTC datetime stamp",
"endTime" : "UTC datetime stamp"
}
OAuth2 scopes are an industry standard that provides a layer of additional authorization. They are
designed to govern an authorized application's API access based on a preconfigured list of scopes
permitted for the authorized application/client, as well as resource/owner consent during authorization.