Application web services

Give the person running a streaming session secure access to a web interface or API of your application, such as the Autodesk VRED Web Interface — without opening a firewall port.

Many applications bring a small web server with them: a browser interface to control the scene, or an HTTP API for automation. The Autodesk VRED Web Interface is the best-known example. In a cloud-rendered session that web server runs on the streaming server, where the user cannot reach it directly.

A web service tells Portal about such an interface. Portal then makes it available to the person running the session, next to the stream:

  • over HTTPS, on the standard port 443
  • only to the signed-in user who runs the session
  • only while the session is running
  • with no firewall port to open

Web services are configured per application and apply to cloud-rendered sessions only.

Secure by default

A web service is closed unless Portal opens it for the right person.

Web service
Reachable from the internetNot directly. The application's port stays closed in the cloud firewall. All access goes through Portal's streaming gateway.
EncryptionHTTPS, also when the application itself only speaks plain HTTP. Portal adds the encryption in front of it.
AuthenticationRequired. The user has to be signed in to Portal.
AuthorizationOnly the user who runs the session can open the service. Knowing the address is not enough: other people, including other members of your organization, are refused.
LifetimeAccess exists only while the session is running and ends with it.

This replaces the earlier approach of opening the application's port as a firewall rule, which made the interface reachable without encryption and without sign-in for everyone the rule admitted. See Web services and firewall rules if you still have such a rule.

Your application needs no change for any of this, and it does not need a login of its own for the web interface: Portal handles sign-in and access in front of it.

What the user sees

When a session of an application with web services is running, the session page in the web browser shows them in two ways:

  • Inline. A service with a browser interface gets its own tab next to the Stream tab, named after the service. Use the layout switch on the right to choose Single view (the selected tab fills the area) or Split view (stream and service side by side). Each service panel offers Open in new tab, Reconnect and, in split view, Hide panel.
  • Link only. A service without a browser interface, such as a plain API, is listed under Web services in the session's menu and opens in a new browser tab.

Services appear once the application has started. If a panel shows an error or stops responding, select Reconnect.

Autodesk VRED: already set up

Every Autodesk VRED application gets the VRED Web Interface as a web service automatically, shown inline. This applies to VRED projects uploaded as a VPB file and to VRED builds with a wrapper, and it was added to existing VRED applications as well. There is nothing to configure.

You can edit this service like any other, and Portal keeps your changes. If you delete it, Portal adds it again the next time a VRED build is uploaded to the application.

Declare a web service

You need permission to change the application — see User groups and permissions.

  1. In the Portal Control Panel, open Applications and select your application.

  2. Open the Streaming tab and go to the Web Services section.

  3. Select Add web service and fill in the form:

    FieldWhat to enter
    NameThe name users see as the service's tab in the session page, for example VRED Web Interface.
    SlugA short technical name that becomes part of the service's address. Portal suggests one from the name. Lower-case letters, digits and hyphens, at most 26 characters, unique within the application.
    SchemeHTTP or HTTPS — how your application serves the interface on the streaming server itself. Users always connect over HTTPS, whichever you choose.
    PortThe port your application listens on, on the streaming server, for example 8888.
    Show inline in the session pageTurn on for a service with a browser interface: it opens as a tab next to the stream. Leave off for a plain API, which is offered as a link only.
    Description (optional)A note for administrators, shown in the list of web services.
  4. Save the form. The service is listed with its slug, its address on the streaming server and whether it is shown Inline or as Link only.

To change or remove a service, open its options menu and select Edit web service or Delete web service.

Changes apply to sessions started after you save.

Preparing your application

  • The application has to serve the interface on the streaming server on the port you declared. Portal connects to it locally, so the application only needs to listen on localhost. We recommend exactly that: do not bind the interface to all network interfaces.
  • Inline services are shown inside the Portal session page. If the interface does not work when embedded, turn Show inline in the session page off and use it as a link.

Limits

  • An application can declare at most 10 web services.
  • A slug has to be unique within the application. A few names are reserved for Portal's own services; the form tells you when a slug cannot be used.
  • Web services carry HTTP, HTTPS and WebSocket traffic. Other protocols are not supported.
  • Access is tied to the person running the session in the web browser. If you need to call an application's API from your own tools or automation, contact Innoactive support to discuss your setup.

Web services and firewall rules

A web service does not need a firewall rule. Leave the application's port closed.

A firewall rule for the same port is only needed for older clients that connect to the streaming server directly instead of through Portal's streaming gateway. The firewall rule preset Legacy VRED (ports 8888 and 8889) exists for this case.

Keep in mind what such a rule does: it opens the port itself, in addition to the web service. Connections through that port are not encrypted and not checked by Portal, and are open to every address the rule admits. The Control Panel warns you when a firewall rule covers the port of a declared web service.

Recommendations:

  • If all your users reach the interface through the session page, remove the firewall rule for that port.
  • If you still need the rule for older clients, restrict its source to your own network ranges instead of leaving it open to all addresses, and remove it once those clients are updated.

Troubleshooting

SymptomLikely causeWhat to do
No service tab appears in the session pageThe application has not started yet, the service is set to Link only, or the application has no web service declaredWait for the application to start; look under Web services in the session's menu; check the Web Services section on the application's Streaming tab
"Could not connect to …" in the service panelThe application is not listening on the declared port, or the scheme does not matchCheck Port and Scheme against the application's own settings, then select Reconnect
The panel shows an error page or stops respondingAccess to the service has to be renewed, for example after the application was restartedSelect Reconnect
"Your browser blocked the new tab."The browser's pop-up blockerAllow pop-ups for your Portal address and try again
The interface loads in a new tab but stays empty inlineThe interface does not support being embeddedTurn Show inline in the session page off
A colleague cannot open the address you sent themOnly the user running the session can open a web serviceThis is intended. Each person uses the services of their own session
A slug is refusedIt is already used in this application, reserved for Portal, or has characters other than lower-case letters, digits and hyphensChoose a different slug