14 Content Management
RStudio Connect provides flexibility over how uploaded content is configured and shared.
14.2 Vanity Paths
All content receives a URL that includes its numerical ID at at the time of
deployment – something like
Connect administrative users can create “vanity paths” for content which make
the content available at an additional, customized URL.
This setting can be found at the bottom of the “Access” tab when editing a piece of content. There you can enter the path at which you want this content to be available and preview the complete URL. Once you “Save” your content, you’ll be able to access your content at the new vanity URL.
Vanity URLs can not be nested inside of one another. So if a vanity URL
/finance/ already exists, you would not be able to create a new vanity URL
/finance/budget/. You may create sibling paths:
/finance/quarterly/ may both exist concurrently.
14.4 Bundle Management
Content published to RStudio Connect is encapsulated in a “bundle” that
contains the source code and data necessary to execute the content. An
application or report is updated by uploading a new bundle. Old bundles are
retained on disk until you reach the limit imposed by
Applications.BundleRetentionLimit at which point older
bundles will be deleted.
Users can manage their own bundles in the Connect dashboard by clicking the “Source Versions” button. Collaborators can delete, download, activate, and view activation logs for their applications’ bundles. Activating a different bundle is a way of “rolling back” or “rolling forward” to an older or newer version of your application, respectively.
Activating an alternative bundle for a Shiny application will cause new incoming users to be directed to the new version of the application but will not interrupt existing users of the application who are viewing the previously activated bundle. For reports, activating an alternate bundle will immediately render the newly activated bundle and promote it to be the authoritative version of that document. For parameterized reports, only the default variant will be rerendered; other instances of the report will not automatically be regenerated, but the next manual or scheduled update will be performed on the newly selected bundle.
When Activating an alternative bundle for a Plumber API, existing requests will be serviced by processes already launched running the old code. New requests will be serviced by new processes running the new code.
14.5 Content Images
Once content has been published to RStudio Connect, the publisher may enter the “info” tab in the application settings pane and upload an image to be associated with the content.
- Application images are stored in the server’s data directory.
- Application images can be viewed by anyone with permission to view the associated content.
- Administrators cannot view images associated with content that they do not have access to. However, all administrators may change the visibility mode, or add themselves to the viewer list, for any piece of content. This ensures that the Administrator’s act of giving themselves viewer privileges can be tracked in the server’s audit logs.
- RStudio Connect will reject uploads of images larger than the
Applications.MaxAppImageSizeconfiguration setting value. By default, the server will tolerate images up to 10MB in size.
- RStudio Connect does no post-processing; images will be sent back to the user exactly as they were uploaded, and the RStudio Connect dashboard will make its best effort to display them in a consistent manner.
- The RStudio Connect dashboard will attempt to cache images in an efficient and consistent manner. Every time the image is displayed, the dashboard will check the server for a newer version of the image, and accept its cached version if a newer image does not exist.
14.6 API Keys
RStudio Connect allows users to access hosted content outside the web browser by utilizing API Keys - e.g. via shell scripts. API Keys are enabled by default. To change this behavior please see Section 14.6.2.
14.6.1 How this Works
API Keys are associated with user accounts. They provide roughly the same level of access to RStudio Connect as a user logged in via the browser would have.
If a user has a compromised API Key, the Key should be deleted as soon as possible. The administrator may wish to lock the account if the user is having difficulty deleting the API Key.
To retrieve static content or to invoke Plumber endpoints via API Keys an HTTP
request must be made to the target URL of the published content. The request
must contain an HTTP header whose key is
Authorization and value is set to
Authorization: Key ABCDEFGHIJKLMNO
Note: Use the information above to allow API Keys to pass through a Proxy.
API Keys have the same authorization access levels as the user that owns them. Someone who uses an API Key will be able to view all content that the owner of the API Key has access to. API Keys are shared secrets and as such they should be stored securely and only be given to trusted applications. It is advisable that content requests be made securely over HTTPS. If a user believes that an API Key has been compromised, they can revoke just that key by deleting it.
For more details regarding API Keys please see the API Keys section in the User Guide.
To learn how to configure RStudio Connect to listen for HTTPS requests please see Section A.4.
14.6.2 Configuring API Keys
To disallow API Keys, set
; /etc/rstudio-connect/rstudio-connect.gcfg [Authentication] APIKeyAuth = false