Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

2.2. HTTP Authentication


Any user with a Red Hat Storage Console account has access to the REST API. An API user submits a mandatory Red Hat Storage Console username and password with all requests to the API and uses HTTP Basic Authentication [1]to encode these credentials. If a request does not include an appropriate Authorization header, the API sends a 401 Authorization Required as a result:

Example 2.1. Access to the REST API without appropriate credentials

HEAD [base] HTTP/1.1
Host: [host]

HTTP/1.1 401 Authorization Required
Copy to Clipboard Toggle word wrap
Request are issued with an Authorization header for the specified realm. An API user encodes an appropriate Red Hat Storage Console domain and user in the supplied credentials with the username@domain:password convention.
The following table shows the process for encoding credentials in base64.
Expand
Table 2.1. Encoding credentials for access to the API
Item Value
username rhscadmin
domain domain.example.com
password 123456
unencoded credentials rhscadmin@domain.example.com:123456
base64 encoded credentials cmhzY2FkbWluQGRvbWFpbi5leGFtcGxlLmNvbToxMjM0NTYK
An API user provides the base64 encoded credentials as shown:

Example 2.2. Access to the REST API with appropriate credentials

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

HTTP/1.1 200 OK
...
Copy to Clipboard Toggle word wrap

Important

Basic authentication involves potentially sensitive information, such as passwords, sent as plain text. REST API requires Hypertext Transfer Protocol Secure (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 the encoded credentials on a single line within the header.
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat