Add and configure an application

Updated at:

Bastionhost supports O&M and management of applications. Before you perform O&M on an application, associate the servers and clients related to the application in Bastionhost. This topic describes how to add and configure an application in Bastionhost.

Prerequisites

Add an application

  1. Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.

  2. In the list of Bastionhost instances, find the target instance and click Manage.

  3. In the navigation pane on the left, choose Assets > Applications.

  4. On the Applications tab, click Create Application. In the panel that appears, configure the parameters described in the following table, and then click OK.

    Configuration item

    Description

    Application Name

    Enter a custom name. The name must meet the following requirements:

    • It must be 1 to 128 characters in length.

    • It cannot start with a special character.

    • It can contain only periods (.), underscores (_), hyphens (-), backslashes (\), and spaces.

    Application Server

    Select the server that is used to access the application. For more information about how to add an application server, see Add and deploy an application server.

    Associate Remote Client

    Select the client that is used to access the application. For more information about how to add a remote client, see Add a remote client.

    Application Type

    The system automatically identifies the client application type.

    Destination URL

    The application URL that opens automatically when you perform O&M on the application. You can set the destination URL only when Google Chrome or Mozilla Firefox is selected as the remote client type.

    O&M Access Rules

    You can configure O&M access rules only when Google Chrome is selected as the remote client type.

    • Only allow O&M access to URLs that have the same IP address or domain name as the destination URL: When enabled, URLs opened during O&M of web applications are checked. You can open only URLs with the same IP address or domain name as the application destination URL, and URLs allowed by the O&M access rules configuration.

    • Blacklists and whitelists: Configure URL blacklists and whitelists.

    Example: If you set https://example.com as the destination URL, enable "Only allow O&M access to URLs that have the same IP address or domain name as the destination URL" and "Blacklist", and add https://example.com/help to the blacklist, O&M users authorized for the application cannot access content in the /help resource directory of the website. Other resource paths are unaffected.

Set up automatic logon to a web application

If the remote client associated with an application is Google Chrome or Mozilla Firefox, you can configure an autofill script in the browser and store the username and password of the web application in a new application account. This enables automatic logon to the web application during O&M.

Note
  • Websites with anti-bot logon detection do not support autofilling usernames and passwords.

  • For websites that require a verification code, automatic logon is not supported after autofill. You must enter the verification code manually to log on.

Generate and configure the autofill script

The plug-in for generating an autofill script runs only in Google Chrome, but the generated autofill script can be used in applications running in Google Chrome and Mozilla Firefox.

  1. Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.

  2. In the list of Bastionhost instances, find the target instance and click Manage.

  3. In the navigation pane on the left, choose Assets > Applications.

  4. On the Applications tab, find the target application. In the Actions column, click Edit.

  5. On the Application Configurations tab, click Download the browser plug-in, and decompress it locally.

    Import the downloaded plug-in into the browser extension. Follow the plug-in instructions, and then paste the generated content into the Autofill Script field.

  6. In Google Chrome extensions, add the decompressed plug-in (extension folder), and then enable it.

    After the plug-in is loaded, Bastionhost Web Configuration Generator 1.0 appears in the extension list. Verify that the toggle switch in the lower-right corner is turned on.

  7. In Google Chrome, open the web application that requires autofill on its logon page. Click the extension, and then click Start.

    The following example uses the logon page of an Alibaba Cloud RAM user:

    In the extension pop-up, verify that Configuration Type is set to Autofill.

  8. Follow the on-screen instructions to right-click and use the extension to add the username input box, password input box, and logon button in sequence.

    • Illustration of adding a username input box

      Right-click the username input box on the logon page. In the menu that appears, choose Bastionhost Web Configuration Generator > Add Username Input Box.

    • Illustration of adding a password input box

      At the password input box on the RAM user logon page, click the Add Password Input Box button that the Bastionhost Web Configuration Generator extension provides in the lower-right corner of the page. This adds the password input box to the autofill script.

    • Illustration of adding a logon button

      Right-click the RAM user logon page to open the browser context menu. At the bottom of the menu, find the Bastionhost Web Configuration Generator extension, and then click Add Logon Button to its right.

  9. After you add these items, the script is generated in the clipboard automatically. Return to the Bastionhost Application Configurations tab, paste the generated autofill script, and then click Update.

    Application Configurations tab shows the following message at the top: First download the browser plug-in and import it into the browser extension. Then follow the plug-in instructions and paste the obtained content into the Autofill Script field below.

If you encounter an error when you download or configure the application proxy plug-in, use the following troubleshooting methods:

  • application proxy plug-in page fails to load, or the download fails: Refresh the page and try again.

  • A browser compatibility issue prevents configuration: If refreshing the page does not resolve the issue, switch to Google Chrome or Mozilla Firefox and try again.

  • All online methods are unavailable: submit a ticket to contact customer service and request the application proxy plug-in installation package, and then install it manually on your local machine.

Create an application account

  1. Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.

  2. In the list of Bastionhost instances, find the target instance and click Manage.

  3. In the navigation pane on the left, choose Assets > Applications.

  4. On the Applications tab, find the target application. In the Actions column, click Edit.

  5. On the Application Account tab, click Create Application Account. In the panel that appears, set the username and password of the web application, and then click OK.

Related operations

  • Edit an application: To modify configurations such as the application name or the associated application server, in the Actions column, click Edit.

  • Delete an application: If your business requirements change and you no longer need to maintain an application, in the Actions column, click Delete.

FAQ

What should I do if I go directly to the remote desktop instead of starting the specified application when performing O&M on a Windows application server?

Cause: The application does not have a valid Destination URL configured, or it is not correctly associated with an application account.

Solution:

  1. Edit the application in the Bastionhost console. In the Destination URL field, enter a valid address, such as http://localhost or the VPC intranet address of the application, as the start page. You can set the destination URL only when Google Chrome or Mozilla Firefox is selected as the remote client type.

  2. Associate an application account with the application, and then grant the application to the appropriate users.

  3. Verify that Bastionhost Assistant is installed and running as expected on the user terminal.

  4. After you start the browser application through Bastionhost, manually enter the VPC intranet address of the target application in the browser address bar to access it.

Do Bastionhost applications support password-free automatic logon for RAM users?

The RAM identity itself does not support password-free automatic logon:

  • A RAM account must first be imported into Bastionhost and granted asset and account permissions before you can perform O&M through Bastionhost.

  • Password-free logon depends on the password or private key stored in an application account, not on the RAM identity.

  • You must still enter a password or use public key authentication when logging on. If multi-factor authentication (MFA) is enabled, you must also enter a verification code.

What should I do if the browser cannot start and prompts me to reconfigure USMdriver during O&M through Bastionhost?

Cause: Only the script was deployed during application publishing, and the USMdriver component was not correctly published.

Solution: Follow the instructions in Add an application server to reconfigure the application publishing process and make sure that USMdriver is published correctly.

Does Bastionhost support direct logon to HTTP services?

Bastionhost primarily provides remote O&M for Windows and Linux servers. It does not directly provide a feature for logging on to HTTP services.

To access an HTTP service through Bastionhost, add a web application, select Google Chrome or Mozilla Firefox as the remote client, and then configure Destination URL as the HTTP service address. You can then access the service through a browser-based remote client. For instructions, see Add an application.