Documentation Index
Fetch the complete documentation index at: https://mintlify.com/upptime/upptime/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Upptime supports various authentication methods to monitor protected endpoints. This guide covers advanced authentication configurations, including OAuth, custom authentication flows, and complex header setups.Authentication Types
Upptime can handle multiple authentication patterns:- HTTP Basic Authentication
- Bearer tokens (JWT, OAuth access tokens)
- API keys (custom headers)
- Session cookies
- Client certificates
- Custom authentication flows
Managing Secrets Securely
GitHub Repository Secrets
All sensitive credentials should be stored as GitHub Secrets:Navigate to repository secrets
- Go to your repository on GitHub
- Click Settings > Secrets and variables > Actions
- Click New repository secret
Add your secrets
Create secrets for each credential:
| Secret Name | Example Value | Use Case |
|---|---|---|
API_TOKEN | sk_live_abc123... | API authentication |
BASIC_AUTH_USER | monitor | HTTP Basic Auth username |
BASIC_AUTH_PASS | SecureP@ss123 | HTTP Basic Auth password |
OAUTH_TOKEN | eyJhbGc... | OAuth bearer token |
HTTP Basic Authentication
For services using HTTP Basic Authentication:Method 1: Using Authorization Header
.upptimerc.yml
Method 2: Embedded in URL
.upptimerc.yml
Bearer Token Authentication
Static Bearer Tokens
For long-lived API tokens:.upptimerc.yml
JWT Tokens
For JWT-based authentication:.upptimerc.yml
For JWT tokens that expire, you’ll need to update the GitHub Secret periodically or implement token refresh using a custom workflow.
API Key Authentication
Custom Header Keys
Many services use custom headers for API keys:.upptimerc.yml
Query Parameter Keys
For APIs that expect keys in query parameters:.upptimerc.yml
OAuth 2.0 Authentication
For OAuth-protected endpoints:Using Access Tokens
.upptimerc.yml
Token Refresh Workflow
For expiring OAuth tokens, create a custom workflow to refresh tokens:Create token refresh workflow
Add
.github/workflows/refresh-token.yml:.github/workflows/refresh-token.yml
Session Cookie Authentication
For services using cookie-based authentication:.upptimerc.yml
Multiple Authentication Headers
Combine multiple headers for complex authentication:.upptimerc.yml
Client Certificate Authentication
For mTLS (mutual TLS) or client certificate authentication:Client certificate authentication requires a custom self-hosted runner with the certificates installed, as GitHub-hosted runners don’t support custom certificates.
Set up self-hosted runner
Install a self-hosted runner with your client certificates:
- Install the GitHub Actions runner on your server
- Install the client certificate and key
- Configure the runner to use the certificates
POST/PUT Requests with Authentication
For health checks that require specific HTTP methods:.upptimerc.yml
Custom User Agents
Some services require specific user agents:.upptimerc.yml
IP Allowlisting
For services that require IP allowlisting:GitHub-Hosted Runners
Self-Hosted Runners with Static IPs
Deploy runner with static IP
Set up a self-hosted runner on a server with a static IP address (e.g., AWS EC2 with Elastic IP).
Troubleshooting Authentication
401 Unauthorized Errors
- Verify secret exists: Check GitHub repository secrets
- Test credentials manually:
- Check token expiration: Ensure tokens haven’t expired
- Review secret syntax: Confirm
$SECRET_NAMEformat is correct
403 Forbidden Errors
- Check permissions: Ensure the token has required scopes
- Verify IP allowlist: Confirm GitHub Actions IPs are allowed
- Review rate limits: Check if you’ve hit API rate limits
Secrets Not Being Replaced
- Verify secret name: Must match exactly (case-sensitive)
- Check workflow configuration: Ensure
SECRETS_CONTEXTis passed: - Review logs: Check workflow logs for error messages
Authentication Works Locally But Fails in CI
- Environment differences: Verify all required secrets are set
- Network restrictions: Check if IP allowlisting is required
- Certificate issues: Self-signed certificates may fail on GitHub-hosted runners
Security Best Practices
Rotate Credentials
Regularly update authentication tokens and secrets
Least Privilege
Use read-only tokens with minimal required permissions
Audit Access
Review who has access to repository secrets
Monitor Usage
Track authentication failures in workflow logs
Credential Rotation Schedule
| Credential Type | Recommended Rotation |
|---|---|
| API Keys | Every 90 days |
| OAuth Tokens | Automatic (with refresh) |
| Basic Auth | Every 180 days |
| Session Cookies | As needed (on expiry) |
| Client Certificates | Every 365 days |
Next steps
Monitor Private Sites
Learn how to monitor private and authenticated endpoints.
Workflow Configuration
Customize GitHub Actions workflows for advanced use cases.