Guides
Contents

Authentication

How people and scripts sign in to a DownloadPulse server, how to move safely between authentication modes, and how to get back in if you are locked out.

Applies to
  • Server
  • Desktop
On this page

A DownloadPulse server can run open, with local usernames and passwords, with an OpenID Connect (OIDC) identity provider, or with both. This page compares the modes and shows how to move between them without locking yourself out. It also covers browser sessions, how scripts authenticate, and how to recover access. Two pages go into more detail: Password sign-in and OpenID Connect.

Desktop: The desktop app is always a Standalone installation. It has no Authentication tab and no OpenID Connect. Its only sign-in option is an optional password for the built-in Administrator, which you set in My Account. See The desktop app’s optional password.

You configure authentication under Settings › Authentication, which only an Admin can open. The Authentication Status card at the top shows the current Authentication Mode. It is always one of these four:

Mode Browser access API access When to use it
No Authentication (open mode) Open. Everyone who reaches DownloadPulse uses it as the built-in Admin Open as well A trusted, single-person LAN setup where nobody else can reach the port
Username & Password The DownloadPulse sign-in page HTTP Basic with the same credentials, or Integration tokens Most self-hosted servers, including password-only LAN setups over HTTP
OpenID Connect Sign in with your provider Integration tokens You already run an identity provider and want it to be the only way in
Username & Password + OIDC The provider button is offered first, and username and password stay available HTTP Basic and Integration tokens Moving to OIDC, or keeping a local fallback next to it

Integration-account API tokens add to these modes but never form a mode of their own: issuing a token doesn’t protect an open installation. In every mode, including open mode, DownloadPulse refuses a bearer token that isn’t valid. See API and tokens.

The Authentication Status card also shows the state of each method, Active Browser Sessions with Log Out Current Session, and Browser Session Lifetime.

Note: The Username & Password and OpenID Connect cards are part of the Advanced presentation. If you can’t see them, choose Advanced in My Account. Sign-in keeps working exactly as configured while the cards are hidden.

The deployment type, set under Settings › Users & Access › Deployment & Language, decides who can use DownloadPulse as a person. See Server deployment.

  • Standalone: only the built-in Administrator uses DownloadPulse. It signs in with a password alone, set, changed or cleared in My Account. With a password set, the sign-in page asks only for that password, with no username field. Without one, no sign-in is required. A Standalone installation has no Authentication tab, and OpenID Connect can’t be turned on.
  • Server: everyone signs in with their own account and works within that account’s role. Each person can use a username and password, the identity provider, or both, depending on what is turned on under Authentication.

Switching the deployment type in either direction asks for confirmation first. The switch clears the built-in Administrator’s password, turns off Username & Password and OpenID Connect, and ends every browser session. Afterwards DownloadPulse is open to anyone who can reach it at an address it accepts, until you set up sign-in again: a password in My Account on Standalone, or sign-in under Authentication on a Server. The switch deletes no account and keeps your saved OpenID Connect configuration.

DownloadPulse checks every authentication change on the server, and it refuses any change that could leave nobody able to sign in. The rules:

  • At least one working method. While sign-in is on, at least one enabled method must actually be usable. Username & Password needs an active Admin with a username and password. OpenID Connect needs a complete configuration and an access policy that admits somebody.
  • Going open needs confirmation. Turning off the last sign-in method opens the dialog Disable interactive authentication? You have to choose Continue to Open Mode. Only a signed-in person can make this change.
  • OIDC can’t be the first and only method. An open installation has no signed-in session that could prove an OIDC setup works or recover from a broken one. To get to OIDC, go through Username & Password + OIDC first.
  • OIDC can’t become the only method until a real sign-in has worked. To turn off Username & Password while OIDC stays on, you must be signed in through OIDC in that browser. A discovery check or a configuration test doesn’t count.
  • OIDC-only changes are staged. While OIDC is the only method, the working OIDC configuration stays in force until changed settings prove themselves with a successful sign-in.
  • Turning a method on never turns another off. Enabling OpenID Connect never disables a working local password.

Here is how to get from each mode to each of the others.

  • To Username & Password: in the Username & Password card, enter a Username and a Password of at least eight characters and choose Apply. Then switch on Enable Username & Password. From then on, DownloadPulse asks you to sign in. See Password sign-in.
  • To Username & Password + OIDC: turn on Username & Password as described above and sign in with it. Then set up OpenID Connect and press Test in its card. See OpenID Connect.
  • To OpenID Connect only: this isn’t allowed in one step. Go to Username & Password + OIDC first, then follow the steps below.
  • To Username & Password + OIDC: while signed in, fill in the OpenID Connect card and press Test. If the test sign-in succeeds, the tested configuration is saved and turned on.
  • To OpenID Connect only: go to Username & Password + OIDC first, then follow the steps below.
  • To No Authentication: switch off Enable Username & Password and confirm with Continue to Open Mode. Your stored password is kept unless you also use Clear Stored Password.
  • To OpenID Connect only:

    1. Sign out, then sign in with Sign in with your provider. Pressing Test successfully also signs this browser in through OIDC.
    2. Open Settings › Authentication.
    3. Switch off Enable Username & Password.

    DownloadPulse refuses the change if you are signed in with a password, or if the OIDC settings changed since they were last proven.

  • To Username & Password: switch off Enable OpenID Connect. The OIDC settings stay saved.

  • To No Authentication: turn off one method, then the other. The second one asks you to confirm open mode.

  • To Username & Password + OIDC: switch on Enable Username & Password. This needs an active Admin with a password. A password that was only disabled, not cleared, still counts. Otherwise, enter a username and password in the card and Apply them first.
  • To Username & Password: turn on Username & Password first, then switch off Enable OpenID Connect.
  • To No Authentication: switch off Enable OpenID Connect and confirm with Continue to Open Mode.

Changing OIDC settings while OIDC is the only method

Link to this section: Changing OIDC settings while OIDC is the only method

While OIDC is the only way in, DownloadPulse won’t save a change to a security-critical OIDC setting directly. The protected settings are the issuer URL, client ID, client secret, scopes, public base URL, the Allow Any Authenticated OIDC Identity switch, the three allow lists and the group claim. A proposed change is staged, and it is saved only after the exact staged configuration has completed a real sign-in. If another authentication change is saved while that sign-in is in progress, the proposal is stale and has to be verified again.

The simplest way to make such a change is to restore your fallback first:

  1. Switch on Enable Username & Password.
  2. Change the OpenID Connect settings.
  3. Press Test and complete the sign-in.
  4. Switch Enable Username & Password off again while signed in through OIDC.

Signing in with a password or through OIDC creates the same kind of server-side browser session.

  • Browser Session Lifetime (default 12 hours, 1 to 168) sets how long each sign-in lasts. Using DownloadPulse doesn’t extend a session. When it ends, you sign in again. Downloads keep running whether or not anyone is signed in.
  • Active Browser Sessions counts the browser sign-ins that are currently valid.
  • Log Out Current Session ends only this browser’s session. Log Out at the bottom of the sidebar does the same.
  • Each session has a CSRF token, and every change made through a session must carry it. Logging out is itself a change, and it revokes the session on the server. This is why scripts should authenticate with HTTP Basic or a bearer token rather than a copied session cookie.
  • When DownloadPulse asks for credentials on an API request that isn’t a page load, it answers with an ordinary HTTP authentication error. It never answers with your identity provider’s sign-in page.

Some changes end sessions right away:

  • Changing or clearing an account’s password ends that account’s browser sessions.
  • Turning off Username & Password ends the sessions that came from password sign-ins.
  • Disabling, removing or merging an account signs it out everywhere. Changing its role doesn’t sign it out: its open pages reload with the new role.
  • Restoring a backup ends every browser session.

When sign-in is on, DownloadPulse checks each request’s credentials in this order:

  1. A valid DownloadPulse browser session.
  2. An explicit Authorization: Bearer token.
  3. Explicit HTTP Basic credentials.
  4. Otherwise, the request is unauthenticated.

A signed-in browser keeps its session’s identity even if a proxy adds another Authorization header.

  • HTTP Basic uses an account’s own username and local password, and it works only while Username & Password is on. The request gets that account’s role. See Password sign-in.
  • Bearer tokens belong to Integration accounts, which an Admin creates under Settings › Users & Access. A token can submit downloads, see and withdraw its own requests, and read /api/metrics. Nothing else. See API and tokens.
bash
curl -H 'Authorization: Bearer dp_REPLACE_WITH_TOKEN' https://download.example.com/api/requests

If people reach DownloadPulse through an HTTPS reverse proxy, tell DownloadPulse its exact external address, even if you only use Username & Password. DownloadPulse uses this address to validate where browser changes come from, to decide whether cookies are HTTPS-only, and to build the OIDC callback URL. The recommended way is the environment variable:

yaml
environment:
  PUBLIC_BASE_URL: https://download.example.com

You can also set the address in the Public DownloadPulse Base URL field of the OpenID Connect card. PUBLIC_BASE_URL wins when both are set, and the field then shows the value read-only. Use an HTTPS origin only, in the form https://host[:port], with no path, query, fragment or credentials. Setting it doesn’t turn off direct LAN access: a request that arrives at a LAN address is still judged against its own host and scheme.

CORS_ORIGINS is a different setting, and it doesn’t replace the external address. Every origin it lists is trusted with a signed-in session, so list each origin exactly, separated by commas. DownloadPulse refuses to start with CORS_ORIGINS=*.

If your proxy passes the client address and scheme to DownloadPulse, set FORWARDED_ALLOW_IPS to the proxy’s own address or network, never *. If it isn’t set, DownloadPulse treats the proxy as the client for sign-in throttling. Everyone behind that proxy then shares one budget of sign-in attempts, but nobody can bypass sign-in this way.

Open mode is limited to the installation’s own address

Link to this section: Open mode is limited to the installation’s own address

In open mode, DownloadPulse answers only when a request names one of its own addresses:

  • its IP addresses
  • localhost
  • a configured HTTPS public base URL
  • names under .local, .home.arpa, .internal and .localhost

A request naming any other host, or with a missing or malformed host, gets Forbidden authority. This stops a web page from using DNS rebinding to read your settings, accounts, backups or downloads. Bare hostnames, .lan names and other DNS aliases aren’t trusted, and forwarded host headers are never consulted. Sign-in, API tokens, the Sonarr and Radarr connections and health checks aren’t affected.

If an authentication method is configured but broken, DownloadPulse never treats that as open mode. A config.json that can’t be read is a startup error, not permission to run open.

If no Admin can sign in any more, for example because a password is forgotten or the identity provider is down or no longer maps to the Admin, you need access to the computer that runs DownloadPulse. DownloadPulse logs an error at startup whenever no enabled Admin can sign in with the enabled methods.

Tip: If another sign-in method still works, use it instead. Open Settings › Authentication and fix the broken method there. For OIDC, check that Public DownloadPulse Base URL is the real HTTPS address with no extra path, and that your identity provider has the exact OIDC Callback URL. Then press Test.

To set a new password for the default Admin:

  1. Stop DownloadPulse.
  2. Make a copy of its configuration file. In the Docker image this is normally /app/config/config.json (CONFIG_PATH).
  3. Add "auth_username": "<name>" and "auth_password": "<new password>", and set "auth_password_enabled": true. Keep the file valid JSON: DownloadPulse refuses to start with a damaged configuration file.
  4. Start DownloadPulse. At startup it converts the plaintext password into a verifier, installs it as the default Admin’s local credential, and removes it from the file.

As a last resort, you can open the installation instead:

  1. Stop DownloadPulse and copy config.json.
  2. Set auth_password_enabled and auth_oidc_enabled to false.
  3. Start DownloadPulse. It is now open to anyone who can reach it, including its API, so do this only on a trusted network.
  4. Your stored password and OIDC settings are kept. Repair them in Settings › Authentication and turn protection back on straight away.

Desktop: On a Standalone installation there is no username. Set auth_password to a new password in the configuration file while DownloadPulse is stopped. At the next start, it replaces the Administrator’s password.

Warning: Never copy a password, a client secret or a raw bearer token into a bug report, a log, a screenshot or config.json. API tokens belong in the client that uses them.