Skip To Content

Set up security for the JavaScript Viewer

Disponible avec une licence Workflow Manager.

Set up web security for the ArcGIS Workflow Manager (Classic) JavaScript Viewer using either Windows Authentication with IIS, Portal for ArcGIS Authentication, or ArcGIS Server token authentication.

Set up security using Windows authentication with IIS

Follow these steps to set up web security using Windows Authentication:

  1. Enable Windows Authentication in IIS.
  2. Ensure that Anonymous Authentication is turned off for your website.
  3. In the JavaScript Viewer folder, rename the web.config file to web-secure.config.
  4. Modify the deployed js/app/WorkflowManager/config/AppConfig.js file to use Windows Authentication.
    1. Set the Authentication mode parameter to windows (AuthenticationMode: "windows")
  5. Rename the index.html file to index.aspx. This allows the file to be edited as a .NET file.
  6. Open the index.aspx file for editing.
  7. Enable the app to use the Windows Authenticated user.
    1. For repositories without domain authentication, uncomment var user = "<%= User.Identity.Name.Replace(MyDomain)\","") %>"; and replace MyDomain with your organization's domain.
    2. For domain authentication, uncomment var user = "<%= User.Identity.Name.Replace("\","*") %>";.
  8. Set up the app to use the Windows Authenticated user at startup.
    1. Uncomment Controller.startup( {user: user} );.
    2. Comment out //Controller.startup();.
      Remarque :

      Some web browsers automatically sign in users. If your browser does not, provide your user credentials and click OK.

Set up security using Portal for ArcGIS authentication

Workflow Manager (Classic) JavaScript Viewer can be configured to use Portal for ArcGIS authentication. Support for portal authentication was added in ArcGIS Workflow Manager (Classic) 10.3.1. This configuration requires ArcGIS Server to be federated with an on-premise Portal for ArcGIS installation.

For Portal for ArcGIS 10.5

In Portal for ArcGIS 10.5, the Workflow Manager (Classic) JavaScript Viewer can be deployed to a predefined location in the on-premises portal app directory. The app directory for the Workflow Manager (Classic) web app is preregistered, so no additional web app registration is needed.

  1. Copy the contents of the Workflow Manager (Classic) JavaScript Viewer folder into the Portal for ArcGIS installation directory: \ArcGIS\Portal\apps\workflow.
  2. Modify the deployed workflow/app/WorkflowManager/config/AppConfig.js file to use Portal for ArcGIS authentication.
    1. Set the AuthenticationMode parameter to portal (AuthenticationMode: "portal").
    2. Update the PortalURL parameter with the URL of your portal (PortalURL: "https://your-server/portal")
    3. Verify that the ApplicationID parameter is set to wmxweb.
  3. Access the JavaScript Viewer.
    1. Sign in to your portal and search for the ArcGIS Workflow Manager (Classic) app.
    2. Access the app using the following URL syntax: https://your-server.domain/portal/apps/workflow.

For Portal for ArcGIS versions earlier than 10.5

The Workflow Manager (Classic) JavaScript Viewer must be manually added and registered as an app in Portal for ArcGIS.

  1. Copy the contents of the Workflow Manager (Classic) JavaScript Viewer folder into the web folder of the HTTP server, either at the root or a subfolder—for example, C:\Inetpub\wwwroot, C:\Inetpub\wwwroot\wmviewer, C:\Apache\htdocs, or C:\Apache\htdocs\wmviewer.
  2. Add the JavaScript Viewer as an item in Portal for ArcGIS.
  3. Register the JavaScript Viewer with Portal for ArcGIS.
  4. In the Portal for ArcGIS Application Settings, update the App Registration and add the machine that you are using to host the JavaScript Viewer to the existing Redirect URIs. The redirect URI can be redirected after users successfully sign in—for example, https://[hostname].domain.
  5. Copy the Application ID of the registered JavaScript Viewer.
  6. Modify the deployed js/app/WorkflowManager/config/AppConfig.js file to use Portal authentication.
    1. Set the AuthenticationMode parameter to portal (AuthenticationMode: "portal").
    2. Update the PortalURL parameter with the URL of your portal (PortalURL: "https://your-server/portal").
    3. Update the ApplicationID parameter to the ID of the registered JavaScript Viewer.

      This is the same ApplicationID you copied in step 5.

      The ID is set to your app's ID.

  7. Access the JavaScript Viewer by doing one of the following:
    1. Sign in to your portal and click the Workflow Manager (Classic) JavaScript Viewer that you registered in Portal for ArcGIS.
    2. Access the Workflow Manager (Classic) JavaScript Viewer directly using the app URL.

Use token authentication

When using ArcGIS Server token authentication with server built-in roles and users from the Windows domain, you need to provide the domain and the username when you sign in to the Workflow Manager (Classic) JavaScript Viewer. This is irrespective of whether domains are enabled for use in Workflow Manager (Classic).