Skip to content
Error codes · Monitors, checks & agents

RU-3013: Invalid monitor authentication

The authentication on a private-location monitor was refused. Every header value and every password must be a secret reference written as ${SECRET:NAME}, sent only in a header name the location allows. realuptime never stores a credential's value: the private location reads it on its own machine.

Where it is raised

  • PATCH /api/v1/checks/{id}/auth

What triggers it

This is the shape check on the credential itself, and it runs after the monitor has passed the four conditions of RU-3014. It refuses a header with no name or no value, a header name the location does not send, the same header twice, more than 8 headers, a value that is not a secret reference, URL credentials beside an Authorization header, and a value longer than the template limit or with a line break in it.

Example response

PATCH /api/v1/checks/{id}/auth
HTTP 400

{
  "error": "Enter a value for the Authorization header.",
  "code": "RU-3013"
}

Common causes

  • A header value or password with no ${SECRET:NAME} reference, which would store a real credential.
  • A credential pasted beside a reference.
  • A reference whose NAME is not capital letters, digits and underscores.
  • A header name outside Authorization, Proxy-Authorization, Cookie, X-Api-Key and the names the location allows with REALUPTIME_AUTH_HEADERS.
  • URL credentials and an Authorization header on the same monitor.

How to fix it

  1. Put the credential on the location's machine as REALUPTIME_SECRET_NAME, or in the file named by REALUPTIME_SECRETS_FILE.
  2. Reference it in the header value as ${SECRET:NAME}, for example Bearer ${SECRET:API_TOKEN}.
  3. To send another header, add its name to REALUPTIME_AUTH_HEADERS on the location's machine and restart the agent.

Related codes