webRDP HTML5 Gateway - Amazon Web Services

Transcription

webRDP HTML5 Gateway - Amazon Web Services
webRDP HTML5 Gateway
© 2013 Stoneware, Inc.
Note:
This document is the property of w ebInflection. It is not to
be copied, reproduced, or printed w ithout prior consent
from Stonew are, Inc.
2
webRDP HTML5 Gateway
Table of Contents
Foreword
0
Part I Introduction
3
1 Welcome
................................................................................................................................... 3
2 Overview
................................................................................................................................... 4
Part II Features
6
1 Overview
................................................................................................................................... 6
Part III Requirements
10
Part IV Installation
12
Part V Connecting to the HTML5 Gateway
19
Part VI Branding the Gateway
20
Part VII Security Gateway
22
Part VIII Adding a Signed SSL Certificate
23
Part IX Customizing the Interface
26
1 Custom
...................................................................................................................................
Page Tags
28
2 Sample
...................................................................................................................................
HTML Page
29
3 Sample
...................................................................................................................................
JSP
31
Index
0
© 2013 Stoneware, Inc.
Introduction
1
Introduction
1.1
Welcome
3
Thank you for installing the Stoneware webRDP HTML5 Gateway. This document will provide an
overview of the webRDP HTML5 Gateway features and how to install / configure the gateway in
your environment. For more information regarding the webRDP HTML5 Gateway, please visit the
Stoneware web site at www.stone-ware.com.
© 2013 Stoneware, Inc.
4
1.2
webRDP HTML5 Gateway
Overview
The Stoneware webRDP HTML5 Gateway is a software product designed to connect remote end
users with Windows desktops and Microsoft Terminal Servers using just a web browsers. The
product is considered a "gateway" because it translates the HTML5 code within the web browser
to Microsoft's Remote Desktop Protocol.
Diagram:
Support: Through this gateway, users can connect to the following Windows systems:
Windows XP, Vista, and 7
Windows Server 2000, 2003, and 2008
Windows Virtual Desktop Systems (with RDP enabled)
Microsoft Terminal Server
Benefits:
No client-side software required
No browser plug-in required
Access Remote Windows Desktops from desktops, notebooks, tablets, and smartphones
Supports most all operating systems including Windows, Mac, Linux, iOS, Android, and
Windows 8
Takes minutes to install and configure
Fully customizable for Managed Service Providers, Hosted Service Providers, custom
developers, and large IT shops
© 2013 Stoneware, Inc.
Introduction
© 2013 Stoneware, Inc.
5
6
webRDP HTML5 Gateway
2
Features
2.1
Overview
A matrix of webRDP HTML5 Gateway features is displayed below.
Feature
Basic
Advanced
Username/Password
Display Settings
Start Programs
RDP 5 Bulk Compression
Experience
Keep Alive
Admin Console
Cut and Paste
Customizable Banner
Customizable Splash
HTTP(S) Proxy Support
SOCKS 5 Support
Encrypted Password
Password Expiration
Customizable Logo
A description of each webRDP HTML5 Gateway feature is listed below.
Computer (required)
The IP address, DNS name, or machine name of the backend device the webRDP HTML5
Gateway will attempt to connect to. The user can pass a non-standard port number (i.e. something other than the default RDP port 3389) by appending ":[port number]" to the
computer name.
Example: mymachine.stone-ware.com:4595
Username
The user ID required to access the Windows machine via the remote desktop protocol
(RDP). This parameter is not required. The remote desktop or Terminal Server will
prompt if authentication is required.
Display
© 2013 Stoneware, Inc.
Features
7
The Display tab controls the screen resolution displayed through the webRDP HTML5
Gateway. The client supports multiple display settings including:
Fit to Browser
640x480
800x600
1024x768
1280x720
1280x768
1280x1024
1440x900
1440x1050
1600x1200
1680x1050
1920x1080
1920x1200
Start Program
The Start Program feature allows the webRDP HTML5 Gateway to automatically start a
specific application on the backend Terminal Server. The Terminal Server will suppress
the desktop view and only display the application's interface via the connection. This
feature is only available when connecting to a Microsoft Terminal Server.
Start Folder (optional)
Specifies the working directory for the application specified in the Start Program field.
RDP Compression
RDP compression is enabled within the webRDP HTML5 Gateway to optimize performance
between the client and the backend Terminal Server or remote desktop. The
compression is enabled by default and cannot be disabled on the client. If the host does
not support RDP 5 bulk compression, the client will default back to RDP 4 compression.
Experience
The experience tab will control some of the performance settings associated with
controlling the remote desktop or terminal session. Performance between the webRDP
HTML5 Gateway and remote desktop can be improved by disabling graphical features of
the remote desktop when creating the RDP session. The performance settings are
described below:
Desktop Background - When checked, the remote desktop or terminal session will
display any desktop background configured on the machine. Often the desktop
background can be very graphic intensive and require the client to redraw the screen
© 2013 Stoneware, Inc.
8
webRDP HTML5 Gateway
more frequently, thus slowing performance.
Font Smoothing - When checked, the webRDP HTML5 Gateway client will display font
smoothing if enabled on a 2003 Terminal Server or a 2008 Terminal Server. This feature
will improve the visual presentation of desktop windows and text.
Desktop Composition (Vista and Windows 7 feature) - When Desktop Composition is
enabled, individual windows no longer draw directly to the screen or primary display
device as they did in earlier versions of Windows. Instead, their drawing is redirected to
off-screen surfaces in video memory, which are then rendered into a desktop image
and presented on the display. This feature will consume more bandwidth and can be
disabled by removing the check from the box.
Show Contents of Window While Dragging - When checked, the webRDP HTML5
Gateway will display the contents of the window being dragged across the desktop
interface. When disabled, the contents of the window are suppressed while being
moved within the desktop.
Menu & Windows Animation - When checked, the menu animations of the desktop will
be displayed on the remote desktop client. These animations will generate more
network traffic when being sent to the remote desktop client (i.e. -webRDP). Menu
animations can be disabled to reduce communication traffic by disabling the check box.
Visual Styles - When checked, the theme associated with the desktop will be displayed
in the webRDP HTML5 Gateway. Themes are more graphically intensive and therefore
will generate more traffic between the webRDP HTML5 Gateway and remote desktop
and/or Terminal Server. To disable the theme within the remote desktop client,
uncheck the box.
Keep Alive
The keep alive option will send a packet to the backend Terminal Server or desktop on a
predetermined interval to stop the device from being disconnected by networking gear
(switches, routers, etc.) due to inactivity.
Cut and Paste (Clipboard)
The webRDP HTML5 Gateway supports the transfer of text between the remote desktop
and the client using the clipboard feature of the operating system.
Admin Mode
The webRDP HTML5 Gateway will connect to a Terminal Server in console mode allowing
an administrator to manage the Terminal Server (if allowed)
Customize Banner
© 2013 Stoneware, Inc.
Features
9
Allows an administrator to change the default graphic banner displayed at the top of the
webRDP HTML5 Gateway user interface. This feature allows OEMs to replace the shipping
graphic banner with their own branded graphic banner.
Customize Splash Screen
Allows the administrator to change the default graphic splash screen that is displayed
when the webRDP HTML5 Gateway is invoked within a web page or web application.
URL Generator (Launch URL)
The URL Generator allows the user to take all of the various connection parameters (listed
above) and create a URL that will automatically connect to the backend Terminal Server or
Windows desktop. The URL can be used in desktop shortcuts, web pages, links, and
emails. There are two types of URLs:
o Plain Text - the parameters are displayed in clear text in the address bar of the
browser
o Encrypted - the parameters are encrypted in the address bar of the web browser.
Stoneware suggests always using the encrypted URL. However, the Plain Text
version is useful for troubleshooting.
Proxy Support
The webRDP HTML5 Gateway client supports the use of HTTP(S) Forward Proxy servers.
When enabled, the webRDP HTML5 Gateway will make requests to the backend Terminal
Server or remote desktop through a designated Proxy. This feature is useful for
organizations who do not wish to expose their internal Terminal Servers or remote
desktops to the Internet.
The proxy server's IP Address and Credentials (username/password) can be passed as part
of the RDP connection. Once the connection to the proxy server is accepted, all RDP
© 2013 Stoneware, Inc.
10
webRDP HTML5 Gateway
traffic will be redirected to the internal Terminal Server or remote desktop.
Chaining - feature allowing two or more proxy servers to be defined when
connecting to a Terminal Server or remote desktop.
SOCKS Support
The webRDP advanced client supports the use of SOCKS 5 proxies. When enabled, the
webRDP HTML5 Gateway will make requests to the backend Terminal Server or remote
desktop through a designated SOCKS 5 proxy. This feature is useful for organizations who
do not wish to expose their internal Terminal Servers or remote desktops to the Internet.
The SOCKS server's IP Address and Credentials (username/password) can be passed as
part of the RDP connection. Once the connection to the SOCKS proxy is accepted, all RDP
traffic will be redirected to the internal Terminal Server or remote desktop.
Chaining - feature allowing two or more SOCKS servers to be defined when
connecting to a Terminal Server or remote desktop.
* Note - use of clear text username/password is currently supported with SOCKS 5
Did You Know:
You can chain a combination of SOCKS and PROXY servers together. The webRDP
HTML5 Gateway can connect through a HTTPS proxy server and then through a
SOCKS server to get to a backend RDP session.
Encrypted Password
New feature that allows the webRDP HTML5 Gateway to pass an encrypted password
between the client and the backend RDP session. The encryption method supports RSA
512 Public Key/Private Key format. The feature works in stand-alone mode or embedded
within a web page/application. In addition to encrypting the user's password, the
administrator can set an expiration on the password so that it is no longer valid after a
given number of hours.
3
Requirements
Below are the requirements for the webRDP HTML5 Gateway:
webRDP HTML5 Gateway Server
© 2013 Stoneware, Inc.
Requirements
11
The webRDP HTML5 Gateway is a Java application that runs on Windows or Linux servers. The
initial release of the HTML5 Gateway is released for Windows server platform. Other
supported server platforms will come at a later date.
Windows 2003, 2008, or 2012 Server
Microsoft Windows 2003 or 2008
Minimum 4 Gig of RAM
300MB additional disk space
No other application should be using port 80 or 443 on the server
End User Client
Browsers that supports HTML5 (canvas)
Internet Explorer 9.0, 10.0
Firefox 16, 17, 18, 19, 20, 21
Chrome 23, 24, 25, 26, 27
Safari 5.1, 6.0
Opera 12.1, 12.5
iOS Safari 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 5.1, 6.0
Opera Mini 5.0, 6.0, 7.0
Android Browser 2.1, 2.2, 2.3, 3.0, 4.0, 4.1, 4.2
Blackberry Browser 7.0, 10.0
© 2013 Stoneware, Inc.
12
4
webRDP HTML5 Gateway
Installation
This section will discuss how to install the webRDP software in Gateway Mode. Please review
the Before You Start section before beginning.
Before You Start
Download the webRDP HTML5 Gateway software
Verify that the system you are installing the gateway on meets the requirements specified
in the requirements section
1. Start the webRDP Installation by clicking on the webRDP.exe
2. Introduction. Review the Introduction Screen (below) and select the NEXT button
3. Accept License. Review the license agreement and then select the I ACCEPT radio button if
you agree to the terms. Select the NEXT button when complete.
© 2013 Stoneware, Inc.
Installation
13
4. Installation Directory. Use the CHOOSE button and select the directory where the webRDP
software will be installed. The default directory is webRDP. Hit the NEXT button when
complete.
5. License File. Use the CHOOSE button to browse and select the webRDP license file. This
file should be sent to the customer after purchase of the product or can be downloaded
through the Stoneware customer portal. Select the NEXT button when complete.
© 2013 Stoneware, Inc.
14
webRDP HTML5 Gateway
6. webRDP Port Configuration. Check the ENABLE SSL box if you want the gateway to support
HTTPS connections from the browser.
When the Enable SSL box is checked, you will either create a self-signed certificate or
specify an existing keystore with a signed certificate. The directions for each are below:
© 2013 Stoneware, Inc.
Installation
15
Self Signed Certificate
This option will create a keystore that will allow the gateway to support SSL. This
keystore is "self signed", therefore the user will be prompted with the warning
about the SSL certificate prior to connecting with the browser to the gateway. See
the Adding a Signed SSL Certificate section on how to request and install a valid
SSL Certificate on the gateway.
6a. Enter the Internet domain name for the server (e.g. - stone-ware.com)
6b. Enter the Keystore password, since it is creating a new keystore, you are
setting a new password. Please write it down, remember it.
6c. Enter the Keystore password again, hope you remembered it.
Existing Keystore
Use this option when you have an existing keystore that has a valid imported
certificate.
6a. Select the BROWSE button and locate the keystore file
6b. Enter the Keystore's password
6c. Re-enter the Keystore's password
Select the NEXT button to continue.
7. Optional Settings. This option allows the administrator to customize the HTML5 gateway
configuration. The options are described below. When customization is complete, select
the NEXT button to continue.
© 2013 Stoneware, Inc.
16
webRDP HTML5 Gateway
Custom Index.html Page
This option allows the administrator to replace the default index page with the
standard connection screen with another customized web page. The page can be
replaced to create new interfaces, automatically connect users to a specific system,
add new logic into the connection process, automatically login, etc. Please see the
section on Integrating into a Web Page later in the chapter.
Custom Background Image
This option allows the administrator to specify a different default background on the
webRDP Gateway connection page. Check the CUSTOM BACKGROUND IMAGE and
select the BROWSE icon and select the image that will replace the default background.
Background image guidelines are provided below:
Supports PNG and JPG image formats
Recommended image size should be 100k or less
Recommended dimensions are 1920x768 pixels
Custom Logo
This option allows the administrator to specify a different product logo. Organizations
can place their logo on. Check the CUSTOM LOGO IMAGE and select the BROWSE icon
to select the image that will replace the default logo. Logo image guidelines are
provided below:
© 2013 Stoneware, Inc.
Installation
17
Supports PNG and JPG image formats
Recommended image size should be 50k or less
Recommended dimensions are 100x100 pixels
Select the NEXT button when complete.
8. Firewall Note. If you are installing the HTML5 Gateway in a DMZ, please review the
Security Gateway section. Select the NEXT button to continue.
9. Pre-Installation Summary. Review the installation summary and select the INSTALL button
to continue.
© 2013 Stoneware, Inc.
18
webRDP HTML5 Gateway
10. The file installation will proceed.
11. Select the DONE button when the file installation has completed.
© 2013 Stoneware, Inc.
Installation
19
-
The installation has been completed. The webRDP HTML5 Gateway has been installed as
a Windows service and automatically started. To connect to the webRDP HTML5 Gateway,
follow the steps below:
1. From another workstation or laptop, open a web browser
2. Enter the IP address or DNS server name of the webRDP HTML5 Gateway server
3. Enter the connection parameters of an existing Windows desktop with Remote
Desktop Support or a Terminal Server to test and verify the gateway is functional
5
Connecting to the HTML5 Gateway
By default, the webRDP HTML5 Gateway runs over HTTP on port 80. This is the default protocol
and port for web traffic and therefore can be accessed by typing the IP address or DNS name of
the server running the webRDP HTML5 Gateway.
If the person installing the webRDP HTML5 Gateway has selected a different protocol (i.e. HTTPS) or port number (e.g. - 8088), the end user will need to connect using a different URL.
For HTTPS:
https:\\[IP Address]
For a Modified Port Number
© 2013 Stoneware, Inc.
20
webRDP HTML5 Gateway
http:\\[IP Address]:[Port Number]
When the user has successfully connected to the webRDP HTML5 Gateway, he should see the
default screen below. This is the standard connection interface displayed by webRDP HTML5
Gateway. A user can enter the connection parameters of the remote Windows desktop or remote
Terminal Server to connect through the gateway.
6
Branding the Gateway
The webRDP HTML5 Gateway can be branded as part of the installation process. Branding is the
process by which the default background image and logo on the connection screen are replaced
with custom images. These images can be in the following formats:
PNG
JPG
GIF
Note:
Be careful when adding custom images. You should always try to minimize the size of
your custom images to maximize the performance of the connection page loading inside
the user's browser. Stoneware recommends that the background image be less than
100kb and the logo be less than 50kb.
During the installation process there will be an OPTIONAL SETTINGS screen that allows the
installer to select either a custom background or custom logo.
© 2013 Stoneware, Inc.
Branding the Gateway
21
To change the default background, the installer can select the checkbox next to the Custom
Background option and then browse the local machine for the replacement background image.
To change the default logo, the installer can select the checkbox next to the Custom Logo option
and then browse the local machine for the replacement background image.
Advanced
The custom background and logo images are placed within the product directory during the
installation process. If you wish to update or change these images at any time, follow the steps
below:
Updating the Image
1. Navigate to the /webRDP-Gateway/jetty/webapps/root/images directory on the
webRDP HTML5 Gateway server
2. Replace the current custom image with an update image
Changing the Image Name
1. Navigate to the /webRDP-Gateway/jetty/config directory
2. modify the jetty.properties file with a text editor
3. Modify the customBG= line (or customLogo)
© 2013 Stoneware, Inc.
22
webRDP HTML5 Gateway
4. Change the file name at the end of the string
* Note - the file path requires each directory to be separated by \\
The custom image settings are stored in the Jetty.properties file. Sample provided below:
#Tue Feb 26 16:05:00 EST 2013
port=80
keyPassword=
keystorePassword=
SSLPort=443
useCustomHTML=false
useCustomBG=true
customHTML=
keystore=
customBG=C\:\\webRDP-Gateway\\jetty\\webapps\\root\\images\\hero-1.png
useCustomLogo=false
customLogo=
SSL=false
To disable the custom image you must change the useCustomLogo and useCustomBG to FALSE.
7
Security Gateway
In addition to enabling any device with an HTML5 browser to connect to a remote Windows
system, the webRDP HTML5 Gateway can act as a secure gateway to your Windows desktops,
Terminal Servers, and VDI systems. As the diagram below demonstrates, the webRDP HTML5
Gateway converts the HTML5 over HTTP(S) conversation to an RDP (remote desktop protocol)
conversation on the inside of the network. This conversion of protocols is what makes the
product a true "gateway". The user's session is terminated at the gateway inside the DMZ and
then converted to an RDP session that the remote Windows devices can understands. This
feature of the product means that organizations do not have to move their Terminal Servers and
VDI systems into the DMZ or open holes from the outside world (Internet) into the data center.
© 2013 Stoneware, Inc.
Security Gateway
23
Setting up the webRDP HTML5 Gateway inside the firewall is very simple. The administrator
should follow the steps below:
1. Open ports 443 and 80 from the Internet to the webRDP HTML5 Gateway server in the DMZ
Port 80 does not need to be opened if the webRDP HTML5 Gateway has been configured
to support SSL
2. Open port 3389 from the webRDP HTML5 Gateway server to each device inside the data
center
3. Follow the instructions for "hardening" the operating system on the server running the
gateway. Your OS vendor should supply this information on their support site.
8
Adding a Signed SSL Certificate
By default, when enabling SSL (Secure Socket Layer) on the webRDP HTML5 Gateway the SSL
certificate is "unsigned". This means that it is not trusted by a Certificate of Authority and will
display a message to the end users stating the "site is untrusted/protected, do you wish to
continue?". Stoneware recommends that customers acquire a signed SSL Certificate for the
webRDP HTML5 Gateway when enabling SSL. There are many vendors that provide SSL
certificates. The documentation below describes how to request and import an SSL certificate.
© 2013 Stoneware, Inc.
24
webRDP HTML5 Gateway
Before You Begin
This example will use Portecle, it is a tool for viewing and modifying keystores. You can
download this tool from the following URL: Download Portecle from http://sourceforge.net/
projects/portecle
Enabling an SSL Certificate is a three step process:
1. Creating a Certifcate Request
2. Importing Certificates from the Certificate of Authority
3. Verifying SSL is enabled with a Trusted SSL Certificate
Creating a Certificate Request
This step will generate a certificate request that can be used by an SSL vendor to generate a
valid SSL certificate.
1. Run the Portecle tool
2. Select FILE | OPEN KEYSTORE FILE
3. Browse to the /webRDP-Gateway/jetty/etc directory
4. Select the KEYSTORE file (file Type will be All Files)
5. Select the OPEN button
6. Enter the Password for the Keystore; this is the password you provided during installation
of the product
7. RIGHT-CLICK on the WEBRDP key
8. Select GENERATE CERTIFICATE REQUEST
9. Enter the Password for the Keystore; this is the password you provided during installation
of the product
10. Save the Certificate Request file to your desktop using the GENERATE button to save the
request file
Requesting an SSL Certificate
There are several SSL Certificate vendors to select from including GoDaddy, RapidSSL,
GeoTrust, Thawte, etc. In each case you will need to provide the vendor with the contents of
the certificate request file created in the previous steps and the type of keystore you are
using. When asked by the vendor for the type of keystore, you can reply with TOMCAT or
JETTY.
Importing the SSL Certificate
Once the SSL vendor has successfully fulfilled your request for an SSL certificate, they will
© 2013 Stoneware, Inc.
Adding a Signed SSL Certificate
25
respond back with a set of one or more files. These files will include the actual certificate
response and one or more root/intermediate certificates. Follow the instructions below to
import the certificate response and the intermediate certificates into the keystore.
If your CA sent you one or more intermediate or root certificates then those will need to be
imported.
1. From Portecle (with the keystore open) click on TOOLS, and then IMPORT TRUSTED
CERTIFICATE
2. Select your Intermediate / Root certificates that you were sent via email or told to
download
IMPORTANT: If you get any errors, it may be easier to import the SSL certificates into Internet
Explorer and then
export them from Internet Explorer. Once complete, you are ready to import them into the
KEYSTORE.
**note - If you are obtaining a certificate from DigiCert, you will need to make sure you
have their proper Intermediate Certificate in IE. The easiest method for this is to use
their Certificate Management Tool: https://www.digicert.com/util/ With this tool, you
can easily import the correct intermediate certificate, which is necessary to build the
proper certificate chain.
Take the certificate you were sent, open Internet Explorer and go to :
1. Tool | Internet Options | Content | Certificates |Import
2. Select the certificate you were sent from your CA.
3. Once imported, find the certificate usually located under the Other People tab.
4. Right click on it and choose Export, select Cryptographic Message Syntax Standard PKCS
#7 option.
5. Select Include all certificates in the certification path if possible.
6. Save this file so you can import it into Keystore.
3. From the Portecle tool, right click on your webRDP keypair and choose IMPORT CA REPLY
4. Select the file from the SSL vendor or the P7B file that you just exported from Internet
Explorer
5. You may get a message that says: Click OK, Verify the information about the SSL Certificate;
click OK.
6. Select YES when it asks if you want to accept the CA Reply
7. You should see a message that the CA Reply Import Successful.
8. Click FILE | SAVE to save your changes to the keystore
9. You are now done; restart your webRDP HTML5 Gateway
© 2013 Stoneware, Inc.
26
9
webRDP HTML5 Gateway
Customizing the Interface
The webRDP HTML5 Gateway has been designed to allow organizations such as MSPs, hosted
providers, and IT shops to customize the gateway to create their own unique solution. This allows
organizations to add their own business logic to the connection process for improved security,
device selection, simplified login, etc. with HTML, Javascript, or Java Server Page (JSP) code.
Out of the box, the standard webRDP HTML5 Gateway connection process is displayed below. The
user's enters the IP address or DNS name of the webRDP HTML5 Gateway. The gateway displays
the connection screen to the end user. The user must enter the information required to connect
to the remote Windows device (i.e. - Remote Windows IP address, username, password, etc.).
Once the correct information has been entered, the webRDP HTML5 Gateway will connect the
user to the remote Windows device. In each case, the user must know which Windows device
they wish to connect to, its address, and the proper authentication credentials.
Customizing the interface allows the customer to change the logic surrounding the connection
process. As shown below, the standard connection screen is replaced by a custom connection
page (HTML or JSP) that executes its own logic before connecting to the back-end Windows
device.
The rest of this chapter will discuss how to enable a custom connection page on the webRDP
HTML5 Gateway and how to create a custom JSP or HTML page.
Enabling the Custom Connection Page Through the Install Process
During the installation process the Optional Settings screen will be presented with the ability to
enable a custom connection screen (see below).
© 2013 Stoneware, Inc.
Customizing the Interface
1.
2.
3.
4.
5.
27
Check the USE CUSTOM INDEX.HTML Page
Select the BROWSE (...) button
Browse and select the custom HTML or JSP page
Select the OK button
Select the NEXT button
Enabling the Custom Connection Page After the Installation
Enabling a custom connection page after the standard installation process can be accomplished by
following the steps below:
1.
2.
3.
4.
5.
6.
Stop the webRDP HTML5 Gateway Service
Copy your custom HTML or JSP page to /webRDP-Gateway/Jetty/webapps/root
Modify the existing INDEX.HTML page under /webRDP-Gateway/Jetty/webapps/root/
Change the META tag to redirect to your custom HTML or JSP page
Save the changes to INDEX.HTML
Restart the webRDP HTML5 Gateway service
© 2013 Stoneware, Inc.
28
9.1
webRDP HTML5 Gateway
Custom Page Tags
The webRDP HTML5 Gateway was specifically designed to be embedded within other web
applications and web pages. Any developer can invoke the webRDP HTML5 Gateway from their
web application or web page by calling the tags below and passing the appropriate parameters.
Parameters can be passed by adding the attributes between the tags:
<param name='username' value='<%= user %>'>
The parameters that can be passed to the applet tag are listed below:
<host=>
= host IP address or DNS name
<port=>
= host RDP port (default is 3389)
<username=>
= username
<password=>
= user's password
<domain=>
= Terminal Server Domain (optional)
<program=>
= program automatically launched (Terminal Server only)
<directory=>
= set programs working directory (optional)
<maxwidth=>
= desktop screen maximum width in pixels
<maxheight=> = desktop screen maximum height in pixels
<bpp=>
= desktop color depth (8/15/16/24)
<keepalive=>
= number of seconds between keep alive events (10-300)
<onlogout=>
= javascript function to execute on Terminal Server logout event
<admin=>
= whether or not to connect to the admin session on a MS Terminal Server
( to enable = Y, T, or 1 )
<setoption=>
= suppress messages from an unexpected disconnect (to enable = set
close-messages-off)
<pf=>
= performance flags (add the values to apply multiple performance flags)
Disable Wallpaper: 1
Disable Full Window Drag: 2
Disable Menu Animations: 4
Disable Theming: 8
Disable Cursor Shadow: 32
Disable Cursor Settings: 64
Example: a setting of 96 would mean Cursor Shadow and Cursor Settings were disabled.
The advanced parameters that can be passed to the applet tag are listed below:
<epassword=>
= encrypted user password
© 2013 Stoneware, Inc.
Customizing the Interface
29
Use the PassGen utility that ships with the advanced client to create the
encrypted password. To create an encrypted password, follow the steps below:
1.
2.
3.
4.
copy the webRDP.jar, license, and PassGen.jar file into the same directory
Run the PassGen utility at a command line (i.e. - java - jar PassGen.jar)
Enter the password to be encrypted and hit ENTER
Enter the FROM date (0 is a perpetual password that does not expire) and
hit ENTER
5. An encrypted password will be displayed. Copy the password onto the /ep
parameter.
<ss-version=>
or 2)
<ss-id=>
<ss-string=>
only)
<proxy=>
desktop
= version number of session selection method (supports either 1
= the connection ID (must be an integer)
= string that will be passed to the connection broker (version 2
= proxy server used to connect to Terminal Server or remote
Proxy format = (http | https | socks )://user:password@address:
[port]
Example = https://fred:[email protected]:8080
9.2
Sample HTML Page
Sample HTML Page
A sample of an HTML is given below:
<html>
<head>
<title>webRDP&#0153;</title>
<meta http-equiv='content-type' content='text/html; charset=iso-8859-1'>
<meta http-equiv='content-style-type' content='text/css'>
<meta http-equiv='expires' content='Wed, 26 Feb 1997 08:21:57 GMT'>
<meta http-equiv='pragma' content='no-cache'>
<!-- Sets margin around applet -->
<style>
body.swproxyBody { margin:4px;; }
</style>
<script type='text/javascript'>
© 2013 Stoneware, Inc.
30
webRDP HTML5 Gateway
// The script below is used to move and resize the browser to the full size of the
monitor. Uncomment the two lines below to activate.
// window.moveTo(0,0);
// window.resizeTo( screen.availWidth, screen.availHeight );
// The script below is used to center and resize the browser to a 800 x 600 px
window. Uncomment the lines below to activate.
// var height = 600;
// var width = 800;
// var left = parseInt( ( screen.availWidth/2 ) - ( width /2 ) );
// var top = parseInt( ( screen.availHeight/2 ) - ( height /2 ) );
// window.moveTo( left, top );
// window.resizeTo( width, height );
// This method is called after the user logs out of their RDP session. The method
name is a congfigurable applet parameter.
function rdpOnLogout() {
alert ( ' User has Logged out ' );
}
</script>
</head>
<body class='swproxyBody'>
<!-- Loads the applet and utilizes 100% of browser window width and height. Width and
height could be hard coded to specific values -->
<applet name='rdp' code='com.webinflection.webrdp.MainApplet' archive='webRDP.jar'
width='100%' height='100%'>
<!-- Hostname or IP Address of Terminal Server -->
<!-- This is a required parameter -->
<param name='host' value='10.1.1.25'>
<!-- Port that the Terminal Server -->
<!-- This is a required parameter. -->
<param name='port' value='3389'>
<!-- Username to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter -->
<param name='username' value='joe'>
<!-- Password to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter. If left blank, the Terminal Server will prompt the
user to supply their password.-->
© 2013 Stoneware, Inc.
Customizing the Interface
31
<param name='password' value='cat1dog2'>
<!-- AD Domain name to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter. In some Terminal Server deployments, this
parameter will be required. -->
<param name='domain' value=''>
<!-- Application to start. This value should be url encoded. In this example we are
launching c:\windows\system32\notepad.exe-->
<param name='program' value='c%3A%5Cwindows%5Csystem32%
5Cnotepad.exe'>
<!-- Working directory for Application. This value should be url encoded. In this
example the working directory will be set to c:\windows\system32\ -->
<param name='directory' value='c%3A%5Cwindows%5Csystem32%5C'>
<!-- In this example I used a site ( http://meyerweb.com/eric/tools/dencoder/ ) to
encode the above values -->
<!-- This specifies a javascript method to be called after the user logs out of the
RDP session. This stops the session from hanging is a disconnected state. -->
<param name='onlogout' value='rdpOnLogout'>
</applet>
</body>
</html>
9.3
Sample JSP
Sample JSP is given below:
<%@page import="java.net.*"%>
<%
// This example modifies the HTML example and uses the JSP to pass the parameters to the
applet
// We are not really dynamically creating the parameters, but this is where you would make
calls to your configuration apis to get the parmeter values
String host = "10.1.1.25";
String port = "3389";
// Single Sign-on Parameters.
String user = "administrator";
© 2013 Stoneware, Inc.
32
webRDP HTML5 Gateway
String pass = "stoneware";
String domain = "";
// Published Application Parameters. Remember to URLEncode the program and the directory
String program = URLEncoder.encode( "c:\\windows\\system32\\notepad.exe" );
String directory = URLEncoder.encode( "c:\\windows\\system32\\" );
%>
<!-This example demonstrates RDP SSO ( Single Sign-on ) and a Published Application ( MS
notepad in this case )
-->
<html>
<head>
<title>webRDP</title>
<meta http-equiv='content-type' content='text/html; charset=iso-8859-1'>
<meta http-equiv='content-style-type' content='text/css'>
<meta http-equiv='expires' content='Wed, 26 Feb 1997 08:21:57 GMT'>
<meta http-equiv='pragma' content='no-cache'>
<!-- Sets margin around applet -->
<style>
body.swproxyBody { margin:4px;; }
</style>
<script type='text/javascript'>
// The script below is used to move and resize the browser to the full size of the
monitor. Uncomment the two lines below to activate.
// window.moveTo(0,0);
// window.resizeTo( screen.availWidth, screen.availHeight );
// The script below is used to center and resize the browser to a 800 x 600 px
window. Uncomment the lines below to activate.
// var height = 600;
// var width = 800;
// var left = parseInt( ( screen.availWidth/2 ) - ( width /2 ) );
// var top = parseInt( ( screen.availHeight/2 ) - ( height /2 ) );
// window.moveTo( left, top );
// window.resizeTo( width, height );
© 2013 Stoneware, Inc.
Customizing the Interface
33
// This method is called after the user logs out of their RDP session. The method
name is a congfigurable applet parameter.
function rdpOnLogout() {
alert ( ' User has Logged out ' );
}
</script>
</head>
<body class='swproxyBody'>
<!-- Loads the applet and utilizes 100% of browser window width and height. Width and
height could be hard coded to specific values -->
<applet name='rdp' code='com.webinflection.webrdp.MainApplet' archive='webRDP.jar'
width='100%' height='100%'>
<!-- Hostname or IP Address of Terminal Server -->
<!-- This is a required parameter -->
<param name='host' value='<%= host %>'>
<!-- Port that the Terminal Server -->
<!-- This is a required parameter -->
<param name='port' value='<%= port %>'>
<!-- Username to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter -->
<param name='username' value='<%= user %>'>
<!-- Password to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter -->
<param name='password' value='<%= pass %>'>
<!-- AD Domain name to authenticate to Terminal Server with -->
<!-- Optional SSO Parameter -->
<param name='domain' value='<%= domain %>'>
<!-- Application to start. This value should be url encoded. -->
<param name='program' value='<%= program %>'>
<!-- Working directory for Application. This value should be url encoded. -->
<param name='directory' value='<%= directory %>'>
<!-- This specifies a javascript method to be called after the user logs out of the RDP
session -->
<param name='onlogout' value='rdpOnLogout'>
</applet>
</body>
© 2013 Stoneware, Inc.
34
webRDP HTML5 Gateway
</html>
© 2013 Stoneware, Inc.