2.2. HTTP Authentication

All requests to the Satellite API require a suitable user name and password. The API uses HTTP Basic Authentication [2] to encode these credentials, which are then added to the Authorization header. If a request does not include an appropriate Authorization header, the API returns a 401 Authorization Required error.

Table 2.1. Encoding Credentials for Access to an API

Item Value
user name admin
password changeme
unencoded credentials admin:changeme
base64 encoded credentials YWRtaW46Y2hhbmdlbWU=
An API user provides the base64 encoded credentials as shown:

Example 2.1. Access to a REST API with Appropriate Credentials

HEAD [base] HTTP/1.1
Host: [host]
Authorization: Basic YWRtaW46MTIzNDU2

HTTP/1.1 200 OK
...

Important

Basic authentication involves potentially sensitive information, such as passwords, sent as plain text. The REST API requires HTTPS for transport-level encryption of plain-text requests.

Important

Some base64 libraries break the result into multiple lines and terminate each line with a newline character. This breaks the header and causes a faulty request. The Authorization header requires that the encoded credentials be on a single line within the header.