How To Get an ICA File for an Arbitrary Site - Tech Preview

Secure Browser provides an API for launching arbitrary addresses within the hosted environment, without permanently publishing the URL. The returned value is an ICA file that may be passed to any Citrix Receiver in order to launch the session, typically by saving the ICA data to a local file on the user’s endpoint and invoking the installed Receiver.

Prerequisites

  1. Create an API client.
  2. Read the authenticate using the API client explanation of how to get Citrix Cloud bearer token.
  3. Use the obtained bearer token as explained here in the section below.
  4. You need the customer id to use as first part of the URL path. Getting the value is explained here.

REST Example

This example illustrates how to create an ICA file using the REST API.

Request

POST https://session.browser.cloud.com/{customer}/singleuse/icafile HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: CwsAuth bearer=<token-from-call-to-trust>

{
  "Address": "https://www.citrix.com",
  "Name": "Citrix",
  "Geo": "wus",
  "Whitelist": "*citrix.com:443",
  "Policies": {
    "CopyPaste": true,
    "NonKiosk": true
  }
}

Response

HTTP/1.1 200 OK
Content-Length: 1496
Content-Type: application/json; charset=utf-8

{
  "IcaFile": "[Encoding]..."
}

Interpreting the request

The following JSON object is a fully defined launch request. All fields except Address are optional and may be omitted if the default value is acceptable.

{
  "Address": "https://www.citrix.com",
  "Name": "Citrix",
  "Geo": "wus",
  "Whitelist": "*:*",
  "UserIdentity": {
    "Username": "user@example.com",
    "ClientIP": "198.51.100.1",
  },
  "Policies": {
    "CopyPaste": true,
    "Printing": false,
    "NonKiosk": false,
    "SessionIdleTimeout": 15,
    "SessionIdleTimeoutWarning": 5
  }
}

LaunchModel

Property Name
Type
Description
Address
string
[Required] Fully-qualified URL to launch within the session.
Name
string
Title of the page in the client browser.
Geo



string



Geographical region to host the remote session.

“wus” (West US)
“weurope” (West Europe)
“seasia” (Southeast Asia)

Default value is “wus”.
Whitelist


string


List of sites that the hosted browser is allowed to contact.
Entries are in the format “hostname:port number”, separated
by newlines, with asterisks as wild cards.

Default value is “*:*”, which allows all traffic.
UserIdentity
object
Describes the user launching the session.
Policies
object
Defines the features available within the session.

UserIdentity

Property Name
Type
Description
Username
string
Name of the user
ClientIP
string
IP address of the user

Policies

Property Name
Type
Description
CopyPaste

boolean


Enable clipboard operations between client and
session.

Disabled by default.
Printing

boolean

Enable printing of remote pages.

Disabled by default.
NonKiosk

boolean

Do not run the hosted browser in kiosk mode.

Disabled by default.
SessionIdleTimeout

integer


Number of minutes to allow the session to remain
idle before closing automatically.

Default ten minutes.
SessionIdleTimeoutWarning

integer


Number of minutes before an automatic log off to
display a warning dialog to the user.

Default two minutes.

Interpreting the response

The response is a JSON object with a single property, IcaFile. Any version of Citrix Receiver can use this data to launch the requested session, typically by saving it to a local file and then invoking an installed copy of Receiver.

Comments