Table of Contents |
---|
Author: Ignasi Barrera
...
- OAuth v1.0 Authentication as defined in the OAuth 1.0 protocol
- OpenID Connect as described at OpenID Connect and including the core spec and optional features such as the RP-Initiated-Logout but not Discovery, dynamic registration, and other optional features. See Abiquo OpenID Connect integration.
- SAML 2.0. See SAML integration
- Basic HTTP Authentication as defined by RFC 2617
- Under basic auth, Abiquo UI supports two-factor authentication for added security
OAuth v1.0 Version A
...
authentication
You can use OAuth to authenticate against the Abiquo API. With OAuth, users can create their own applications and connect them to the Abiquo API in a controlled and standard way.
...
...
When you use SAML 2.0 you can disable basic authentication, but you can still use OAuth or a session token to access the API as before. See SAML integration.
Basic HTTP
...
authentication
Authentication following the Basic HTTP Authentication standard. The client must provide its credentials in base64 format, sending them in a request header in the form:
...
Request a resource without providing credentials
Request Headersheaders: Accept, Content-Type.
Request Parametersparameters: N/A.
Request Message Bodymessage body: N/A.
Request example: Retrieve all the datacenters
Code Block | ||
---|---|---|
| ||
% curl --verbose 'http://example.com/api/admin/datacenters/' \ -X GET \ -H "Accept:application/vnd.abiquo.datacenters+xml" > GET /api/admin/datacenters HTTP/1.1 > User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: exmaple.com > Accept: application/vnd.abiquo.datacenters+xml |
Response Headersheaders: Content-Length, Content-Type, WWW-Authenticate, Date.
Response Message Bodymessage body: N/A.
Response Statusstatus: 200, 401, 403.
Example Responseresponse: Response of the unauthenticated GET over a Datacenters resource
Code Block | xml | xml|
---|---|---|
| ||
< HTTP/1.1 401 Unauthorized < Server: Apache-Coyote/1.1 < WWW-Authenticate: Basic realm="Abiquo" < Content-Type: text/html;charset=utf-8 < Content-Length: 1152 < Date: Fri, 02 Jul 2010 09:40:14 GMT |
...
Request a resource providing valid credentials
Request Headersheaders: Accept, Content-Type, Authentication.
Request Parametersparameters: N/A.
Request Message Bodymessage body: N/A.
Request example: Retrieve all the datacenters
Code Block | ||
---|---|---|
| ||
% curl --verbose 'http://example.com/api/admin/datacenters/' \ -X GET \ -H "Accept:application/vnd.abiquo.datacenters+xml" \ -H "Authorization: Basic ZXhhbXBsZTpleGFtcGxl" > GET /api/admin/datacenters HTTP/1.1 > User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: example.com > Authorization: Basic ZXhhbXBsZTpleGFtcGxl > Accept: application/vnd.abiquo.datacenters+xml |
Response Headersheaders: Content-Length, Content-Type, Date, X-Abiquo-Token.
Response Message Bodymessage body: N/A.
Response Statusstatus: 200, 401, 403.
Example Responseresponse: Response of the authenticated GET over a Datacenters resource
Code Block | xml | xml|
---|---|---|
| ||
< HTTP/1.1 200 OK < Server: Apache-Coyote/1.1 < X-Abiquo-Token: 1169dbbca2c1123455ab6b5a06b2b38756fb < Content-Type: application/vnd.abiquo.datacenters+xml < Content-Length: 420 < Date: Fri, 02 Jul 2010 09:50:52 GMT < <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <datacenters> <datacenter> <link href="http://example.com/api/admin/datacenters/1" rel="edit"/> <link href="http://example.com/api/admin/datacenters/1/racks" rel="racks"/> <link href="http://example.com/api/admin/datacenters/1/remoteServices" rel="remoteServices"/> <id>1</id> <location>Redwood city</location> <name>myDatacenter</name> </datacenter> </datacenters> |
...
Request a resource providing valid credentials but with insufficient privileges
Request Headersheaders: Accept, Content-Type, Authentication.
Request Parametersparameters: N/A.
Request Message Bodymessage body: N/A.
Request example: Retrieve all the datacenters
Code Block | ||
---|---|---|
| ||
% curl --verbose 'http://example.com/api/admin/datacenters/' \ -X GET \ -H "Accept: application/vnd.abiquo.datacenters+xml" \ -H "Authorization: Basic ZXhhbXBsZTpleGFtcGxl" > GET /api/admin/datacenters HTTP/1.1 > User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: example.com > Authorization: Basic ZXhhbXBsZTpleGFtcGxl > Accept: application/vnd.abiquo.datacenters+xml |
...
Response Headers: Content-Length, Content-Type, Date, X-Abiquo-Token.
Response Message Body: N/A.
Response Status: 200, 401, 403.
Example Response: Response of the authenticated GET over a Datacenters resource
...