Skip to content

Authentication

Networking and Authentication

If you're new to networking and authentication, I recommend the Enterprise Networking and Auth in Enterprise chapters in DevOps for Data Science.

Each product authenticates users on its own. The diagram shows one example setup, where products share an identity provider (IdP) such as Microsoft Entra ID or Okta.

graph LR
    subgraph Internal["Internal tiers"]
        WBAuth("Workbench<br/>PAM (SSSD / AD)<br/>or OIDC / SAML")
        ConAuth("Connect<br/>OIDC")
        PMAuth("Package Manager<br/>OIDC (optional)")
    end
    subgraph External["External tier"]
        DmzConAuth("Connect<br/>SAML")
    end
    IdP["Identity provider<br/>(Entra ID, Okta)"]
    AD["Active Directory / LDAP"]
    WBAuth -->|"Kerberos / LDAP"| AD
    WBAuth -.->|"SSO option"| IdP
    ConAuth -->|"OpenID Connect"| IdP
    PMAuth -.->|"OpenID Connect"| IdP
    DmzConAuth -->|"SAML 2.0"| IdP
    style WBAuth fill:#e8f1f8,stroke:#447099,stroke-width:2px,color:#1a1a1a
    style ConAuth fill:#fdf1e3,stroke:#c9822b,stroke-width:2px,color:#1a1a1a
    style PMAuth fill:#e8f5ec,stroke:#3f8f5a,stroke-width:2px,color:#1a1a1a
    style DmzConAuth fill:#fdf1e3,stroke:#c9822b,stroke-width:2px,color:#1a1a1a

Technologies to know

Server side

Technology Description How it is used in Posit services
PAM (Pluggable Authentication Modules) A Linux framework that lets programs check a login through configurable modules, so the same program can verify passwords against local accounts, SSSD, or Kerberos without changing its code. The default sign in method for Workbench and a supported method for Connect. Workbench can also use PAM sessions to set up each user's session, such as creating home directories, mounting drives, or obtaining Kerberos tickets.
SSSD (System Security Services Daemon) A Linux service that connects a server to a central directory such as Active Directory, so people can sign in with their organization accounts. Workbench uses it through PAM so the server can look up each user's account, group, and UID/GID before starting their session.
Active Directory (AD) Microsoft's directory service. It stores user accounts, passwords, and groups for an organization. The usual source of users for Workbench (through SSSD), and a directory Connect can check logins against.
LDAP (Lightweight Directory Access Protocol) The standard way to query a directory (such as Active Directory) for users, groups, and their attributes. Connect can authenticate users against an LDAP server directly. Workbench reaches it through SSSD.
Kerberos A network authentication protocol that uses time limited tickets instead of sending passwords. Workbench can use PAM sessions to obtain a ticket at session start (auth-pam-sessions-enabled=1, auth-pam-sessions-use-password=1), so users can reach Kerberos protected resources without retyping a password.7 Connect supports Kerberos through PAM (Provider = "pam").14

Federated sign in

Technology Description How it is used in Posit services
SSO (single sign on) Users sign in once with their organization account and reach many applications without entering credentials again. Provided by SAML or OIDC in Workbench and Connect, and by OIDC in Package Manager.
SAML (Security Assertion Markup Language) A single sign on standard where an identity provider vouches for a user by passing the application a signed XML message. A sign in option for Workbench and Connect.
OIDC (OpenID Connect) A modern sign in standard built on OAuth 2.0. The application sends the user to an identity provider, which returns a token that says who they are. A sign in option for Workbench and Connect. Connect's documentation recommends OIDC over SAML when your IdP supports both.10
OpenID The original OpenID 2.0 standard is retired. Today the term usually means OpenID Connect (OIDC). Appears in Workbench settings and docs (for example auth-openid) to mean OIDC sign in.
Entra ID Microsoft's cloud identity service (formerly Azure Active Directory). It handles sign in and single sign on for cloud applications. An identity provider for Workbench and Connect (OIDC or SAML) and the Package Manager web interface (OIDC). It can also provision Workbench users.
Okta A third party cloud identity provider that manages user accounts and lets people sign in once to reach many applications. Used the same way as Entra ID: OIDC or SAML sign in, and user provisioning for Workbench.

Network

Technology Description How it is used in Posit services
SSL (Secure Sockets Layer) The original protocol for encrypting traffic between a browser and a server. It has been replaced by TLS (Transport Layer Security), but the name stuck. Each service needs a certificate and key to serve HTTPS. See TLS Certificates.
Zscaler A cloud security service that routes user traffic through its own network to filter and inspect it. Posit documents the general case of outbound TLS inspection, where a proxy injects its own certificate. For VS Code extensions in Workbench, set NODE_EXTRA_CA_CERTS in /etc/rstudio/launcher-env to a CA file that includes the injected certificate, or extension installs fail with TLS verification errors.8

Workbench

Workbench needs two things for every user: a way to authenticate, and a local Linux account (UID, GID, home directory) to run sessions as. Posit describes three cooperating pieces:2

Piece Options
Authentication PAM (default), OpenID Connect, SAML, proxied auth
User provisioning SSSD against AD/LDAP, SCIM from Okta or Entra ID, just in time (JIT) provisioning
PAM sessions Create home directories, mount storage, obtain Kerberos tickets at session start

PAM with SSSD is the classic setup:3

graph TD
    User(["User"]) -->|"username + password"| RServer("rserver")
    RServer -->|"PAM stack"| SSSD("SSSD / Kerberos")
    SSSD -->|"validate"| AD["Active Directory"]
    AD -->|"result"| SSSD
    SSSD -->|"UID / GID"| RServer
    RServer -->|"start session as UID"| Session("User session process")
    style RServer fill:#e8f1f8,stroke:#447099,stroke-width:2px,color:#1a1a1a

Provisioning and PAM sessions

Workbench can provision users itself. With SSO (OIDC or SAML)56 configured, Entra ID or Okta can push users and groups to Workbench through SCIM. Or Workbench can create accounts on first login (JIT).4 Workbench then assigns a UID and derives the POSIX username from the IdP username.

A mechanism to create home directories, such as PAM sessions, must already be configured. Provisioning also works with SSSD. Workbench, or a proxy in front of it, must use HTTPS with a CA signed certificate for provisioning to work.

Relevant rserver.conf settings for PAM:17

Setting Example Meaning
auth-pam-sessions-profile rstudio-session PAM profile used when starting sessions (/etc/pam.d/rstudio-session)
auth-pam-sessions-use-password 1 Pass the login password into the PAM session (needed for Kerberos tickets and some mounts)
server-user rstudio-server Unprivileged account that runs rserver

Connect

Connect supports password, PAM, LDAP/Active Directory, OAuth2/OpenID Connect, SAML, and proxied authentication. Only one provider can be active.10 Changing providers later requires a migration, so pick carefully.

OpenID Connect

OpenID Connect with Entra ID:11

[Authentication]
Provider = "oauth2"

[OAuth2]
ClientId = "<CLIENT_ID>"
ClientSecret = "<CLIENT_SECRET>"
OpenIDConnectIssuer = "https://login.microsoftonline.com/<TENANT_ID>/v2.0"
RequireUsernameClaim = true
UsernameClaim = "preferred_username"
GroupsClaim = "groups"
GroupsAutoProvision = true
RegisterOnFirstLogin = true

Authentication.Notice is deprecated as of 2026.11.0; set the sign in message on System > Custom Messaging.17

Choose a stable unique ID claim

UniqueIdClaim identifies a user in Connect and defaults to sub. If Connect receives a unique ID it has not seen before, it creates a new user.

Use a value that never changes. Suppose you set it to a value that can change, such as a username or email. When that value changes, Connect creates a new user and no longer matches the old account.13

SAML

SAML with Entra ID:12

[Server]
Address = "https://<CONNECT_HOSTNAME>"

[Authentication]
Provider = "saml"

[SAML]
IdPMetaDataURL = "https://login.microsoftonline.com/<TENANT_ID>/federationmetadata/2007-06/federationmetadata.xml?appid=<APP_ID>"
IdPAttributeProfile = "azure"
IdPSingleSignOnPostBinding = true
SSOInitiated = "IdPAndSP"

Server.Address is required for SAML. If the IdP metadata is a local file, use IdPMetaDataPath. File based metadata is not refreshed for you, so update the file when it expires.16

Comparison:

Setting OIDC SAML
Provider oauth2 saml
IdP config OpenIDConnectIssuer IdPMetaDataURL or IdPMetaDataPath
Username UsernameClaim IdPAttributeProfile or UsernameAttribute
Groups GroupsClaim, GroupsAutoProvision GroupsAttribute, GroupsAutoProvision
SSO initiation Not documented SSOInitiated = IdP, SP, or IdPAndSP (default IdPAndSP)

Default role

Default role and publisher rights:17

[Authorization]
DefaultUserRole = "viewer"

New users get the DefaultUserRole, which defaults to viewer (the first account created is an administrator). Administrators can change roles through the dashboard, the Connect Server API, or the CLI:18

sudo /opt/rstudio-connect/bin/usermanager alter --username jdoe --new-role publisher

With SQLite, stop Connect before you run usermanager.18

Package Manager

Package Manager supports four authentication methods, and you can combine them:19

  • API tokens, for programmatic access and authenticated repositories
  • OpenID Connect for single sign on
  • OIDC identity federation, for example from GitHub Actions
  • Snowflake key pair authentication

Admin tasks use the rspm CLI on the server. Users must be members of the rstudio-pm group to use the CLI locally (the group is configurable).20

Troubleshooting sign in

Symptom Likely cause First check
Workbench rejects a valid username and password PAM profile (/etc/pam.d/rstudio) or directory lookup failing /var/log/auth.log or /var/log/secure, and sudo /usr/lib/rstudio-server/bin/pamtester --verbose rstudio <user> authenticate9
Workbench session starts then dies No home directory, UID lookup fails getent passwd <user>, /var/log/rstudio/rstudio-server/rserver.log
Workbench admin dashboard unavailable admin-enabled=1 not set, or user not in admin-group rserver.conf, id <user>
Connect login fails after the IdP redirect Wrong redirect URI (OIDC uses /__login__/callback) or, for SAML, Server.Address mismatch Compare the IdP app registration with the Connect address and Server.Address
Connect creates a duplicate user UniqueIdClaim value changed Inspect the user in usermanager list
Connect SAML works on one node only Node configurations differ (identical configuration is recommended, not required)15 diff the two rstudio-connect.gcfg files
Git push from a session fails after login Credential not cached; PAM password not forwarded See Git credentials