Initial checkin of doc source
Change-Id: I882acd404f3e26341ee267113b4e396ff30bd59d
This commit is contained in:
parent
3d9136e837
commit
4f62d24a13
1
docs/.gitignore
vendored
Normal file
1
docs/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
target/
|
15
docs/includewars.xml
Normal file
15
docs/includewars.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<assembly>
|
||||
<id>includewars</id>
|
||||
<formats>
|
||||
<format>jar</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.basedir}/target/docbkx/webhelp</directory>
|
||||
<includes>
|
||||
<include>**.war</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
5
docs/olink.xml
Normal file
5
docs/olink.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<books xmlns="http://docs.rackspace.com/olink">
|
||||
<book path="src/docbkx/ck-gettingstarted.xml"/>
|
||||
<book path="src/docbkx/ck-devguide.xml"/>
|
||||
<book path="src/docbkx/ck-releasenotes.xml"/>
|
||||
</books>
|
74
docs/pom.xml
Normal file
74
docs/pom.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.rackspace.cloud.apidocs</groupId>
|
||||
<artifactId>cloud-keep-docs</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Cloud Keep Docs</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.rackspace.cloud.api</groupId>
|
||||
<artifactId>olink-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>olink</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.rackspace.cloud.api</groupId>
|
||||
<artifactId>clouddocs-maven-plugin</artifactId>
|
||||
<version>1.13.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate-webhelp</goal>
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<includes>
|
||||
ck-devguide.xml,
|
||||
ck-gettingstarted.xml,
|
||||
ck-releasenotes.xml
|
||||
</includes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<enableDisqus>intranet</enableDisqus>
|
||||
<feedbackEmail>constanze.kratel@RACKSPACE.COM</feedbackEmail>
|
||||
<branding>rackspace</branding>
|
||||
<builtForOpenStack>1</builtForOpenStack>
|
||||
<showXslMessages>true</showXslMessages>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>includewars.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assembly</id>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
64
docs/src/common/common.ent
Normal file
64
docs/src/common/common.ent
Normal file
@ -0,0 +1,64 @@
|
||||
|
||||
<!--
|
||||
A collection of common faults, these are pretty much expected
|
||||
in every request.
|
||||
-->
|
||||
<!ENTITY commonFaults
|
||||
'
|
||||
<response xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="Identity fault"></doc>
|
||||
<representation mediaType="application/xml" element="identity:identityFault"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="400" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="Error">A general error occured.</doc>
|
||||
<representation mediaType="application/xml" element="identity:badRequest"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="401" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="Bad Request">The format of the specified request is invalid.</doc>
|
||||
<representation mediaType="application/xml" element="identity:unauthorized"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="403" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="Forbidden"></doc>
|
||||
<representation mediaType="application/xml" element="identity:forbidden"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="405" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="Bad Method">The method is unavailable</doc>
|
||||
<representation mediaType="application/xml" element="identity:badMethod"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="413" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="Over Limit">The number of items returned is above the allowed limit.</doc>
|
||||
<representation mediaType="application/xml" element="identity:overLimit"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
<response status="503" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="Service Unavailable">The requested service is unavailable.</doc>
|
||||
<representation mediaType="application/xml" element="identity:serviceUnavailable"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
'>
|
||||
<!--
|
||||
Faults on GET
|
||||
-->
|
||||
<!ENTITY getFaults
|
||||
'
|
||||
<response status="404" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<doc title="File not found">Resource not found.</doc>
|
||||
<representation mediaType="application/xml" element="identity:itemNotFound"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
'>
|
||||
<!--
|
||||
Faults on POST/PUT
|
||||
-->
|
||||
<!ENTITY postPutFaults
|
||||
'
|
||||
<response status="415" xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<representation mediaType="application/xml" element="identity:badMediaType"/>
|
||||
<representation mediaType="application/json"/>
|
||||
</response>
|
||||
'>
|
61
docs/src/docbkx/chapters/apiref.xml
Normal file
61
docs/src/docbkx/chapters/apiref.xml
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book [
|
||||
<!ENTITY PRODNAME "Rackspace Barbican"> <!-- in PDF: for line 1 on the cover page -->
|
||||
<!ENTITY PRODABBV "Rackspace Barbican"> <!-- in PDF: for page headers -->
|
||||
<!ENTITY PROD "Barbican"> <!-- in body -->
|
||||
]>
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xml:id="API_Operations"
|
||||
role="api-reference">
|
||||
<title>API Operations</title>
|
||||
<para>The operations described in this chapter allow developers to
|
||||
manage groups, configurations, policies, executions, and webhooks. </para>
|
||||
<section xml:id="Groups">
|
||||
<title>Groups</title>
|
||||
<para>The operations described in this chapter allow developers to
|
||||
manage groups. </para>
|
||||
<resources xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<resource href="../../wadl/barbican.wadl#groups"/>
|
||||
<resource href="../../wadl/barbican.wadl#group"/>
|
||||
<resource href="../../wadl/barbican.wadl#group_state"/>
|
||||
<resource href="../../wadl/barbican.wadl#pause"/>
|
||||
<resource href="../../wadl/barbican.wadl#resume"/>
|
||||
</resources>
|
||||
</section>
|
||||
<section xml:id="Configurations">
|
||||
<title>Configurations</title>
|
||||
<para>The operations described in this chapter allow developers to
|
||||
manage configurations. </para>
|
||||
<resources xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<resource href="../../wadl/barbican.wadl#group_config"/>
|
||||
<resource href="../../wadl/barbican.wadl#launch_configuration"/>
|
||||
</resources>
|
||||
</section>
|
||||
<section xml:id="Policies">
|
||||
<title>Policies</title>
|
||||
<para>The operations described in this chapter allow developers to
|
||||
manage policies. </para>
|
||||
<resources xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<resource href="../../wadl/barbican.wadl#policies"/>
|
||||
<resource href="../../wadl/barbican.wadl#policy"/>
|
||||
<resource href="../../wadl/barbican.wadl#execute"/>
|
||||
</resources>
|
||||
</section>
|
||||
<section xml:id="Executions">
|
||||
<title>Executions</title>
|
||||
<para>The operations described in this chapter allow developers to
|
||||
manage executions. </para>
|
||||
<resources xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<resource href="../../wadl/barbican.wadl#anonymous_execute_webhook"/>
|
||||
</resources>
|
||||
</section>
|
||||
<section xml:id="Webhooks">
|
||||
<title>Webhooks</title>
|
||||
<para>The operations described in this chapter allow developers to
|
||||
manage webhooks. </para>
|
||||
<resources xmlns="http://wadl.dev.java.net/2009/02">
|
||||
<resource href="../../wadl/barbican.wadl#webhooks"/>
|
||||
<resource href="../../wadl/barbican.wadl#webhook"/>
|
||||
</resources>
|
||||
</section>
|
||||
</chapter>
|
192
docs/src/docbkx/chapters/rbac.xml
Normal file
192
docs/src/docbkx/chapters/rbac.xml
Normal file
@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE section [
|
||||
<!-- in PDF: for line 1 on the cover page -->
|
||||
<!ENTITY PRODNAME "Rackspace Barbican">
|
||||
<!-- in PDF: for page headers -->
|
||||
<!ENTITY PRODABBV "Rackspace Barbican">
|
||||
<!-- in body -->
|
||||
<!ENTITY PROD "Barbican">
|
||||
]>
|
||||
<section
|
||||
security="writeronly"
|
||||
xml:id="RBAC"
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
|
||||
<title>Role Based Access Control (RBAC)</title>
|
||||
<para>Role Based Access Control (RBAC) restricts access to the
|
||||
capabilities of Rackspace Cloud services, including the Cloud
|
||||
&PRODNAME; API, to authorized users only. RBAC enables
|
||||
Rackspace Cloud customers to specify which account users of
|
||||
their Cloud account have access to which &PRODNAME; API
|
||||
service capabilities, based on roles defined by Rackspace (see
|
||||
<xref linkend="RBAC_product_roles_table"/>). The
|
||||
permissions to perform certain operations in the &PRODNAME;
|
||||
API – create, read, update, delete – are assigned to specific
|
||||
roles. The account owner assigns these roles, either
|
||||
multiproduct (global) or product-specific (for example, &PROD; only)
|
||||
to account users. </para>
|
||||
<section xml:id="assigningRoles">
|
||||
<title>Assigning Roles to Account Users</title>
|
||||
<para>The account owner (<code>identity:user-admin</code>) can
|
||||
create account users on the account and then assign roles
|
||||
to those users. The roles grant the account users
|
||||
specific permissions for accessing the capabilities of the
|
||||
&PROD; service. Each account has only one account owner,
|
||||
and that role is assigned by default to any
|
||||
Rackspace Cloud account when the account is created. </para>
|
||||
<para>See the <citetitle>Cloud Identity Client Developer
|
||||
Guide</citetitle> for information about how to perform the
|
||||
following tasks:</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/POST_addUser_v2.0_users_.html">
|
||||
Create account users</link>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/POST_addRole_v2.0_OS-KSADM_roles_.html">
|
||||
Assign roles to account users</link>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="http://docs-internal.rackspace.com/auth/api/v2.0/auth-client-devguide/content/DELETE_deleteUserRole_v2.0_users__userId__roles_OS-KSADM__roleId__.html">
|
||||
Delete roles from account users</link>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<note>
|
||||
<para>The account owner (<code>identity:user-admin</code>) role cannot
|
||||
hold any additional roles because it already has full
|
||||
access to all capabilities.</para>
|
||||
</note>
|
||||
</section>
|
||||
<section xml:id="rolesAvailable">
|
||||
<title>Roles Available for &PROD; </title>
|
||||
<para> Two roles (observer and admin) can be used to access the
|
||||
&PROD; API specifically. The following table describes
|
||||
these roles and their permissions. </para>
|
||||
<table rules="all" xml:id="RBAC_product_roles_table">
|
||||
<caption>&PROD; Product Roles and Capabilities</caption>
|
||||
<col width="50%"/>
|
||||
<col width="50%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Role Name</th>
|
||||
<th>Role Permissions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>autoscale:admin</code>
|
||||
</td>
|
||||
<td>This role provides Create, Read, Update, and Delete permissions
|
||||
in &PROD;, where access is
|
||||
granted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>autoscale:observer</code></td>
|
||||
<td>This role provides Read permission in &PROD;, where
|
||||
access is granted</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<para> Additionally, two multiproduct roles apply to all products.
|
||||
Users with multiproduct roles inherit access to future
|
||||
products when those products become RBAC-enabled. The
|
||||
following table describes these roles and their
|
||||
permissions.</para>
|
||||
<table rules="all" xml:id="RBAC_global_roles_table">
|
||||
<caption>Multiproduct (Global ) Roles and Capabilities</caption>
|
||||
<col width="50%"/>
|
||||
<col width="50%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Role Name</th>
|
||||
<th>Role Permissions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>admin</code></td>
|
||||
<td>Create, Read, Update, and Delete permissions across
|
||||
multiple products, where access is granted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>observer</code></td>
|
||||
<td>Read permission across multiple products, where
|
||||
access is granted </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<section xml:id="roleConflicts">
|
||||
<title>Resolving Conflicts Between RBAC Multiproduct vs.
|
||||
Custom (Product-specific) Roles</title>
|
||||
<para>
|
||||
The account owner can set roles for both multiproduct and &PROD; scope, and it is
|
||||
important to understand how any potential conflicts among these roles are resolved. When
|
||||
two roles appear to conflict, the role that provides the more extensive permissions takes
|
||||
precedence. Therefore, admin roles take precedence over observer roles, because admin
|
||||
roles provide more permissions.
|
||||
</para>
|
||||
<para>
|
||||
The following table shows two examples of how
|
||||
potential conflicts between user roles in the Control Panel are resolved:
|
||||
</para>
|
||||
<informaltable rules="all" xml:id="RBAC_role_conflicts_table"
|
||||
width="1017">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Permission Configuration</th>
|
||||
<th>View of Permission in the Control Panel</th>
|
||||
<th>Can the User Perform Product Admin Functions in the Control Panel?</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>User is assigned the following roles:
|
||||
multiproduct <emphasis role="bold"
|
||||
>observer</emphasis> and &PROD; <emphasis
|
||||
role="bold">admin</emphasis>
|
||||
</td>
|
||||
<td> Appears that the user has only the
|
||||
multiproduct <emphasis role="bold"
|
||||
>observer</emphasis> role. </td>
|
||||
<td> Yes, for &PROD; only. The user has the
|
||||
<emphasis role="bold">observer</emphasis>
|
||||
role for the rest of the products. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User is assigned the following roles:
|
||||
multiproduct <emphasis role="bold"
|
||||
>admin</emphasis> and &PROD; <emphasis
|
||||
role="bold">observer</emphasis></td>
|
||||
<td> Appears that the user has only the
|
||||
multiproduct <emphasis role="bold"
|
||||
>admin</emphasis> role. </td>
|
||||
<td> Yes, for all the products. The &PROD;
|
||||
observer role is ignored.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</informaltable>
|
||||
</section>
|
||||
<section xml:id="operationsRoles">
|
||||
<title>RBAC Permissions Cross-reference to &PROD; Operations</title>
|
||||
<para> API operations for &PROD; may or may not be available to all roles.
|
||||
To see which operations are permitted to invoke which calls, review
|
||||
<!-- This KC page does not exist yet; check with Renee Rendon and be sure to match the name she gives it.
|
||||
Later, we expect to be able to mark each operations' capabilitites in the WADL and then report it along with the other
|
||||
details about that operation. Check with David Cramer about when that can replace or augment this.
|
||||
-->
|
||||
<link
|
||||
xlink:href="http://www.rackspace.com/knowledge_center/article/permissions-matrix-for-auto-scale"
|
||||
>
|
||||
the Knowledge Center article</link>. </para>
|
||||
</section>
|
||||
</section>
|
768
docs/src/docbkx/ck-devguide.xml
Normal file
768
docs/src/docbkx/ck-devguide.xml
Normal file
@ -0,0 +1,768 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<book
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
version="5.0"
|
||||
xml:id="ck-devguide"
|
||||
status="DRAFT">
|
||||
<?rax canonical.url.base="http://docs.rackspace.com/keep/api/v1.0/ck-devguide/content"?>
|
||||
<title>Rackspace Barbican API Developer Guide</title>
|
||||
<info>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Rackspace US, Inc.</holder>
|
||||
</copyright>
|
||||
<releaseinfo>API v1.0</releaseinfo>
|
||||
<productname>Rackspace Barbican API</productname><!--Note that the <productname> text matches the first few words of the title. The build system splits the title into productname + rest of title on the pdf cover.-->
|
||||
<pubdate><!--If you leave the <pubdate> element empty, the build system inserts today's date automatically. --></pubdate>
|
||||
<revhistory>
|
||||
<revision>
|
||||
<date>2014-01-25</date>
|
||||
<revdescription>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Ipsum lorem.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</revdescription>
|
||||
</revision>
|
||||
</revhistory>
|
||||
<legalnotice role="rs-api">
|
||||
<annotation>
|
||||
<remark>Copyright details are filled in by the build system.</remark>
|
||||
</annotation>
|
||||
</legalnotice>
|
||||
<!--
|
||||
The values in raxm:metadata are used to control where the content appears on the landing page in docs.rackspace.com.
|
||||
Work with the Cloud Doc Tools team to find out what to put here. Once established, you should not change these
|
||||
values without first consulting with the CDT team.
|
||||
-->
|
||||
<raxm:metadata xmlns:raxm="http://docs.rackspace.com/api/metadata">
|
||||
<raxm:displayname>API Developer Guide</raxm:displayname>
|
||||
<raxm:product version="v1.0">keep</raxm:product>
|
||||
<raxm:priority>20</raxm:priority>
|
||||
</raxm:metadata>
|
||||
</info>
|
||||
<preface xml:id="preface">
|
||||
<title>Preface</title>
|
||||
<section xml:id="section_eow_tmw_ad">
|
||||
<title>Intended Audience</title>
|
||||
<para>This document is intended for software developers
|
||||
interested in developing applications using the Rackspace
|
||||
Barbican Application Programming Interface
|
||||
(<abbrev>API</abbrev>). </para>
|
||||
</section>
|
||||
<section xml:id="change_history">
|
||||
<title>Document Change History</title>
|
||||
<para>This version of the Developer Guide replaces and obsoletes
|
||||
all previous versions. The most recent changes are described
|
||||
in the table above.</para>
|
||||
<para>
|
||||
<?rax revhistory?>
|
||||
</para>
|
||||
</section>
|
||||
</preface>
|
||||
<chapter xml:id="Overview">
|
||||
<title>Overview</title>
|
||||
<para> </para>
|
||||
</chapter>
|
||||
<chapter xml:id="Barbican_Core_Concepts">
|
||||
<title>Barbican Core Concepts</title>
|
||||
<para> </para>
|
||||
<section xml:id="the-xml-id-attribute">
|
||||
<title>Barbican Architecture</title>
|
||||
<para>The following diagram provides a visual overview of the
|
||||
Barbican API Architecture:</para>
|
||||
<para>
|
||||
<figure>
|
||||
<title>Barbican API Architecture</title>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="images/Barbican_architecture.png" contentwidth="6in" align="left"/>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</figure>
|
||||
</para>
|
||||
<para>The Barbican API architecture consists of several API
|
||||
node(s) which handle incoming REST requests to Barbican. These
|
||||
nodes can interact with the database directly if the request
|
||||
can be completed synchronously (such as for GET requests),
|
||||
otherwise the queue supports asynchronous processing by worker
|
||||
nodes. </para>
|
||||
<para>The latter could include interactions with third parties
|
||||
such as certificate authorities. As implied in the diagram,
|
||||
the architecture supports multiple API and worker nodes being
|
||||
added/removed to/from the network, to support advanced
|
||||
features such as auto scaling. Eventually, the database could
|
||||
be replicated across data centers supporting region-agnostic
|
||||
storage and retrieval of secured information, albeit with lags
|
||||
possible during data synchronization. Also note that detailed
|
||||
audit information will be written to the database as well,
|
||||
capturing a history of actions that change the state of the
|
||||
system. </para>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="other-features">
|
||||
<title>General API Information</title>
|
||||
<section xml:id="Authentication-d1e647"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<title>Authentication</title>
|
||||
<para><link linkend="Retrieving_Auth_Token">Retrieving the
|
||||
Authentication Token</link></para>
|
||||
<para>Every REST request for Barbican requires the inclusion of
|
||||
a specific authentication token, supplied by the
|
||||
<code>X-Auth-Token</code> HTTP header. Customers obtain this
|
||||
token by first using the Rackspace Cloud Identity service and
|
||||
supplying a valid user name and API access key. </para>
|
||||
<section xml:id="Retrieving_Auth_Token">
|
||||
<title>Retrieving the Authentication Token</title>
|
||||
<para> The authenticate operation provides users with an
|
||||
authentication token and a list of regional cloud endpoints.
|
||||
The sample requests and responses in this section illustrate
|
||||
a general case. In your authentication request, use your own
|
||||
credentials rather than the sample values shown for
|
||||
<code>username</code> and <code>apiKey</code>. When you
|
||||
authenticate successfully, the response to your
|
||||
authentication request includes a catalog of the services to
|
||||
which you have subscribed rather than the sample values
|
||||
shown. </para>
|
||||
<para>The following table describes a request for an
|
||||
authentication token and the examples that follow show the
|
||||
request and response in JSON format.</para>
|
||||
<table rules="all">
|
||||
<caption>Request for Authentication Token</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="1">POST </td>
|
||||
<td colspan="1"> v2.0/tokens </td>
|
||||
<td colspan="4"> Authenticate to receive a token and a
|
||||
service catalog. </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<simpara> Normal Response Code(s):
|
||||
<returnvalue>200</returnvalue>,
|
||||
<returnvalue>203</returnvalue>
|
||||
</simpara>
|
||||
<simpara> Error Response Code(s): unauthorized
|
||||
(<errorcode>401</errorcode>), userDisabled
|
||||
(<errorcode>403</errorcode>), badRequest
|
||||
(<errorcode>400</errorcode>), authFault
|
||||
(<errorcode>500</errorcode>), serviceUnavailable
|
||||
(<errorcode>503</errorcode>) </simpara>
|
||||
<example>
|
||||
<title>Authentication Request for US Endpoint: JSON</title>
|
||||
<programlistingco>
|
||||
<areaspec>
|
||||
<area xml:id="credentials.json.user" units="linecolumn"
|
||||
coords="14 22"/>
|
||||
<area xml:id="credentials.json.key" units="linecolumn"
|
||||
coords="15 20"/>
|
||||
</areaspec>
|
||||
<programlisting language="json">
|
||||
<xi:include href="samples/reqAuthenticate.json" parse="text"/>
|
||||
</programlisting>
|
||||
</programlistingco>
|
||||
</example>
|
||||
<calloutlist>
|
||||
<callout arearefs="credentials.json.user">
|
||||
<para> The <code>username</code> supplied here is your
|
||||
common Rackspace Cloud user name. </para>
|
||||
</callout>
|
||||
<callout arearefs="credentials.json.key">
|
||||
<para> The key is your API access key. You can obtain the
|
||||
key from the <link
|
||||
xlink:href="http://mycloud.rackspace.com/">Rackspace
|
||||
Cloud Control Panel</link> in the <guimenu><Your
|
||||
Account></guimenu>/<guimenuitem>API
|
||||
Access</guimenuitem> section. </para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
<example xml:id="auth-response-example-json">
|
||||
<title>Authentication Response for US Endpoint: JSON</title>
|
||||
<programlistingco>
|
||||
<areaspec>
|
||||
<area xml:id="response.json.token" units="linecolumn"
|
||||
coords="10 8"/>
|
||||
<area xml:id="response.json.dfltregion"
|
||||
units="linecolumn" coords="17 12"/>
|
||||
<area xml:id="response.json.role" units="linecolumn"
|
||||
coords="18 12"/>
|
||||
<area xml:id="response.json.catalog" units="linecolumn"
|
||||
coords="31 8"/>
|
||||
<area xml:id="response.json.service-lb"
|
||||
units="linecolumn" coords="49 16"/>
|
||||
<area xml:id="response.json.service-compute"
|
||||
units="linecolumn" coords="65 16"/>
|
||||
<area xml:id="response.json.service-monitor"
|
||||
units="linecolumn" coords="87 16"/>
|
||||
<area xml:id="response.json.service-autoscale"
|
||||
units="linecolumn" coords="97 16"/>
|
||||
<area xml:id="response.json.tenant" units="linecolumn"
|
||||
coords="121 24"/>
|
||||
<area xml:id="response.json.url" units="linecolumn"
|
||||
coords="122 24"/>
|
||||
<area xml:id="response.json.region" units="linecolumn"
|
||||
coords="124 24"/>
|
||||
<area xml:id="response.json.servicename"
|
||||
units="linecolumn" coords="133 16"/>
|
||||
<area xml:id="response.json.servicetype"
|
||||
units="linecolumn" coords="134 16"/>
|
||||
</areaspec>
|
||||
<programlisting language="json">
|
||||
<xi:include href="samples/resAuthenticate.json" parse="text"/>
|
||||
</programlisting>
|
||||
</programlistingco>
|
||||
</example>
|
||||
<note>
|
||||
<para>The information shown in the authentication response
|
||||
example is for US-based accounts. If you authenticate
|
||||
against the UK endpoint, the response you receive shows
|
||||
the service catalog information for UK-based
|
||||
accounts.</para>
|
||||
</note>
|
||||
<calloutlist>
|
||||
<callout arearefs="response.json.token">
|
||||
<para>This token can be presented to a service as evidence
|
||||
of authentication. Tokens are valid for a finite
|
||||
duration; a token's default lifespan is 24 hours. </para>
|
||||
<para>The token's <code>expires</code> attribute denotes
|
||||
the time after which the token automatically becomes
|
||||
invalid. A token can be manually revoked before the time
|
||||
identified by the <code>expires</code> attribute.
|
||||
The<code>expires</code> attribute predicts a token's
|
||||
maximum possible lifespan but does not guarantee that it
|
||||
will reach that lifespan. Users are encouraged to cache
|
||||
a token until it expires. </para>
|
||||
<para>Authentication tokens are typically valid for 24
|
||||
hours. Applications should be designed to
|
||||
re-authenticate after receiving a
|
||||
<errorcode>401</errorcode> (Unauthorized) response
|
||||
from a service endpoint. </para>
|
||||
<note>
|
||||
<para>The token's expiration time is formatted
|
||||
differently in the US and UK. These response examples
|
||||
show the US format. For examples of the UK format, see
|
||||
<link
|
||||
xlink:href="http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/POST_authenticate_v2.0_tokens_.html"
|
||||
>http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/POST_authenticate_v2.0_tokens_.html</link>.</para>
|
||||
</note>
|
||||
<para> </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.dfltregion">
|
||||
<para>Users can be assigned a default region. If multiple
|
||||
endpoints are associated with a service in the user's
|
||||
catalog, the endpoint for the user's default region is
|
||||
selected if it is available. In this example, the user's
|
||||
default region is DFW, and several of the services in
|
||||
the user's catalog offer endpoints in that region and
|
||||
the ORD region; whenever possible, the user's work is
|
||||
directed to the DFW region. </para>
|
||||
<para> </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.role">
|
||||
<para>Users can be assigned multiple roles, with each role
|
||||
providing specific privileges. In this example,
|
||||
<code>jsmith</code> is the administrative user for the
|
||||
account and holds the fully-privileged
|
||||
<code>identity:admin</code> role. Other users might
|
||||
hold other roles with different privileges. Roles are
|
||||
not necessarily associated with actual job functions
|
||||
such as Administrator, Operator, Developer, Tester, or
|
||||
Trainer. </para>
|
||||
<para> </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.catalog">
|
||||
<para>The service catalog lists the services this user can
|
||||
access. </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.tenant">
|
||||
<para>Some services recognize the specification of a
|
||||
tenant. If a service does recognize tenants, the format
|
||||
of the tenant specification is defined only by the
|
||||
service. For details about whether and how to specify a
|
||||
tenant, check the documentation for the service that you
|
||||
are using.</para>
|
||||
<para> </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.url">
|
||||
<para>An endpoint can be assigned public and internal
|
||||
URLs. A public URL is accessible from anywhere. Access
|
||||
to a public URL usually incurs traffic charges. Internal
|
||||
URLs are accessible only to services within the same
|
||||
region. Access to an internal URL is free of charge. </para>
|
||||
<para> </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.region">
|
||||
<para>A service can expose endpoints in different regions.
|
||||
Regional endpoints allow users to provision resources in
|
||||
a manner that provides high availability. </para>
|
||||
<para>Some services are not region specific. These
|
||||
services supply a single, non-regional endpoint and do
|
||||
not provide access to internal URLs. </para>
|
||||
<para> </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.servicename">
|
||||
<para>The service name attribute identifies each unique
|
||||
service in the catalog. After a service is created, its
|
||||
name does not change. However, new services of the same
|
||||
service type can be added to the catalog with new names. </para>
|
||||
<important>
|
||||
<para>If you are programmatically parsing an
|
||||
authentication response, use service type rather than
|
||||
service name to determine whether a user has access to
|
||||
a particular kind of service. Service type is stable
|
||||
across all releases. New service types might be
|
||||
developed, but existing service types are not renamed.
|
||||
It is possible to subscribe to multiple services of
|
||||
the same type. Whatever those services are named, you
|
||||
can always recognize them by parsing for service type
|
||||
in the authentication response's service catalog.
|
||||
</para>
|
||||
</important>
|
||||
<para> </para>
|
||||
</callout>
|
||||
<callout arearefs="response.json.servicetype">
|
||||
<para>The service type attribute identifies services that
|
||||
perform similar functions, regardless of service names.
|
||||
In this example, the service named cloudFiles is
|
||||
identified as <code>type="store"</code>, indicating that
|
||||
it is a storage service even though the word "storage"
|
||||
does not appear in its name. </para>
|
||||
<important>
|
||||
<para>Use service type as the primary value for locating
|
||||
a service. If multiple endpoints of the same service
|
||||
type exist in the same region, use service name to
|
||||
locate the appropriate service.</para>
|
||||
</important>
|
||||
<para> </para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="serviceEndpoints"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<title>Service Access Endpoints</title>
|
||||
<para>Barbican s a regionalized service. The user of the service
|
||||
is therefore responsible for appropriate replication, caching,
|
||||
and overall maintenance of Barbican data across regional
|
||||
boundaries to other Barbian servers.</para>
|
||||
<para>The following table lists the service access endpoints for
|
||||
Barbican.</para>
|
||||
<?rax-fo keep-with-next?>
|
||||
<para>
|
||||
<table rules="all">
|
||||
<caption>Regionalized Service Endpoints</caption>
|
||||
<col width="11%"/>
|
||||
<col width="11%"/>
|
||||
<col width="16%"/>
|
||||
<col width="16%"/>
|
||||
<col width="16%"/>
|
||||
<col width="16%"/>
|
||||
<col width="16%"/>
|
||||
<thead>
|
||||
<tr align="center">
|
||||
<td colspan="2">Region</td>
|
||||
<td colspan="5">Endpoint</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr align="left">
|
||||
<td colspan="2">Chicago (ORD)</td>
|
||||
<td colspan="5"
|
||||
><code>https://ord.secrets.api.rackspacecloud.com/v1.0/</code><parameter>1234</parameter>/
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td colspan="2">Dallas/Ft. Worth (DFW)</td>
|
||||
<td colspan="5"
|
||||
><code>https://dfw.secrets.api.rackspacecloud.com/v1.0/</code><parameter>1234</parameter>/
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td colspan="2">London (LON)</td>
|
||||
<td colspan="5">
|
||||
<code>https://lon.secrets.api.rackspacecloud.com/v1.0/</code><parameter>1234</parameter>/
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td colspan="2">Sydney (SYD)</td>
|
||||
<td colspan="5">
|
||||
<code>https://syd.secrets.api.rackspacecloud.com/v1.0/</code><parameter>1234</parameter>/
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td colspan="2">Hong Kong (HKG)</td>
|
||||
<td colspan="5"
|
||||
><code>https://hkg.secrets.api.rackspacecloud.com/v1.0/</code><parameter>1234</parameter>/
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</para>
|
||||
<para>Replace the Tenant ID, <parameter>1234</parameter>, with
|
||||
your actual Tenant ID.</para>
|
||||
<para>You will find your tenant Id after the final '/' in the
|
||||
<code>publicURL</code> field returned by the authentication
|
||||
response. For example, in <olink
|
||||
targetdoc="autoscale-devguide"
|
||||
targetptr="auth-response-example-json">Example 2,
|
||||
“Authentication Response for US Endpoint: JSON”</olink> the
|
||||
<code>publicURL</code> field for <code>secrets</code>
|
||||
("https://ord.secrets.api.rackspacecloud.com/v1.0/<emphasis
|
||||
role="bold">1100111</emphasis>") shows that the tenant Id is
|
||||
1100111. </para>
|
||||
</section>
|
||||
<section xml:id="contractVersion"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<title>Contract Versions</title>
|
||||
<para> The version defines the contract and build information
|
||||
for the API. </para>
|
||||
<para>The contract version denotes the data model and behavior
|
||||
that the API supports. The requested contract version is
|
||||
included in all request URLs. Different contract versions of
|
||||
the API might be available at any given time and are not
|
||||
guaranteed to be compatible with one another. </para>
|
||||
<example>
|
||||
<title>Sample Request URL for Contract Version 1.0</title>
|
||||
<programlisting>https://ord.secrets.api.rackspacecloud.com/<emphasis role="strong">v1.0</emphasis>/1234</programlisting>
|
||||
</example>
|
||||
<note>
|
||||
<para>This document pertains to contract version 1.0.</para>
|
||||
</note>
|
||||
</section>
|
||||
<section xml:id="Request_Response_Types-d1e903"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<title>Request and Response Types</title>
|
||||
<para>The Rackspace Barbican API supports JSON data
|
||||
serialization formats. You specify the request format by using
|
||||
the <code>Content-Type</code> header. The request format is
|
||||
<emphasis role="italic">required</emphasis> for calls that
|
||||
have a request body. You can specify the response format in
|
||||
requests either by using the <code>Accept</code> header or by
|
||||
adding a <code>.json</code> extension to the request URI. JSON
|
||||
is also used for the response format.</para>
|
||||
<table rules="all">
|
||||
<caption>Response Format</caption>
|
||||
<?dbfo keep-together="always"?>
|
||||
<thead>
|
||||
<tr align="center">
|
||||
<td>Format</td>
|
||||
<td>Accept Header</td>
|
||||
<td>Query Extension</td>
|
||||
<td>Default</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>JSON</td>
|
||||
<td>application/json</td>
|
||||
<td>.json</td>
|
||||
<td>Yes</td>
|
||||
</tr>
|
||||
<tr security="writeronly">
|
||||
<td>XML</td>
|
||||
<td>application/xml</td>
|
||||
<td>.xml</td>
|
||||
<td>No</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<?hard-pagebreak?>
|
||||
<section xml:id="Limits-d1e1208"
|
||||
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
<title>Limits</title>
|
||||
<para> All accounts, by default, have a preconfigured set of
|
||||
thresholds (or limits) to manage capacity and prevent abuse of
|
||||
the system. The system recognizes <firstterm>rate
|
||||
limits</firstterm> and <firstterm>absolute
|
||||
limits</firstterm>. Rate limits are thresholds that are
|
||||
reset after a certain amount of time passes. Absolute limits
|
||||
are fixed. </para>
|
||||
<section xml:id="Rate_Limits-d1e1222">
|
||||
<!--
|
||||
rate limits are managed by Repose rate limiting filter,
|
||||
config at https://github.com/rackerlabs/autoscaling-chef/blob/master/site-cookbooks/repose/attributes/default.rb
|
||||
-->
|
||||
<title>Rate Limits</title>
|
||||
<para>Rate limits are specified in terms of both a
|
||||
human-readable wildcard URI and a machine-processable
|
||||
regular expression. The regular expression boundary matcher
|
||||
'^' takes effect after the root URI path. </para>
|
||||
<para>For example, the regular expression
|
||||
<code>^/v1.0/execute</code> would match the bolded portion
|
||||
of the following URI:
|
||||
https://ord.secrets.api.rackspacecloud.com<emphasis
|
||||
role="bold">/v1.0/execute</emphasis>. </para>
|
||||
<para>For any user, all operations are limited to 1,000 calls
|
||||
per minute. </para>
|
||||
<para>If you exceed the thresholds established for your
|
||||
account, a <errorcode>413</errorcode> (Rate Control) HTTP
|
||||
response is returned with a <code>Retry-After</code> header
|
||||
to notify the client when it can attempt to try again.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
<!-- <xi:include href="./chapters/rbac.xml"/>-->
|
||||
<chapter xml:id="Barbican_API_Overview">
|
||||
<title>General API Information</title>
|
||||
<section xml:id="Secrets_Resource">
|
||||
<title>Secrets Resource</title>
|
||||
<para>The secrets resource is the heart of the Barbican service.
|
||||
It provides access to the secret / keying material stored in
|
||||
the system. </para>
|
||||
<para>The secret scheme represents the actual secret or key that
|
||||
will be presented to the application. Secrets can be of any
|
||||
format, but additional functionality may be available for
|
||||
known types of symmetric or asymmetric keys. The schema for
|
||||
creating a secret differs from the retrieval schema is shown
|
||||
next. </para>
|
||||
<para>Secrets can be created in two ways: Via POST including a
|
||||
payload, or with a POST without a payload followed by a PUT. </para>
|
||||
<para>
|
||||
<note>
|
||||
<para>Note that the POST calls create secret <emphasis
|
||||
role="italic">metadata</emphasis>. If the payload is
|
||||
provided with the POST call, then it is encrypted and
|
||||
stored, and then linked with this metadata. Otherwise, the
|
||||
PUT call provides this payload. Hence clients must provide
|
||||
the secret information to store via these 'create'
|
||||
operations. This should not be confused with the secret
|
||||
'generation' process via the orders resource below,
|
||||
whereby Barbican generates the secret information.</para>
|
||||
</note>
|
||||
</para>
|
||||
<section xml:id="Examples_of_Secrets"><title>Examples of Secret Combinations</title>
|
||||
<para>The tables in this section are focused on the
|
||||
content-types and content-encodings of the various REST verb
|
||||
flows, even though each flow might have a different way to
|
||||
specify these values (either via http header settings or
|
||||
JSON request field). The reason for this approach is that
|
||||
while each flow has a different means to specify the
|
||||
mime-type and encoding, the values set for them must still
|
||||
be consistent with valid mime-type or encoding
|
||||
selections.</para>
|
||||
<para/>
|
||||
<para>
|
||||
<table rules="all">
|
||||
<caption>One-Step UTF-8/ACII Secret
|
||||
Create/Retrieve</caption>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th>content-type</th>
|
||||
<th>content-encoding</th>
|
||||
<th>Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>POST secrets</td>
|
||||
<td>payload_content_type = text/plain</td>
|
||||
<td>payload_content_encoding not needed</td>
|
||||
<td>Supplied payload is encrypted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET secrets (meta)</td>
|
||||
<td>Accept: application/json</td>
|
||||
<td>Not required/ignored</td>
|
||||
<td>JSON metadata, with content-type set to
|
||||
'default':'text/plain'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET Secrets</td>
|
||||
<td>Accept: text/plain </td>
|
||||
<td>Not required/ignored</td>
|
||||
<td>Previous payload is decrypted</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</para>
|
||||
<table rules="all">
|
||||
<caption>One-Step Binary Secret Create/Retrieve</caption>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th>content-type</th>
|
||||
<th>content-encoding</th>
|
||||
<th>Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>POST secrets</td>
|
||||
<td>payload_content_type = application/octet-stream</td>
|
||||
<td>payload_content_encoding = base64</td>
|
||||
<td>Supplied payload is converted from base64 to binary,
|
||||
then encrypted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET secrets (meta)</td>
|
||||
<td>Accept: application/json</td>
|
||||
<td>Not required/ignored</td>
|
||||
<td>JSON metadata, with content-type set to
|
||||
'default':'application/octet-stream'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET Secrets</td>
|
||||
<td>Accept: text/plain </td>
|
||||
<td>Not specified</td>
|
||||
<td>Previous payload is decrypted and returned as raw
|
||||
binary, even if the PUT request provided data in
|
||||
base64.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
<para>
|
||||
<table rules="all">
|
||||
<caption>Two-Step Binary Secret Create/Retrieve</caption>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th>content-type</th>
|
||||
<th>content-encoding</th>
|
||||
<th>Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>POST secrets</td>
|
||||
<td>payload_content_type optionally specified</td>
|
||||
<td>payload_content_encoding optionally specified</td>
|
||||
<td>Only metadata is created. If the
|
||||
payload_content_type or payload_content_encoding
|
||||
fields were provided, they are not used or saved
|
||||
with the metadata. The PUT request (next) will
|
||||
determine the secret's content type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET secrets (meta)</td>
|
||||
<td>Content-type: application/octet-stream</td>
|
||||
<td>Content-Encoding: base64</td>
|
||||
<td>Supplied request body is <emphasis role="italic"
|
||||
>converted from base64 to binary</emphasis>, then
|
||||
encrypted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET Secrets</td>
|
||||
<td>Content-type: application/octet-stream</td>
|
||||
<td>Not specified</td>
|
||||
<td>Supplied request body is encrypted as is</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>POST secrets</td>
|
||||
<td>Accept: application/json</td>
|
||||
<td>Not required/ignored</td>
|
||||
<td>JSON metadata, with Content-Types set to
|
||||
'default':'application/octet-stream'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>POST secrets</td>
|
||||
<td>Accept: application/octet-stream</td>
|
||||
<td>Not specified</td>
|
||||
<td>Previous request is decrypted and returned as raw
|
||||
binary, <emphasis role="italic">even if the PUT
|
||||
provided the data in base64</emphasis>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
<table rules="all">
|
||||
<caption>Two-Step Plain-Text Secret
|
||||
Create/Retrieve</caption>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Action</th>
|
||||
<th>content-type</th>
|
||||
<th>content-encoding</th>
|
||||
<th>Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>POST secrets</td>
|
||||
<td>payload_content_type = optionally specified</td>
|
||||
<td>payload_content_encoding optionally specified</td>
|
||||
<td>Only metadata is created. If the
|
||||
payload_content_type or payload_content_encoding
|
||||
fields were provided, they are not used or saved
|
||||
with the metadata. The PUT request (next) will
|
||||
determine the secret's content format</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PUT secrets</td>
|
||||
<td>Content-type: text/plain </td>
|
||||
<td>Not required/ignored</td>
|
||||
<td>JSON metadata, with content-type set to
|
||||
'default':'text/plain'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET secrets (meta)</td>
|
||||
<td>Accept: application/json</td>
|
||||
<td>Not required/ignored</td>
|
||||
<td>JSON metadata, with Content-Types set to
|
||||
'default':'text/plain'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GET secrets (decrypted)</td>
|
||||
<td>Accept: text/plain</td>
|
||||
<td>Not specified</td>
|
||||
<td>Previous request is decrypted and returned as
|
||||
utf-8 text</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
<section xml:id="Orders_Resource">
|
||||
<title>Orders Resource</title>
|
||||
<para>The orders resource allows for the generation of secret
|
||||
material by Barbican. The ordering object encapsulates the
|
||||
workflow and history for the creation of a secret. This
|
||||
interface is implemented as an asynchronous process since the
|
||||
time to generate a secret can vary depending on the type of
|
||||
secret. </para></section></chapter>
|
||||
|
||||
<chapter xml:id="volume"
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
role="api-reference" >
|
||||
<title>API Operations</title>
|
||||
<para>This chapter describes each of the operations. The following
|
||||
table summarizes all of the operations that are
|
||||
available:</para>
|
||||
<wadl:resources
|
||||
href="../wadl/Barbican.wadl"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02"/>
|
||||
</chapter>
|
||||
|
||||
</book>
|
759
docs/src/docbkx/ck-gettingstarted.xml
Normal file
759
docs/src/docbkx/ck-gettingstarted.xml
Normal file
@ -0,0 +1,759 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<book xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0"
|
||||
xml:id="ck-gettingstarted">
|
||||
<?rax canonical.url.base="http://docs.rackspace.com/keep/api/v1.0/ck-gettingstarted/content"?>
|
||||
<title>Rackspace Barbican API Getting Started Guide</title>
|
||||
<info>
|
||||
<author>
|
||||
<personname>
|
||||
<firstname/>
|
||||
<surname/>
|
||||
</personname>
|
||||
<affiliation>
|
||||
<orgname>Rackspace Cloud</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Rackspace US, Inc.</holder>
|
||||
</copyright>
|
||||
<releaseinfo>API v1.0</releaseinfo>
|
||||
<productname>Rackspace Barbican</productname>
|
||||
<pubdate/>
|
||||
<legalnotice role="rs-api">
|
||||
<annotation>
|
||||
<remark>Copyright details are filled in by the
|
||||
template.</remark>
|
||||
</annotation>
|
||||
</legalnotice>
|
||||
<abstract>
|
||||
<para>This document is intended for software developers
|
||||
who want to programmatically manage orders and secrets
|
||||
using the Barbican API.</para>
|
||||
</abstract>
|
||||
<revhistory>
|
||||
<revision>
|
||||
<date>2013-12-12</date>
|
||||
<revdescription>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Created initial outline</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</revdescription>
|
||||
</revision>
|
||||
</revhistory>
|
||||
<raxm:metadata
|
||||
xmlns:raxm="http://docs.rackspace.com/api/metadata">
|
||||
<raxm:displayname>Getting Started Guide</raxm:displayname>
|
||||
<raxm:product version="v1.0">keep</raxm:product>
|
||||
<raxm:priority>10</raxm:priority>
|
||||
</raxm:metadata>
|
||||
</info>
|
||||
<chapter xml:id="Feeds_Doc_Change_History">
|
||||
<title>Document Change History</title>
|
||||
<para>This version of the Getting Started replaces and
|
||||
obsoletes all previous versions. The most recent changes
|
||||
are described in the table below:</para>
|
||||
<?rax revhistory?>
|
||||
</chapter>
|
||||
<chapter xml:id="Barbican_Overview">
|
||||
<title>Rackspace Barbican API Overview</title>
|
||||
<para>Barbican is a REST API designed for the secure storage,
|
||||
provisioning and management of secrets. </para>
|
||||
<section xml:id="What_is_Barbican">
|
||||
<title>What is Barbican?</title>
|
||||
<para>Barbican is a REST API designed for the secure
|
||||
storage, provisioning and management of secrets.
|
||||
Barbican supports the following types of
|
||||
secrets:</para>
|
||||
<para>
|
||||
<table frame="void">
|
||||
<caption>Secret Types Supported by
|
||||
Barbican</caption>
|
||||
<col width="30%"/>
|
||||
<col width="70%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Secret Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Symmetric Keys</td>
|
||||
<td>Perform reversible encryption of data
|
||||
at rest, typically using the AES
|
||||
algorithm set. Symmetric keys are
|
||||
required to enable features, such as
|
||||
encrypted Swift containers and Cinder
|
||||
volumes, encrypted Cloud Backups,
|
||||
etc.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asymmetric Keys</td>
|
||||
<td>Asymmetric key pairs (sometimes
|
||||
referred to as public / private keys)
|
||||
are used in many scenarios where
|
||||
communication between untrusted
|
||||
parties is desired. The most common
|
||||
case is with SSL/TLS certificates.
|
||||
Asymmetric keys but are also used in
|
||||
solutions like SSH keys, S/MIME (mail)
|
||||
encryption and digital
|
||||
signatures.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Raw Secrets</td>
|
||||
<td>Barbican stores secrets as binary
|
||||
blocks of data (encrypted, naturally).
|
||||
Clients can use the API to store any
|
||||
secrets in any format they desire.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</para>
|
||||
</section>
|
||||
<section xml:id="Prerequisites_Examples">
|
||||
<title>Prerequisites for Running Examples</title>
|
||||
<para>In order to run the examples in this guide, you must
|
||||
have the following: <itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>A Rackspace Cloud account</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>A Rackspace Cloud username and password,
|
||||
as specified during registration</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
</section>
|
||||
<section xml:id="Service_Access_and_Endpoints">
|
||||
<title>Service Access and Endpoints</title>
|
||||
<para></para>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="Feeds_Sending_API_Requests">
|
||||
<title>Send Requests to the API</title>
|
||||
<para>You have several options for sending requests through an
|
||||
API: </para>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>Developers and testers may prefer to use cURL,
|
||||
the command-line tool from <link
|
||||
xlink:href="http://curl.haxx.se/"
|
||||
>http://curl.haxx.se/</link>. </para>
|
||||
<para>With cURL you can send HTTP requests and receive
|
||||
responses back from the command line. </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>If you like to use a more graphical interface,
|
||||
the ReST client for Firefox also works well for
|
||||
testing and trying out commands, see <link
|
||||
xlink:href="https://addons.mozilla.org/en-US/firefox/addon/restclient/"
|
||||
>https://addons.mozilla.org/en-US/firefox/addon/restclient/</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>You can also download and install rest-client, a
|
||||
Java application to test ReSTful web services,
|
||||
from <link
|
||||
xlink:href="http://code.google.com/p/rest-client/"
|
||||
>http://code.google.com/p/rest-client/</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<section xml:id="Feeds_using-curl-cli">
|
||||
<title>Send API Requests Using cURL</title>
|
||||
<para>cURL is a command-line tool that is available on
|
||||
most UNIX®-like environments and Mac OS X® and can be
|
||||
downloaded for Windows® in order to interact with the
|
||||
ReST interfaces. For more information on cURL, visit
|
||||
<link xlink:href="http://curl.haxx.se/"
|
||||
>http://curl.haxx.se/</link>. </para>
|
||||
<para>cURL allows you to transmit and receive HTTP
|
||||
requests and responses from the command-line or from
|
||||
within a shell script. This makes it possible to work
|
||||
with the ReST API directly without using one of the
|
||||
client APIs. </para>
|
||||
<para>The following cURL command-line options will be used
|
||||
in this guide to run the examples:</para>
|
||||
<variablelist>
|
||||
<title>cURL Command-Line Options</title>
|
||||
<varlistentry>
|
||||
<term><option>-d</option></term>
|
||||
<listitem>
|
||||
<para>Sends the specified data in a post
|
||||
request to the HTTP server.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-i</option></term>
|
||||
<listitem>
|
||||
<para>Includes the HTTP header in the
|
||||
output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-H HEADER</option></term>
|
||||
<listitem>
|
||||
<para>Specify an HTTP header in the
|
||||
request.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-X</option></term>
|
||||
<listitem>
|
||||
<para>Specifies the request method to use when
|
||||
communicating with the HTTP server. The
|
||||
specified request is used instead of the
|
||||
default method, which is GET. For example,
|
||||
<option>-X PUT</option> specifies to
|
||||
use the PUT request method.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<note>
|
||||
<para>If you have the tools, you can run the cURL JSON
|
||||
request examples with the following options to
|
||||
format the output from cURL: <command><curl
|
||||
JSON request example> | python
|
||||
-mjson.tool</command>.</para>
|
||||
</note>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="Generating_Auth_Token">
|
||||
<title>Generate an Authentication Token</title>
|
||||
<para>You need to generate a token whether you use cURL or a
|
||||
ReST client.</para>
|
||||
<para>In order to use the ReST API, you will first need to
|
||||
obtain an authentication token, which will need to be
|
||||
passed in for each request using the
|
||||
<code>X-Auth-Token</code> header. </para>
|
||||
<para>The following example demonstrates how to use cURL to
|
||||
obtain the authentication token and the account number.
|
||||
You will need to supply the authentication token and
|
||||
account number when making subsequent Cloud Databases API
|
||||
calls.</para>
|
||||
<para>Remember to replace the names in the Authenticate
|
||||
Request examples below with their respective
|
||||
values:<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para><emphasis role="bold"
|
||||
>your_username</emphasis> The username is
|
||||
your common Rackspace Cloud username, as
|
||||
supplied during registration.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="bold"
|
||||
>your_api_key</emphasis> The key is your
|
||||
API access key.</para>
|
||||
<para><emphasis role="bold">To find your API
|
||||
Key:</emphasis></para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Log in to the Cloud Control Panel
|
||||
(<link
|
||||
xlink:href="https://mycloud.rackspace.com"
|
||||
>https://mycloud.rackspace.com</link>).</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>On the upper-right side of the top
|
||||
navigation pane, click your
|
||||
username.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>From the menu, select
|
||||
<guimenuitem>Account
|
||||
Settings</guimenuitem>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>In the Login Details section of the
|
||||
Account Settings page, locate the
|
||||
<guilabel>API Key</guilabel> field
|
||||
and click
|
||||
<guibutton>Show</guibutton>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Copy the value of the API Key and
|
||||
paste it into a text editor of your
|
||||
choice.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Click <guibutton>Hide</guibutton> to
|
||||
hide the value of the API Key. </para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<para>You also need your cloud account number. In
|
||||
the documentation, the account number is often
|
||||
referred to as your tenant name or tenant ID
|
||||
(technically, the ID is different from the
|
||||
name, but at Rackspace, they are the same
|
||||
thing). Together, three components—your
|
||||
username, your API Key, and your tenant ID or
|
||||
cloud account number—form the authentication
|
||||
credentials that are required to connect to
|
||||
the Rackspace cloud. To find your tenant ID or
|
||||
cloud account number, locate your username on
|
||||
the upper-right side of the top navigation
|
||||
pane in the Cloud Control Panel. The tenant ID
|
||||
or account number is in parentheses just to
|
||||
the right of your username.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
<para>Notice that you authenticate using a special URL for
|
||||
Cloud authentication services. For example, you may use
|
||||
<code>https://identity.api.rackspacecloud.com/v2.0/tokens</code>,
|
||||
as shown in the following Authenticate Request examples.
|
||||
Note that the <code>v2.0</code> component in the URL
|
||||
indicates that you are using version 2.0 of the Cloud Auth
|
||||
API.</para>
|
||||
<example>
|
||||
<title>cURL Authenticate Request: XML</title>
|
||||
<?dbfo keep-together="always"?>
|
||||
<screen language="bash"><command>curl</command> <option>-i</option> <option>-d</option> \
|
||||
'<?xml version="1.0" encoding="UTF-8"?>
|
||||
<auth>
|
||||
<apiKeyCredentials
|
||||
xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0"
|
||||
username="<emphasis role="bold">your_username</emphasis>"
|
||||
apiKey="<emphasis role="bold">your_api_key</emphasis>"/>
|
||||
</auth>' \
|
||||
<option>-H 'Content-Type: application/xml'</option> \
|
||||
<option>-H 'Accept: application/xml'</option> \
|
||||
<uri>'https://identity.api.rackspacecloud.com/v2.0/tokens'</uri></screen>
|
||||
</example>
|
||||
<example>
|
||||
<title>cURL Authenticate Request: JSON</title>
|
||||
<?dbfo keep-together="always"?>
|
||||
<screen language="bash"><command>curl</command> <option>-i</option> <option>-d</option> \
|
||||
'{
|
||||
"auth":
|
||||
{
|
||||
"RAX-KSKEY:apiKeyCredentials":
|
||||
{
|
||||
"username": "<emphasis role="bold">your_username</emphasis>",
|
||||
"apiKey": "<emphasis role="bold">your_api_key</emphasis>"}
|
||||
}
|
||||
}' \
|
||||
<option>-H 'Content-Type: application/json'</option> \
|
||||
<uri>'https://identity.api.rackspacecloud.com/v2.0/tokens'</uri></screen>
|
||||
</example>
|
||||
<note>
|
||||
<para>For UK-based accounts, you may decide to use
|
||||
<code>'https://lon.identity.api.rackspacecloud.com/v2.0/tokens'</code>
|
||||
instead.</para>
|
||||
</note>
|
||||
<para>The authentication token <code>id</code> is returned
|
||||
along with an <code>expires</code> attribute that
|
||||
specifies when the token expires. </para>
|
||||
<note>
|
||||
<itemizedlist spacing="compact">
|
||||
<listitem>
|
||||
<para>For all response examples in this guide, the
|
||||
field values you receive in your responses
|
||||
will vary from those shown here since they
|
||||
will be specific to your account.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>The information shown in the Authenticate
|
||||
Response examples above is for US-based
|
||||
accounts. If you authenticate against the
|
||||
UK-endpoint for auth, you will see the service
|
||||
catalog information for UK-based
|
||||
accounts.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>The <code>id</code> attribute in the
|
||||
Authenticate Response specifies the
|
||||
authentication token. Tokens are valid for a
|
||||
finite duration.</para>
|
||||
<para>Remember to supply your authentication token
|
||||
wherever you see the field <emphasis
|
||||
role="bold">your_auth_token</emphasis> in
|
||||
the examples in this guide.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> The <code>expires</code> attribute denotes
|
||||
the time after which the token will
|
||||
automatically become invalid. A token may be
|
||||
manually revoked before the time identified by
|
||||
the expires attribute; <code>expires</code>
|
||||
predicts a token's maximum possible lifespan
|
||||
but does not guarantee that it will reach that
|
||||
lifespan. Clients are encouraged to cache a
|
||||
token until it expires.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Applications should be designed to
|
||||
re-authenticate after receiving a 401
|
||||
(Unauthorized) response from a service
|
||||
endpoint.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</note>
|
||||
<para>The <code>publicURL</code> endpoints for
|
||||
<code>cloudDatabases</code> (for example
|
||||
<code>https://ord.databases.api.rackspacecloud.com/v1.0/1100111</code>)
|
||||
are also returned in the response. </para>
|
||||
<para>You will find the actual account number after the final
|
||||
'/' in the <code>publicURL</code> field. In this example,
|
||||
you can see that the account number is 1100111. </para>
|
||||
</chapter>
|
||||
<chapter xml:id="Prepare_Workstation_for_Barbican">
|
||||
<title>Prepare your Workstation to Use Barbican</title>
|
||||
<para>To prepare your workstation to use Barbican, you need to
|
||||
have several tools and applications install on your
|
||||
workstation.</para>
|
||||
<para>The following table lists the tools that must be
|
||||
installed prior to installing Barbican:<table frame="void"
|
||||
rules="all">
|
||||
<caption>Prerequisites for installing
|
||||
Barbican</caption>
|
||||
<col width="18%"/>
|
||||
<col width="82%"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center">Tool</th>
|
||||
<th align="center">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr align="left">
|
||||
<td>pyenv </td>
|
||||
<td>Python Version Management tool. Available
|
||||
for download from GitHub. </td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>pyenv-virtualenv</td>
|
||||
<td>pyenv plugin that provides a pyenv
|
||||
virtualenv command to create virtualenv
|
||||
for Python on UNIX-like systems. Available
|
||||
for download from GitHub.</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>Git</td>
|
||||
<td>Git client. Available for download from
|
||||
<link
|
||||
xlink:href="http://git-scm.com/downloads"
|
||||
>http://git-scm.com/downloads</link>.</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>cURL</td>
|
||||
<td>Command line tool for transferring data
|
||||
with URL syntax. Available for download
|
||||
from: <link
|
||||
xlink:href="http://curl.haxx.se"
|
||||
>http://curl.haxx.se/</link>.</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>pip</td>
|
||||
<td>Python installer tool. Available for
|
||||
download from: <link
|
||||
xlink:href="http://www.pip-installer.org/en/latest/installing.html"
|
||||
>http://www.pip-installer.org/en/latest/installing.html</link>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></para>
|
||||
<para>For Unix distributions, you may also need to install the
|
||||
python and sqlite3 development packages. The following
|
||||
example shows how to install Python and Sqlite3 from Red
|
||||
Hat distributions, such as CentOS:</para><para>
|
||||
<programlisting>sudo yum install python-devel
|
||||
sudo yum install sqlite-devel </programlisting></para><para>The following example shows how to install Python and Sqlite3
|
||||
from Debian distributions, such as Ubuntu:</para>
|
||||
<programlisting>sudo apt-get install python-dev
|
||||
sudo apt-get install libsqlite3-dev</programlisting>
|
||||
<para>To use Barbican for development and evaluation purposes,
|
||||
it is recommended that you run Barbican from a virtual
|
||||
environment. We recommend that you use <emphasis
|
||||
role="italic">pyenv </emphasis>virtual environment
|
||||
framework because this framework works best with our
|
||||
install script.</para>
|
||||
<para>To install the <emphasis role="italic">pyenv</emphasis>
|
||||
virtual environment framework, complete the following
|
||||
steps:</para>
|
||||
<para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Install the <emphasis role="italic"
|
||||
>pyenv</emphasis> tool by following the
|
||||
installation instructions on GitHub that are
|
||||
available from this link: <link
|
||||
xlink:href="https://github.com/yyuu/pyenv"
|
||||
>https://github.com/yyuu/pyenv</link>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Install the pyenv-virtualenv plugin by
|
||||
following the installation instructions on
|
||||
Github that are available from this link:
|
||||
<link xlink:href="https://github.com/yyuu/pyenv-virtualenv">https://github.com/yyuu/pyenv-virtualenv</link>.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>At a command-line interface run the
|
||||
following command to install the latest
|
||||
version of Python:</para> <para>
|
||||
|
||||
<programlisting>
|
||||
pyenv install 2.7.5
|
||||
</programlisting></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Type the following command to create the
|
||||
Barbican virtual environment:</para> <para>
|
||||
|
||||
<programlisting>
|
||||
pyenv virtualenv 2.7.5 barbican27
|
||||
</programlisting></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>To start the Barbican virtual environment,
|
||||
type the following command:</para> <para>
|
||||
|
||||
<programlisting>
|
||||
pyenv shell barbican27
|
||||
</programlisting></para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</chapter>
|
||||
<chapter xml:id="Install_Barbican">
|
||||
<title>Install Barbican</title>
|
||||
<para>The Barbican source code is stored on Github. In order
|
||||
to download the latest Barbican source code, you need to
|
||||
make sure that you have Git installed on you
|
||||
workstation.</para>
|
||||
<para>To install Barbican, you need to complete the following
|
||||
steps:</para>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Download the Barbican GitHub
|
||||
repository</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Install the Barbican application
|
||||
server</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Verify Barbican installation</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<section xml:id="Download_Barbican_Github_repository"><title>Download Barbican GitHub Repository</title><para>To download the Barbican GitHub repository, complete the
|
||||
following steps:</para>
|
||||
<para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>On your workstation, change to the
|
||||
directory to which you want to download
|
||||
Barbican.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Run the following command to create the
|
||||
Barbican repository:</para>
|
||||
<para>
|
||||
<programlisting>git clone https://github.com/stackforge/barbican.git </programlisting></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Run the following command to change the
|
||||
root of your local Barbican
|
||||
repository:</para>
|
||||
<para>
|
||||
<programlisting>cd barbican </programlisting></para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para></section>
|
||||
<section xml:id="Install_Barbican_Application_server"><title>Install Barbican Application Server</title><para>To install the Barbican application server, type the following
|
||||
at a command-line interface:</para> <para>
|
||||
<programlisting>bin/barbican.sh install</programlisting></para></section>
|
||||
<section xml:id="Verify_Barbican_Install">
|
||||
<title>Verify Barbican
|
||||
Installation</title>
|
||||
<para>You can verify that you have successfully installed
|
||||
Barbican by doing the following:</para>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>At a command-line interface, type the
|
||||
following:</para>
|
||||
<para>
|
||||
|
||||
<programlisting>curl localhost:9311 </programlisting></para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>If Barbican has installed successfully,
|
||||
you should see a response that looks like
|
||||
the following example:</para>
|
||||
<para>
|
||||
|
||||
<programlisting>{"v1": "current", "build": "2013.2.{build_id}"} </programlisting></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="Integration_Environment">
|
||||
<title>Integration Environment</title>
|
||||
<para>We have set up an <emphasis role="bold"
|
||||
>insecure</emphasis> integration environment at <link
|
||||
xlink:href="http://iad-int-api.cloudkeep.io:9311"
|
||||
>http://iad-int-api.cloudkeep.io:9311</link> so that
|
||||
you can try the Barbican API without having to install and
|
||||
configure it first. </para>
|
||||
<para>
|
||||
<warning>
|
||||
<para>This endpoint is provided for evaluation
|
||||
purposes only, with no attempt made to secure or
|
||||
persist data stored therein. Therefore, please do
|
||||
not store any data that is sensitive, critical or
|
||||
that you otherwise care about.</para>
|
||||
</warning>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<para> Authentication is currently turnd off or the
|
||||
integration environment. </para>
|
||||
</note>
|
||||
</para>
|
||||
<section xml:id="Obtaining_Barbican_Version_Resource"><title>Obtaining a Barbican Version Resource</title>
|
||||
<para>First, you need to generate a valid token on
|
||||
keystone. The integration environment provides a
|
||||
Keystone server at http://keystone-int.cloudkeep.io as
|
||||
shown in the following example:</para>
|
||||
<para> <programlisting language="json"><xi:include href="../wadl/samples/reqGenerateToken.json" parse="text"/></programlisting></para>
|
||||
<para>If successful, this request will return the following response,
|
||||
which contains the token information:</para>
|
||||
<programlisting language="json"><xi:include href="./samples/resgenerateToken.json" parse="text"/></programlisting>
|
||||
<para>From the response you need to record the following
|
||||
two values:</para>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><emphasis role="italic">Token
|
||||
id</emphasis>, which is
|
||||
39a8b7f62dcb4095a74a4e65a68c85d8 in the
|
||||
example above.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><emphasis role="italic">Tenant
|
||||
id</emphasis>, which is
|
||||
0239200f037f4520aadd9791fad19af8 in the
|
||||
example above.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<para>For PKI-authenticated Keystone
|
||||
configurations, the token id value will be
|
||||
much larger.</para>
|
||||
</note>
|
||||
</para>
|
||||
<para>After you have obtained the token, you can use it to
|
||||
make a requests to the Barbican API using the
|
||||
integration environment. The following example shows
|
||||
how to make a request for version information from
|
||||
Barbican:</para>
|
||||
<para> <programlisting language="json"><xi:include href="./samples/reqgetversioninfo.json" parse="text"/></programlisting></para>
|
||||
<para>If successful, the above command will return version
|
||||
information for Barbican as shown in the following
|
||||
example:</para>
|
||||
<para> <programlisting language="json"><xi:include href="./samples/resgetversioninfo.json" parse="text"/></programlisting></para>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="Use_Barbican_API">
|
||||
<title>Using the Barbican API</title>
|
||||
<para>In this chapter you will learn how to use the Barbican
|
||||
API to create and retrieve secrets.</para>
|
||||
<para>The first step in using the Barbican API is to create a
|
||||
secret. In this section you will learn how to create your
|
||||
first secret using the Barbican API. </para>
|
||||
<section xml:id="Create_a_Secret">
|
||||
<title>Create a Secret</title>
|
||||
<para>To generate a secret, you need to use the orders
|
||||
resource, which is described in more detail in the
|
||||
Barbican Developer Guide. You use the orders resource
|
||||
to generate an order, which will then generate a
|
||||
secret.</para>
|
||||
<para>To generate an order, complete the following
|
||||
steps:</para>
|
||||
<para>
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Upload a plain-text order by submitting
|
||||
a POST request as shown in the following
|
||||
example:</para>
|
||||
<para>
|
||||
<programlisting language="json"><xi:include href="./samples/reqCreateOrder.json" parse="text"/></programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>You will receive a response like the
|
||||
following. Make sure to note the order-ref
|
||||
id that is returned in the URL. You will
|
||||
use this id for the next request.</para>
|
||||
<para>
|
||||
<programlisting> {"order_ref":
|
||||
"http://localhost:9311/v1/12345/orders/62d57f53-ecfe-4ae4-87bd-fab2f24e29bc"} </programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Retrieve the order by typing the
|
||||
following at a command-line
|
||||
interface:</para>
|
||||
<para>
|
||||
<programlisting>curl -H 'Accept: text/plain' <'order_ref' obtained from the previous call></programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>The call will return a response like the
|
||||
following, Make sure to note the
|
||||
secret-ref id that is returned in the
|
||||
URL.</para>
|
||||
<para>
|
||||
<programlisting language="json"><xi:include href="./samples/resCreateSecret.json" parse="text"/></programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Retrieve the metadata for the generated
|
||||
secret by typing the following at a
|
||||
command-line interface:</para>
|
||||
<para>
|
||||
<programlisting>curl -H 'Accept: text/plain' <secret_ref id from the previous call></programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>This call will return a response like
|
||||
the following:</para>
|
||||
<para>
|
||||
<programlisting language="json"><xi:include href="./samples/resRetrieveSecret.json" parse="text"/></programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
<section xml:id="Retrieve_a_Secret">
|
||||
<title>Retrieve a Secret</title>
|
||||
<para>After you have generated a secret, you need to
|
||||
verify that you can retrieve and view the
|
||||
secret.</para>
|
||||
<para>To view the secret in the format of random bytes,
|
||||
type the following at a command line-interface:</para>
|
||||
<para>
|
||||
<programlisting>curl -H 'Accept: application/octet-stream' <secret_ref id from the previous call></programlisting>
|
||||
</para>
|
||||
<para>You will receive an intelligible response like the
|
||||
following:
|
||||
<programlisting><EFBFBD>l6[F<><46><EFBFBD>#<23><>r<EFBFBD>|gd<67>fe~<7E><><EFBFBD></programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="Barbican_Next_Steps">
|
||||
<title>Next Steps</title>
|
||||
<para>To learn more details about the Barbican API, please
|
||||
read the Barbican API Developer Guide.</para>
|
||||
</chapter>
|
||||
</book>
|
60
docs/src/docbkx/ck-install.xml
Normal file
60
docs/src/docbkx/ck-install.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<book
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="ck-install">
|
||||
<?rax canonical.url.base="http://docs.rackspace.com/keep/api/v1.0/ck-gettingstarted/content"?>
|
||||
<title>Cloud Keep Installation</title>
|
||||
<info>
|
||||
<author>
|
||||
<personname>
|
||||
<firstname/>
|
||||
<surname/>
|
||||
</personname>
|
||||
<affiliation>
|
||||
<orgname>Rackspace Cloud</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Rackspace US, Inc.</holder>
|
||||
</copyright>
|
||||
<releaseinfo>API v1.0</releaseinfo>
|
||||
<productname>Cloud Keep</productname>
|
||||
<pubdate/>
|
||||
<legalnotice role="rs-api">
|
||||
<annotation>
|
||||
<remark>Copyright details are filled in by the
|
||||
template.</remark>
|
||||
</annotation>
|
||||
</legalnotice>
|
||||
<abstract>
|
||||
<para>This document is intended for software developers
|
||||
who want to develop applications by using... </para>
|
||||
</abstract>
|
||||
<revhistory>
|
||||
<revision>
|
||||
<date>2013-06-17</date>
|
||||
<revdescription>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Ipsum Lorem...</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</revdescription>
|
||||
</revision>
|
||||
</revhistory>
|
||||
<raxm:metadata
|
||||
xmlns:raxm="http://docs.rackspace.com/api/metadata">
|
||||
<raxm:displayname>Installation Guide</raxm:displayname>
|
||||
<raxm:product version="v1.0">keep</raxm:product>
|
||||
<raxm:priority>10</raxm:priority>
|
||||
</raxm:metadata>
|
||||
</info>
|
||||
<chapter xml:id="overview">
|
||||
<title>Introduction</title>
|
||||
<para>Ipsum lorem</para>
|
||||
</chapter>
|
||||
</book>
|
67
docs/src/docbkx/ck-releasenotes.xml
Normal file
67
docs/src/docbkx/ck-releasenotes.xml
Normal file
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<book
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="ck-releasenotes">
|
||||
<?rax canonical.url.base="http://docs.rackspace.com/keep/api/v1.0/ck-releasenotes/content"?>
|
||||
<title>Cloud Keep Release Notes</title>
|
||||
<info>
|
||||
<author>
|
||||
<personname>
|
||||
<firstname/>
|
||||
<surname/>
|
||||
</personname>
|
||||
<affiliation>
|
||||
<orgname>Rackspace Cloud</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Rackspace US, Inc.</holder>
|
||||
</copyright>
|
||||
<releaseinfo>API v1.0</releaseinfo>
|
||||
<productname>Cloud Keep</productname>
|
||||
<pubdate></pubdate>
|
||||
<legalnotice role="rs-api">
|
||||
<annotation>
|
||||
<remark>Copyright details are filled in by the
|
||||
template.</remark>
|
||||
</annotation>
|
||||
</legalnotice>
|
||||
<abstract>
|
||||
<para>This document is intended for software developers who want
|
||||
to develop applications by using...</para>
|
||||
</abstract>
|
||||
<revhistory>
|
||||
<revision>
|
||||
<date>2013-06-17</date>
|
||||
<revdescription>
|
||||
<itemizedlist>
|
||||
<listitem xmlns:db="http://docbook.org/ns/docbook">
|
||||
<para>Ipsum lorem.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</revdescription>
|
||||
</revision>
|
||||
</revhistory>
|
||||
<raxm:metadata xmlns:raxm="http://docs.rackspace.com/api/metadata">
|
||||
<raxm:displayname>Release Notes</raxm:displayname>
|
||||
<raxm:product version="v1.0">keep</raxm:product>
|
||||
<raxm:priority>30</raxm:priority>
|
||||
</raxm:metadata>
|
||||
</info>
|
||||
<preface xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||
xml:id="preface">
|
||||
<title>Preface</title>
|
||||
<para>Ipsum lorem</para>
|
||||
<para>This document describes new features, changes, known issues,
|
||||
supported images, and a summary of differences between first
|
||||
generation and next generation Cloud Servers APIs. </para>
|
||||
<para>We welcome feedback, comments, and bug reports at <link
|
||||
xlink:href="mailto:support@rackspacecloud.com"
|
||||
>support@rackspacecloud.com</link>. </para>
|
||||
</preface>
|
||||
</book>
|
BIN
docs/src/docbkx/images/Barbican_architecture.png
Normal file
BIN
docs/src/docbkx/images/Barbican_architecture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
17
docs/src/docbkx/samples/reqAuthenticate.json
Normal file
17
docs/src/docbkx/samples/reqAuthenticate.json
Normal file
@ -0,0 +1,17 @@
|
||||
POST /v2.0/tokens HTTP/1.1
|
||||
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
|
||||
Host: identity.api.rackspacecloud.com
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Content-Length: 54
|
||||
|
||||
{
|
||||
"auth":
|
||||
{
|
||||
"RAX-KSKEY:apiKeyCredentials":
|
||||
{
|
||||
"username": "jsmith",
|
||||
"apiKey": "aaaaabbbbbccccc12345678"
|
||||
}
|
||||
}
|
||||
}
|
12
docs/src/docbkx/samples/reqCreateOrder.json
Normal file
12
docs/src/docbkx/samples/reqCreateOrder.json
Normal file
@ -0,0 +1,12 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"secret":
|
||||
{
|
||||
"name": "secretname",
|
||||
"algorithm": "aes",
|
||||
"bit_length": 256,
|
||||
"mode": "cbc",
|
||||
"payload_content_type": "application/octet-stream"
|
||||
}
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/orders
|
6
docs/src/docbkx/samples/reqCreateSecret.json
Normal file
6
docs/src/docbkx/samples/reqCreateSecret.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
16
docs/src/docbkx/samples/reqgenerateToken.json
Normal file
16
docs/src/docbkx/samples/reqgenerateToken.json
Normal file
@ -0,0 +1,16 @@
|
||||
# get a token
|
||||
$ curl -H "Accept: applicaton/json" -H "Content-Type: application/json"\
|
||||
--data
|
||||
'{
|
||||
"auth":
|
||||
{
|
||||
"tenantName":"demo",
|
||||
"passwordCredentials":
|
||||
{
|
||||
"username":"admin",
|
||||
"password":"password"
|
||||
}
|
||||
}
|
||||
}'\
|
||||
http://keystone-int.cloudkeep.io:5000/v2.0/tokens
|
||||
|
2
docs/src/docbkx/samples/reqgetversioninfo.json
Normal file
2
docs/src/docbkx/samples/reqgetversioninfo.json
Normal file
@ -0,0 +1,2 @@
|
||||
$ curl -H "Accept: application/json" -H "X-Auth-Token: 39a8b7f62dcb4095a74a4e65a68c85d8" \
|
||||
http://iad-int-api.cloudkeep.io:9311
|
147
docs/src/docbkx/samples/resAuthenticate.json
Normal file
147
docs/src/docbkx/samples/resAuthenticate.json
Normal file
@ -0,0 +1,147 @@
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Length: 477
|
||||
Date: Thu, 8 Aug 2013 18:45:13 GMT
|
||||
|
||||
{
|
||||
"access": {
|
||||
|
||||
"token": {
|
||||
"expires": "2013-08-09T22:51:02.000-06:00",
|
||||
"id": "vvvvvvvv-wwww-xxxx-yyyy-zzzzzzzzzzzz"
|
||||
},
|
||||
"user": {
|
||||
"id": "123456",
|
||||
"name": "jsmith",
|
||||
"RAX-AUTH:defaultRegion": "DFW",
|
||||
"roles": [
|
||||
{
|
||||
"description": "Admin Role.",
|
||||
"id": "identity:admin",
|
||||
"name": "identity:admin"
|
||||
},
|
||||
{
|
||||
"description": "Default Role.",
|
||||
"id": "identity:default",
|
||||
"name": "identity:default"
|
||||
}
|
||||
]
|
||||
},
|
||||
"serviceCatalog": [
|
||||
{
|
||||
"endpoints": [
|
||||
{
|
||||
"publicURL": "https://dfw.databases.api.rackspacecloud.com/v1.0/1100111",
|
||||
"region": "DFW",
|
||||
"tenantId": "1100111"
|
||||
},
|
||||
{
|
||||
"publicURL": "https://ord.databases.api.rackspacecloud.com/v1.0/1100111",
|
||||
"region": "ORD",
|
||||
"tenantId": "1100111"
|
||||
}
|
||||
],
|
||||
"name": "cloudDatabases",
|
||||
"type": "rax:database"
|
||||
},
|
||||
{
|
||||
"endpoints": [
|
||||
{
|
||||
"publicURL": "https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/1100111",
|
||||
"region": "DFW",
|
||||
"tenantId": "1100111"
|
||||
},
|
||||
{
|
||||
"publicURL": "https://ord.loadbalancers.api.rackspacecloud.com/v1.0/1100111",
|
||||
"region": "ORD",
|
||||
"tenantId": "1100111"
|
||||
}
|
||||
],
|
||||
"name": "cloudLoadBalancers",
|
||||
"type": "rax:load-balancer"
|
||||
},
|
||||
{
|
||||
"endpoints": [
|
||||
{
|
||||
"tenantId": "1100111",
|
||||
"region": "DFW",
|
||||
"publicURL": "https://dfw.servers.api.rackspacecloud.com/v2/1100111",
|
||||
"versionId": "2",
|
||||
"versionInfo": "https://dfw.servers.api.rackspacecloud.com/v2/",
|
||||
"versionList": "https://dfw.servers.api.rackspacecloud.com/"
|
||||
},
|
||||
{
|
||||
"tenantId": "1100111",
|
||||
"region": "ORD",
|
||||
"publicURL": "https://ord.servers.api.rackspacecloud.com/v2/1100111",
|
||||
"versionId": "2",
|
||||
"versionInfo": "https://ord.servers.api.rackspacecloud.com/v2/",
|
||||
"versionList": "https://ord.servers.api.rackspacecloud.com/"
|
||||
}
|
||||
],
|
||||
"name": "cloudServersOpenStack",
|
||||
"type": "compute"
|
||||
},
|
||||
{
|
||||
"endpoints": [
|
||||
{
|
||||
"publicURL": "https://monitoring.api.rackspacecloud.com/v1.0/1100111",
|
||||
"tenantId": "1100111"
|
||||
}
|
||||
],
|
||||
"name": "cloudMonitoring",
|
||||
"type": "rax:monitor"
|
||||
},
|
||||
{
|
||||
"endpoints": [
|
||||
{
|
||||
"publicURL": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/1100111",
|
||||
"region": "DFW",
|
||||
"tenantId": "1100111",
|
||||
"versionId": "1.0",
|
||||
"versionInfo": null,
|
||||
"versionList": null
|
||||
},
|
||||
{
|
||||
"publicURL": "https://ord.autoscale.api.rackspacecloud.com/v1.0/1100111",
|
||||
"region": "ORD",
|
||||
"tenantId": "1100111",
|
||||
"versionId": "1.0",
|
||||
"versionInfo": null,
|
||||
"versionList": null
|
||||
}
|
||||
],
|
||||
"name": "autoscale",
|
||||
"type": "rax:autoscale"
|
||||
},
|
||||
{
|
||||
"endpoints": [
|
||||
{
|
||||
"tenantId": "MossoCloudFS_aaaaaaaa-bbbb-cccc-dddd-eeeeeeee",
|
||||
"publicURL": "https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_aaaaaaaa-bbbb-cccc-dddd-eeeeeeee",
|
||||
"internalURL": "https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_aaaaaaaa-bbbb-cccc-dddd-eeeeeeee",
|
||||
"region": "DFW"
|
||||
},
|
||||
{
|
||||
"tenantId": "MossoCloudFS_aaaaaaaa-bbbb-cccc-dddd-eeeeeeee",
|
||||
"publicURL": "https://storage101.ord1.clouddrive.com/v1/MossoCloudFS_aaaaaaaa-bbbb-cccc-dddd-eeeeeeee",
|
||||
"internalURL": "https://snet-storage101.ord1.clouddrive.com/v1/MossoCloudFS_aaaaaaaa-bbbb-cccc-dddd-eeeeeeee",
|
||||
"region": "ORD"
|
||||
}
|
||||
],
|
||||
"name": "cloudFiles",
|
||||
"type": "object-store"
|
||||
},
|
||||
{
|
||||
"endpoints": [
|
||||
{
|
||||
"tenantId": "1100111",
|
||||
"publicURL": "https://dns.api.rackspacecloud.com/v1.0/1100111"
|
||||
}
|
||||
],
|
||||
"name": "cloudDNS",
|
||||
"type": "rax:dns"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
13
docs/src/docbkx/samples/resCreateSecret.json
Normal file
13
docs/src/docbkx/samples/resCreateSecret.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"secret_ref": "http://localhost:9311/v1/12345/secrets/2df8d196-76b6-4f89-a6d2-c9e764900791",
|
||||
"updated": "2013-11-04T16:39:13.608659",
|
||||
"created": "2013-11-04T16:39:13.574489",
|
||||
"secret": {"name": "secretname",
|
||||
"algorithm": "aes",
|
||||
"payload_content_type": "application/octet-stream",
|
||||
"expiration": null,
|
||||
"bit_length": 256,
|
||||
"mode": "cbc"
|
||||
},
|
||||
"order_ref": "http://localhost:9311/v1/12345/orders/62d57f53-ecfe-4ae4-87bd-fab2f24e29bc"}
|
12
docs/src/docbkx/samples/resRetrieveSecret.json
Normal file
12
docs/src/docbkx/samples/resRetrieveSecret.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"secret_ref": "http://localhost:9311/v1/12345/secrets/2df8d196-76b6-4f89-a6d2-c9e764900791",
|
||||
"updated": "2013-11-04T16:39:13.593962",
|
||||
"name": "secretname",
|
||||
"algorithm": "aes",
|
||||
"created": "2013-11-04T16:39:13.593956",
|
||||
"content_types": {"default": "application/octet-stream"},
|
||||
"mode": "cbc",
|
||||
"bit_length": 256,
|
||||
"expiration": null
|
||||
}
|
45
docs/src/docbkx/samples/resgenerateToken.json
Normal file
45
docs/src/docbkx/samples/resgenerateToken.json
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"access": {
|
||||
"token": {
|
||||
"expires": "2013-06-01T18:41:56Z",
|
||||
"id": "39a8b7f62dcb4095a74a4e65a68c85d8",
|
||||
"tenant": {
|
||||
"description": null,
|
||||
"enabled": true,
|
||||
"id": "f378ae2a0b9142e6a482f437ef444dd7",
|
||||
"name": "demo"
|
||||
}
|
||||
},
|
||||
"serviceCatalog": [{
|
||||
"endpoints": [{
|
||||
"adminURL": "http://localhost:9312",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "http://localhost:9313",
|
||||
"publicURL": "http://localhost:9311"
|
||||
}],
|
||||
"endpoints_links": [],
|
||||
"type": "key-store",
|
||||
"name": "barbican"
|
||||
}, {
|
||||
"endpoints": [{
|
||||
"adminURL": "http://localhost:35357/v2.0",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "http://localhost:5000/v2.0",
|
||||
"publicURL": "http://localhost:5000/v2.0"
|
||||
}],
|
||||
"endpoints_links": [],
|
||||
"type": "identity",
|
||||
"name": "keystone"
|
||||
}],
|
||||
"user": {
|
||||
"username": "demo",
|
||||
"roles_links": [],
|
||||
"id": "0239200f037f4520aadd9791fad19af8",
|
||||
"roles": [{
|
||||
"id": "1dc8065a23f54c0abab098c94fe2f3c8",
|
||||
"name": "Member"
|
||||
}],
|
||||
"name": "demo"
|
||||
}
|
||||
}
|
||||
}
|
4
docs/src/docbkx/samples/resgetversioninfo.json
Normal file
4
docs/src/docbkx/samples/resgetversioninfo.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"v1": "current",
|
||||
"build": "2013.2.20130913025647"
|
||||
}
|
545
docs/src/wadl/Barbican.wadl
Normal file
545
docs/src/wadl/Barbican.wadl
Normal file
@ -0,0 +1,545 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- (C) 2012 OpenStack LLC., All Rights Reserved -->
|
||||
|
||||
<!DOCTYPE application [
|
||||
<!ENTITY % common SYSTEM "../common/common.ent">
|
||||
%common;
|
||||
|
||||
|
||||
]>
|
||||
|
||||
|
||||
<application xmlns="http://wadl.dev.java.net/2009/02"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
|
||||
xmlns:raxapi="http://docs.rackspace.com/volume/api/v1"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:dbaas="http://docs.openstack.org/database/api/v1.0"
|
||||
xmlns:db="http://docbook.org/ns/docbook">
|
||||
|
||||
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- All Resources -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<resources base="https://ord.secrets.api.rackspacecloud.com/">
|
||||
|
||||
|
||||
<resource id="version" path="{version}">
|
||||
|
||||
<resource id="tenantid" path="/{tenantId}">
|
||||
|
||||
<param name="tenantId" type="xsd:string" required="true" style="template">
|
||||
<doc>A subscriber to the Barbican service</doc>
|
||||
</param>
|
||||
|
||||
|
||||
<!-- SECRETS resource -->
|
||||
|
||||
<?rax start-sections?>
|
||||
<resource id="secrets" path="/secrets">
|
||||
|
||||
<doc title="Secrets"/>
|
||||
|
||||
<method href="#getSecrets"/>
|
||||
<method href="#createSecret" />
|
||||
|
||||
<resource id="secret" path="{secret_id}">
|
||||
<param name="secret_id" style="template" type="xsd:string">
|
||||
<doc>A secret</doc></param>
|
||||
<method href="#getSecretinfo"/>
|
||||
<method href="#deleteSecret"/>
|
||||
<method href="#updateSecret" />
|
||||
</resource>
|
||||
</resource>
|
||||
<!-- ORDERS resource -->
|
||||
|
||||
|
||||
<resource id="orders" path="/orders">
|
||||
|
||||
<doc title="Orders"/>
|
||||
|
||||
<method href="#getOrders"/>
|
||||
<method href="#createOrder" />
|
||||
|
||||
<resource id="order" path="{order_id}">
|
||||
<param name="orderid" style="template" type="xsd:string">
|
||||
<doc>An order</doc></param>
|
||||
<method href="#getOrderInfo"/>
|
||||
<method href="#deleteOrder"/>
|
||||
<method href="#updateOrder" db:security="writeronly"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Secrets Methods -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Get Secrets: getSecrets -->
|
||||
<!--*******************************************************-->
|
||||
<method name="GET" id="getSecrets">
|
||||
<wadl:doc xml:lang="EN" title="Get Secrets" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method retrieves all secrets.</para>
|
||||
<para>This method lists all the secrets for a tenant. Calling this method does not provide information for an indiviual secret.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json">
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqGetSecrets.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<doc title="Error">This status code is returned when the secrets have been successfully retrieved for the tenant. </doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resgetSecrets.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Create Secret: createSecret -->
|
||||
<!--*******************************************************-->
|
||||
<method name="PUT" id="createSecret">
|
||||
<wadl:doc xml:lang="EN" title="Create Secret" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method creates a secret.</para>
|
||||
<para>This method creates a new secret.</para>
|
||||
<para>Note: Making a POST request creates metadata for a secret. If the payload is provided with the POST request, it is encrypted and stored, and then linked with this metadata. If no payload is provided in the POST request, you need to make a subsequent PUT request and provide the payload. Clients must provide the secret information either via the PUT or POST request. Please note that this process differs from creating a secret by using the orders resource, whereby Barbican generates the actual secret information.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<param name="name" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the human readable name for the secret.
|
||||
This parameter is optional. If no name is
|
||||
supplied, the UUID will be displayed for this
|
||||
parameter on subsequent GET calls. </wadl:doc>
|
||||
</param>
|
||||
<param name="expiration" style="query" type="xsd:integer" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the expiration date for the secret in
|
||||
ISO-8601 format. ISO-8601 formats dates by using
|
||||
the following representation:
|
||||
yyyy-mm-ddThh:mm:ss[.mmm]. For example, September
|
||||
27, 2012 is represented as 2012-09-27. Once the
|
||||
secret has expired, it will no longer be returned
|
||||
by the API or agent. This parameter is optinal. If
|
||||
this parameter is not supplied, the secret has no
|
||||
expiration date. </wadl:doc>
|
||||
</param>
|
||||
<param name="algorithm" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the algorithm type used to generate the secret. This parameter is optional.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="bit_length" style="query" type="xsd:integer" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the bit length of the secret. Must be a positive integer. This parameter is optional.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="mode" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the type/mode of the algorithm associated with the secret information. This parameter is optional.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="payload" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the secret's unencrypted plain text. If
|
||||
provided, this parameter's value must be
|
||||
non-empty, and you must also provide the
|
||||
payload_content_type. This field can be omitted
|
||||
allowing for the secret information to be provided
|
||||
via a subsequent PUT request. If the payload is
|
||||
not provided, only the secret metadata will be
|
||||
retrievable from Barbican and any attempt to
|
||||
retrieve decrypted data for that secret will fail.
|
||||
Defering the secret information to a PUT request
|
||||
is useful for secrets that are in binary format
|
||||
and are not suitable for base64 encoding. </wadl:doc>
|
||||
</param>
|
||||
<param name="payload_content_type" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>Specifies the type/format the secret data is provided in. This parameter is required if the payload parameter is specified.
|
||||
The following values are supported:</para>
|
||||
<para>- "text/plain" - This value is used to store plain text secrets.</para>
|
||||
<para>Other options are "text/plain; charset=utf-8".
|
||||
If the charset value is omitted, utf-8 will be assumed. Note
|
||||
that Barbican normalizes some formats before storing them
|
||||
as secret metadata, for example
|
||||
"text/plain; charset=utf-8" is converted to "text/plain." Retrieved metadata may not exactly match what was originally
|
||||
specified in the POST or PUT request.
|
||||
When the payload_content_type parameter is set to "text/plain" you cannot specify a value for the payload_content_encoding parameter..</para>
|
||||
<para>- "application/octet-stream" - This value is used to store binary
|
||||
secrets from a base64 encoded payload. If this
|
||||
value is used, you must also include the payload_content_encoding parameter.</para> </wadl:doc>
|
||||
</param>
|
||||
<param name="payload_content_encoding" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the encoding format used to provide the
|
||||
payload data. Barbican might translate and store
|
||||
the secret data into another format. This
|
||||
parameter is required if the payload_content_type
|
||||
parameter is set to "application/octet-stream."
|
||||
The only possible value for this parameter is
|
||||
"base64," which specifies base64 encoded payloads. </wadl:doc>
|
||||
</param>
|
||||
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqCreateSecret.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="201">
|
||||
<doc title="Success">This status code is returned when the secret has been successfully created.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resCreateSecret.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
<response status="400">
|
||||
<doc title="Error">This error code is returned if the secret has invalid data. This response may include schema violations
|
||||
such as mime-type not specified. </doc>
|
||||
</response>
|
||||
<response status="400">
|
||||
<doc title="Error">This error code is returned if the "payload" parameter is empty. This response indicates that the 'payload' JSON attribute was provided, but no value was assigned to it.</doc>
|
||||
</response>
|
||||
<response status="400">
|
||||
<doc title="Error">This error code is returned if the value specified in the "payload_content_type" parameter is not supported. It is caused when no crypto plugin supports the payload_content_type requested </doc>
|
||||
</response>
|
||||
<response status="413">
|
||||
<doc title="Error">This error code is returned when the secret specified in the "payload" parameter is too large. </doc>
|
||||
</response>
|
||||
</method>
|
||||
<!--*******************************************************-->
|
||||
<!-- Get Secret Information: getSecretinfo -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<method name="GET" id="getSecretinfo">
|
||||
<wadl:doc xml:lang="EN" title="Get Secret Information" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method retrieves secret information.</para>
|
||||
<para>This method retrieves the information for the specified secret. For the application/json accept type, only metadata about the secret is returned. If one of the 'content_types' accept types is specified instead, that portion of the secret will be decrypted and returned. </para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqGetSecretinfo.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<doc title="Success">This status code is returned when the secret has been successfully retrieved.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resgetSecretinfo.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
<response status="404">
|
||||
<doc title="Error">This error code is returned when the supplied UUID doesn't match the secret in the datastore.</doc>
|
||||
</response>
|
||||
<response status="404">
|
||||
<doc title="Error">This error code is returned when the secret metadata has been created, but the encrypted data for it has not yet been supplied, hence cannot be retrieved via a non 'application/json' mime type</doc>
|
||||
</response>
|
||||
<response status="406">
|
||||
<doc title="Error">This error code is returned when the secret data cannot be retrieved in the requested Accept header mime-type</doc>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Update Secret: updateSecret -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<method name="PUT" id="updateSecret">
|
||||
<wadl:doc xml:lang="EN" title="Update Secret" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method updates a specified secret.</para>
|
||||
<para>This method updates a secret. To provide secret information after the secret is created, submit a PUT request to the secret URI. Note that a PUT request can only be performed once after a POST call that does not include a payload. Also note that no other attributes of a secret can be modified via PUT after it is POST-ed.
|
||||
The PUT request should include the payload, as well as the appropriate Content-Type and Content-Encoding definitions.</para>
|
||||
<para> GET - Decrypted Secret Data
|
||||
|
||||
To retrieve the decrypted secret information, perform a GET with the Accept header set to one of the content_types specified in the GET metadata call. Note that even if a binary secret is provided in the base64 format, it is converted to binary by Barbican prior to encryption and storage. Thereafter the secret will only be decrypted and returned as raw binary. </para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<param name="payload" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the name of the last queue received in a previous request, or none to get the first page of results.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="payload_content_type" style="query" type="xsd:integer" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the number of queues to return. The default value for the number of queues returned is 10. If you do not specify this parameter, the default number of queues is returned.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="payload_content_encoding" style="query" type="xsd:boolean" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Determines whether queue metadata is included in the response. The default value for this parameter is <code>false</code>, which excludes the metadata.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqUpdateSecret.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<doc title="Success">This status code is returned when the secret has been successfully updated.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resUpdateSecret.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
<response status="404">
|
||||
<doc title="Error">This error code is returned when the supplied UUID doesn't match the secret in the datastore for the specified tenant..</doc>
|
||||
</response>
|
||||
<response status="400">
|
||||
<doc title="Error">This error code is returned when no crypto plugin supports the payload_content_type requested in the Content-Type</doc>
|
||||
</response>
|
||||
<response status="409">
|
||||
<doc title="Error">This error code is returned when the secret already has encrypted data associated with it</doc>
|
||||
</response>
|
||||
<response status="400">
|
||||
<doc title="Error">This error code is returned when no value was provided for the "payload" parameter.</doc>
|
||||
</response>
|
||||
<response status="413">
|
||||
<doc title="Error">This error code is returned when the secret specified in the "payload" parameter is too large. </doc>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Delete Secret: deleteSecret -->
|
||||
<!--*******************************************************-->
|
||||
<method name="DELETE" id="deleteSecret">
|
||||
<wadl:doc xml:lang="EN" title="Delete Secret" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">Deletes the specified secret. </para>
|
||||
<para>This operation immediately deletes a queue and all of its existing messages. </para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json">
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqDeleteSecret.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="204">
|
||||
<doc title="Success">This status code is returned when the secret has been successfully deleted.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resDeleteSecret.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
<response status="404">
|
||||
<doc title="Error">This error code is returned when the supplied UUID doesn't match the secret in the datastore.</doc>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Orders Methods -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Get Orders: getOrders -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<method name="GET" id="getOrders">
|
||||
<wadl:doc xml:lang="EN" title="Get Orders" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method retrieves all orders.</para>
|
||||
<para>This method lists all orders for a specified tenant. Performing a GET on the secrets resource with no UUID retrieves a batch of the most recent orders per the requesting tenant.
|
||||
The retrieved list of orders is ordered by oldest to newest created date. </para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json">
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqGetOrders.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<doc title="Success">This status code is returned when the orders have been successfully retrieved.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resGetOrders.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Create Order: createOrder -->
|
||||
<!--*******************************************************-->
|
||||
<method name="PUT" id="createOrder">
|
||||
<wadl:doc xml:lang="EN" title="Create Order" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method creates an order.</para>
|
||||
<para>This method creates a new order.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<param name="name" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
This parameter specifies the name of the secret.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="algorithm" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the algorithm type used to generate the secret. This parameter is optional.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="bit_length" style="query" type="xsd:integer" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the bit length of the secret. Must be a positive integer. This parameter is optional.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="mode" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the type/mode of the algorithm associated with the secret information. This parameter is optional.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="payload_content_type" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>Specifies the type/format the secret data is provided in. This parameter is required if the payload parameter is specified.
|
||||
The following values are supported:</para>
|
||||
<para>- "text/plain" - This value is used to store plain text secrets.</para>
|
||||
<para>Other options are "text/plain; charset=utf-8".
|
||||
If the charset value is omitted, utf-8 will be assumed. Note
|
||||
that Barbican normalizes some formats before storing them
|
||||
as secret metadata, for example
|
||||
"text/plain; charset=utf-8" is converted to "text/plain." Retrieved metadata may not exactly match what was originally
|
||||
specified in the POST or PUT request.
|
||||
When the payload_content_type parameter is set to "text/plain" you cannot specify a value for the payload_content_encoding parameter..</para>
|
||||
<para>- "application/octet-stream" - This value is used to store binary
|
||||
secrets from a base64 encoded payload. If this
|
||||
value is used, you must also include the payload_content_encoding parameter.</para> </wadl:doc>
|
||||
</param>
|
||||
<representation mediaType="application/json">
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqCreateOrder.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="201">
|
||||
<doc title="Success">This status code is returned when the order was successfully created.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resCreateOrder.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
<response status="400">
|
||||
<doc title="Error">This error code is returned when the data provided in the POST request is invalid. This can include schema violations such as the secret's mime-type not specified</doc>
|
||||
</response>
|
||||
<response status="400">
|
||||
<doc title="Error">This error code is returned when the value provided in the "payload_content_type" parameter is invalid. This is caused when thre is no crypto plugin available that supports the payload_content_type requested</doc>
|
||||
</response>
|
||||
|
||||
</method>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Get Order Information: getOrderinfo -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<method name="GET" id="getOrderInfo">
|
||||
<wadl:doc xml:lang="EN" title="Get Order Information" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method retrieves information about a specified order.</para>
|
||||
<para>This method retrieves information for the specified order including g a link to the secret that was generated as a result of the order (if available).</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqGetOrderinfo.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<doc title="Success">This status code is returned when the order info was successfully retrieved.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resGetOrderinfo.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
<response status="404">
|
||||
<doc title="Error">This error code is returned when the supplied UUID doesn't match a order in the data store, which means the order doesn't exist. </doc>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Update Order: updateOrder -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<method name="PUT" id="updateOrder" db:security="writeronly">
|
||||
<wadl:doc xml:lang="EN" title="Update Order" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method updates an order.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<param name="marker" style="query" type="xsd:string" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the name of the last queue received in a previous request, or none to get the first page of results.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="limit" style="query" type="xsd:integer" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Specifies the number of queues to return. The default value for the number of queues returned is 10. If you do not specify this parameter, the default number of queues is returned.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="detailed" style="query" type="xsd:boolean" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
Determines whether queue metadata is included in the response. The default value for this parameter is <code>false</code>, which excludes the metadata.
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<representation mediaType="application/json">
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqUpdateOrder.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resUpdateOrder.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- Delete Order: deleteOrder -->
|
||||
<!--*******************************************************-->
|
||||
<method name="DELETE" id="deleteOrder">
|
||||
<wadl:doc xml:lang="EN" title="Delete Order" xmlns="http://docbook.org/ns/docbook">
|
||||
<para role="shortdesc">This method deletes the specified order. </para>
|
||||
<para>This method cancels an exisitng order. </para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/reqDeleteOrder.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="204">
|
||||
<doc title="Success">This status code is returned when the order was successfully cancelled.</doc>
|
||||
<representation mediaType="application/json" >
|
||||
<doc>
|
||||
<xsdxt:code href="../wadl/samples/resDeleteOrder.json"/>
|
||||
</doc>
|
||||
</representation>
|
||||
</response>
|
||||
<response status="404">
|
||||
<doc title="Error">This error code is returned when the supplied UUID doesn't match a order in the data store, which means the order doesn't exist. </doc>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
|
||||
</application>
|
3793
docs/src/wadl/normalized/cq-devguide.wadl
Normal file
3793
docs/src/wadl/normalized/cq-devguide.wadl
Normal file
File diff suppressed because it is too large
Load Diff
72
docs/src/wadl/samples/db-auth.json
Normal file
72
docs/src/wadl/samples/db-auth.json
Normal file
@ -0,0 +1,72 @@
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Content-Length: 477
|
||||
Date: Thu, 12 Apr 2012 18:45:13 GMT
|
||||
|
||||
{
|
||||
"auth": {
|
||||
"serviceCatalog": {
|
||||
"cloudDNS": [
|
||||
{
|
||||
"publicURL": "https://dns.api.rackspacecloud.com/v1.0/1234"
|
||||
}
|
||||
],
|
||||
"cloudDatabases": [
|
||||
{
|
||||
"publicURL": "https://dfw.databases.api.rackspacecloud.com/v1.0/1234",
|
||||
"region": "DFW"
|
||||
},
|
||||
{
|
||||
"publicURL": "https://ord.databases.api.rackspacecloud.com/v1.0/1234",
|
||||
"region": "ORD"
|
||||
}
|
||||
],
|
||||
"cloudFiles": [
|
||||
{
|
||||
"internalURL": "https://snet-storage101.dfw1.clouddrive.com/v1/ MossoCloudFS_aaaa-bbbbb-cccc-ddddd ",
|
||||
"publicURL": "https://storage101.dfw1.clouddrive.com/v1/ MossoCloudFS_aaaa-bbbbb-cccc-ddddd ",
|
||||
"region": "DFW",
|
||||
"v1Default": true
|
||||
}
|
||||
],
|
||||
"cloudFilesCDN": [
|
||||
{
|
||||
"publicURL": "https://cdn1.clouddrive.com/v1/MossoCloudFS_aaaa-bbbbb-cccc-ddddd",
|
||||
"region": "DFW",
|
||||
"v1Default": true
|
||||
}
|
||||
],
|
||||
"cloudLoadBalancers": [
|
||||
{
|
||||
"publicURL": "https://ord.loadbalancers.api.rackspacecloud.com/v1.0/1234",
|
||||
"region": "ORD"
|
||||
},
|
||||
{
|
||||
"publicURL": "https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/1234",
|
||||
"region": "DFW"
|
||||
}
|
||||
],
|
||||
"cloudMonitoring": [
|
||||
{
|
||||
"publicURL": "https://monitoring.api.rackspacecloud.com/v1.0/1234"
|
||||
}
|
||||
],
|
||||
"cloudServers": [
|
||||
{
|
||||
"publicURL": "https://servers.api.rackspacecloud.com/v1.0/1234",
|
||||
"v1Default": true
|
||||
}
|
||||
],
|
||||
"cloudServersOpenStack": [
|
||||
{
|
||||
"publicURL": "https://dfw.servers.api.rackspacecloud.com/v2/1234",
|
||||
"region": "DFW"
|
||||
}
|
||||
]
|
||||
},
|
||||
"token": {
|
||||
"expires": "2012-04-12T13:15:52.000-05:00",
|
||||
"id": "aaaaa-bbbbbb-cccccc-ddddd"
|
||||
}
|
||||
}
|
||||
}
|
50
docs/src/wadl/samples/db-auth.xml
Normal file
50
docs/src/wadl/samples/db-auth.xml
Normal file
@ -0,0 +1,50 @@
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/xml; charset=UTF-8
|
||||
Content-Length: 477
|
||||
Date: Thu, 12 Apr 2012 18:50:20 GMT
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<auth xmlns="http://docs.rackspacecloud.com/auth/api/v1.1">
|
||||
<token id="aaaaa-bbbbbb-cccccc-ddddd"
|
||||
expires="2012-04-12T13:15:52.000-05:00" />
|
||||
<serviceCatalog>
|
||||
<service name="cloudDatabases">
|
||||
<endpoint region="ORD" v1Default="false"
|
||||
publicURL="https://ord.databases.api.rackspacecloud.com/v1.0/1234"/>
|
||||
<endpoint region="DFW" v1Default="false"
|
||||
publicURL="https://dfw.databases.api.rackspacecloud.com/v1.0/1234"/>
|
||||
</service>
|
||||
<service name="cloudDNS">
|
||||
<endpoint v1Default="false" publicURL="https://dns.api.rackspacecloud.com/v1.0/1234"/>
|
||||
</service>
|
||||
<service name="cloudServers">
|
||||
<endpoint v1Default="true"
|
||||
publicURL="https://servers.api.rackspacecloud.com/v1.0/1234"/>
|
||||
</service>
|
||||
<service name="cloudLoadBalancers">
|
||||
<endpoint region="DFW" v1Default="false"
|
||||
publicURL="https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/1234"/>
|
||||
<endpoint region="ORD" v1Default="false"
|
||||
publicURL="https://ord.loadbalancers.api.rackspacecloud.com/v1.0/1234"/>
|
||||
</service>
|
||||
<service name="cloudMonitoring">
|
||||
<endpoint v1Default="false"
|
||||
publicURL="https://monitoring.api.rackspacecloud.com/v1.0/1234"/>
|
||||
</service>
|
||||
<service name="cloudServersOpenStack">
|
||||
<endpoint region="DFW" v1Default="false"
|
||||
publicURL="https://dfw.servers.api.rackspacecloud.com/v2/1234"/>
|
||||
</service>
|
||||
<service name="cloudFiles">
|
||||
<endpoint region="DFW" v1Default="true"
|
||||
publicURL="https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_aaaa-bbbbbb-ccccc-ddddd"
|
||||
internalURL="https://snet-storage101.dfw1.clouddrive.com/v1/MossoCloudFS_aaaa-bbbbbb-ccccc-ddddd"
|
||||
/>
|
||||
</service>
|
||||
<service name="cloudFilesCDN">
|
||||
<endpoint region="DFW" v1Default="true"
|
||||
publicURL="https://cdn1.clouddrive.com/v1/MossoCloudFS_aaaa-bbbbbb-ccccc-ddddd"
|
||||
/>
|
||||
</service>
|
||||
</serviceCatalog>
|
||||
</auth>
|
13
docs/src/wadl/samples/db-credentials.json
Normal file
13
docs/src/wadl/samples/db-credentials.json
Normal file
@ -0,0 +1,13 @@
|
||||
POST /v1.1/auth HTTP/1.1
|
||||
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
|
||||
Host: auth.api.rackspacecloud.com
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Content-Length: 54
|
||||
|
||||
{
|
||||
"credentials" : {
|
||||
"username" : "hub_cap",
|
||||
"key" : "a86850deb2742ec3cb41518e26aa2d89"
|
||||
}
|
||||
}
|
11
docs/src/wadl/samples/db-credentials.xml
Normal file
11
docs/src/wadl/samples/db-credentials.xml
Normal file
@ -0,0 +1,11 @@
|
||||
POST /v1.1/auth HTTP/1.1
|
||||
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
|
||||
Host: auth.api.rackspacecloud.com
|
||||
Accept: application/xml
|
||||
Content-Type: application/xml
|
||||
Content-Length: 88
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<credentials xmlns="http://docs.rackspacecloud.com/auth/api/v1.1"
|
||||
username="hub_cap"
|
||||
key="a86850deb2742ec3cb41518e26aa2d89"/>
|
11
docs/src/wadl/samples/db-faults-badRequest.json
Normal file
11
docs/src/wadl/samples/db-faults-badRequest.json
Normal file
@ -0,0 +1,11 @@
|
||||
HTTP/1.1 400 None
|
||||
Content-Length: 120
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Date: Tue, 29 Nov 2011 00:33:48 GMT
|
||||
|
||||
{
|
||||
"badRequest": {
|
||||
"code": 400,
|
||||
"message": "Volume 'size' needs to be a positive integer value, -1.0 cannot be accepted."
|
||||
}
|
||||
}
|
10
docs/src/wadl/samples/db-faults-badRequest.xml
Normal file
10
docs/src/wadl/samples/db-faults-badRequest.xml
Normal file
@ -0,0 +1,10 @@
|
||||
HTTP/1.1 400 None
|
||||
Content-Type: application/xml
|
||||
Content-Length: 121
|
||||
Date: Mon, 28 Nov 2011 18:19:37 GMT
|
||||
|
||||
<badRequest code="400" xmlns="http://docs.rackspace.com/cbs/api/v1.0">
|
||||
<message>
|
||||
Volume 'size' needs to be a positive integer value, -1.0 cannot be accepted.
|
||||
</message>
|
||||
</badRequest>
|
11
docs/src/wadl/samples/db-faults-instanceFault.json
Normal file
11
docs/src/wadl/samples/db-faults-instanceFault.json
Normal file
@ -0,0 +1,11 @@
|
||||
HTTP/1.1 500 Internal Server Error
|
||||
Content-Length: 120
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Date: Tue, 29 Nov 2011 00:33:48 GMT
|
||||
|
||||
{
|
||||
"instance_fault": {
|
||||
"code": 500,
|
||||
"message": "The server has either erred or is incapable of performing the requested operation."
|
||||
}
|
||||
}
|
10
docs/src/wadl/samples/db-faults-instanceFault.xml
Normal file
10
docs/src/wadl/samples/db-faults-instanceFault.xml
Normal file
@ -0,0 +1,10 @@
|
||||
HTTP/1.1 500 Internal Server Error
|
||||
Content-Type: application/xml
|
||||
Content-Length: 121
|
||||
Date: Mon, 28 Nov 2011 18:19:37 GMT
|
||||
|
||||
<instanceFault code="500" xmlns="http://docs.rackspace.com/cbs/api/v1.0">
|
||||
<message>
|
||||
The server has either erred or is incapable of performing the requested operation.
|
||||
</message>
|
||||
</instanceFault>
|
11
docs/src/wadl/samples/db-faults-itemNotFound.json
Normal file
11
docs/src/wadl/samples/db-faults-itemNotFound.json
Normal file
@ -0,0 +1,11 @@
|
||||
HTTP/1.1 404 Not Found
|
||||
Content-Length: 78
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
Date: Tue, 29 Nov 2011 00:35:24 GMT
|
||||
|
||||
{
|
||||
"item_not_found": {
|
||||
"code": 404,
|
||||
"message": "The resource could not be found."
|
||||
}
|
||||
}
|
10
docs/src/wadl/samples/db-faults-itemNotFound.xml
Normal file
10
docs/src/wadl/samples/db-faults-itemNotFound.xml
Normal file
@ -0,0 +1,10 @@
|
||||
HTTP/1.1 404 Not Found
|
||||
Content-Length: 147
|
||||
Content-Type: application/xml; charset=UTF-8
|
||||
Date: Mon, 28 Nov 2011 19:50:15 GMT
|
||||
|
||||
<itemNotFound code="404" xmlns="http://docs.rackspace.com/cbs/api/v1.0">
|
||||
<message>
|
||||
The resource could not be found.
|
||||
</message>
|
||||
</itemNotFound>
|
15
docs/src/wadl/samples/db-request-types.json
Normal file
15
docs/src/wadl/samples/db-request-types.json
Normal file
@ -0,0 +1,15 @@
|
||||
POST /v1.0/1234/instances HTTP/1.1
|
||||
Host: ord.databases.api.rackspacecloud.com
|
||||
Content-Type: application/json
|
||||
Accept: application/xml
|
||||
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
|
||||
|
||||
{
|
||||
"instance": {
|
||||
"name": "'my_instance_name'",
|
||||
"flavor_ref": "https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/1",
|
||||
"volume": {
|
||||
"size": "2"
|
||||
}
|
||||
}
|
||||
}
|
24
docs/src/wadl/samples/db-response-types.xml
Normal file
24
docs/src/wadl/samples/db-response-types.xml
Normal file
@ -0,0 +1,24 @@
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/xml
|
||||
Content-Length: 380
|
||||
Date: Thu, 17 Nov 2011 02:37:37 GMT
|
||||
|
||||
<instance created="2011-11-03T15:57:52Z"
|
||||
hostname="d735f61b985bb003a61dc72948dbf4e7174da12c.rackspaceclouddb.com"
|
||||
id="00ff11ee-22dd-33cc-44bb-55aa66007799" name="orion" status="BUILD" updated="2011-11-03T15:57:55Z"
|
||||
xmlns="http://docs.openstack.org/database/api/v1.0">
|
||||
<links>
|
||||
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/instances/00ff11ee-22dd-33cc-44bb-55aa66007799" rel="self"/>
|
||||
<link href="https://ord.databases.api.rackspacecloud.com/instances/00ff11ee-22dd-33cc-44bb-55aa66007799" rel="bookmark"
|
||||
/>
|
||||
</links>
|
||||
<volume size="2"/>
|
||||
<flavor id="2">
|
||||
<links>
|
||||
<link href="https://ord.databases.api.rackspacecloud.com/v1.0/1234/flavors/2"
|
||||
rel="self"/>
|
||||
<link href="https://ord.databases.api.rackspacecloud.com/flavors/2"
|
||||
rel="bookmark"/>
|
||||
</links>
|
||||
</flavor>
|
||||
</instance>
|
12
docs/src/wadl/samples/reqCreateOrder.json
Normal file
12
docs/src/wadl/samples/reqCreateOrder.json
Normal file
@ -0,0 +1,12 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"secret":
|
||||
{
|
||||
"name": "secretname",
|
||||
"algorithm": "aes",
|
||||
"bit_length": 256,
|
||||
"mode": "cbc",
|
||||
"payload_content_type": "application/octet-stream"
|
||||
}
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/orders
|
6
docs/src/wadl/samples/reqCreateSecret.json
Normal file
6
docs/src/wadl/samples/reqCreateSecret.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
6
docs/src/wadl/samples/reqDeleteOrder.json
Normal file
6
docs/src/wadl/samples/reqDeleteOrder.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
6
docs/src/wadl/samples/reqDeleteSecret.json
Normal file
6
docs/src/wadl/samples/reqDeleteSecret.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
16
docs/src/wadl/samples/reqGenerateToken.json
Normal file
16
docs/src/wadl/samples/reqGenerateToken.json
Normal file
@ -0,0 +1,16 @@
|
||||
# get a token
|
||||
$ curl -H "Accept: applicaton/json" -H "Content-Type: application/json"\
|
||||
--data
|
||||
'{
|
||||
"auth":
|
||||
{
|
||||
"tenantName":"demo",
|
||||
"passwordCredentials":
|
||||
{
|
||||
"username":"admin",
|
||||
"password":"password"
|
||||
}
|
||||
}
|
||||
}'\
|
||||
http://keystone-int.cloudkeep.io:5000/v2.0/tokens
|
||||
|
6
docs/src/wadl/samples/reqGetOrderinfo copy.json
Normal file
6
docs/src/wadl/samples/reqGetOrderinfo copy.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
1
docs/src/wadl/samples/reqGetOrderinfo.json
Normal file
1
docs/src/wadl/samples/reqGetOrderinfo.json
Normal file
@ -0,0 +1 @@
|
||||
curl http://localhost:9311/v1/12345/orders/62d57f53-ecfe-4ae4-87bd-fab2f24e29bc
|
6
docs/src/wadl/samples/reqGetOrders.json
Normal file
6
docs/src/wadl/samples/reqGetOrders.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
1
docs/src/wadl/samples/reqGetSecretinfo.json
Normal file
1
docs/src/wadl/samples/reqGetSecretinfo.json
Normal file
@ -0,0 +1 @@
|
||||
GET v1/{tenant_id}/secrets/888b29a4-c7cf-49d0-bfdf-bd9e6f26d718
|
6
docs/src/wadl/samples/reqGetSecrets.json
Normal file
6
docs/src/wadl/samples/reqGetSecrets.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
6
docs/src/wadl/samples/reqUpdateOrder.json
Normal file
6
docs/src/wadl/samples/reqUpdateOrder.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
6
docs/src/wadl/samples/reqUpdateSecret.json
Normal file
6
docs/src/wadl/samples/reqUpdateSecret.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
3
docs/src/wadl/samples/resCreateOrder.json
Normal file
3
docs/src/wadl/samples/resCreateOrder.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"order_ref": "http://localhost:9311/v1/12345/orders/62d57f53-ecfe-4ae4-87bd-fab2f24e29bc"
|
||||
}
|
3
docs/src/wadl/samples/resCreateSecret.json
Normal file
3
docs/src/wadl/samples/resCreateSecret.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"secret_ref": "http://localhost:9311/v1/{tenant_id}/secrets/a8957047-16c6-4b05-ac57-8621edd0e9ee"
|
||||
}
|
6
docs/src/wadl/samples/resDeleteOrder.json
Normal file
6
docs/src/wadl/samples/resDeleteOrder.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
6
docs/src/wadl/samples/resDeleteSecret.json
Normal file
6
docs/src/wadl/samples/resDeleteSecret.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
1
docs/src/wadl/samples/resGetOrderinfo.json
Normal file
1
docs/src/wadl/samples/resGetOrderinfo.json
Normal file
@ -0,0 +1 @@
|
||||
curl http://localhost:9311/v1/12345/orders/62d57f53-ecfe-4ae4-87bd-fab2f24e29bc
|
6
docs/src/wadl/samples/resGetOrders.json
Normal file
6
docs/src/wadl/samples/resGetOrders.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
6
docs/src/wadl/samples/resUpdateOrder.json
Normal file
6
docs/src/wadl/samples/resUpdateOrder.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
6
docs/src/wadl/samples/resUpdateSecret.json
Normal file
6
docs/src/wadl/samples/resUpdateSecret.json
Normal file
@ -0,0 +1,6 @@
|
||||
curl -X POST -d \
|
||||
'{
|
||||
"payload": "my-secret-here",
|
||||
"payload_content_type": "text/plain"
|
||||
}'\
|
||||
http://localhost:9311/v1/12345/secrets
|
13
docs/src/wadl/samples/resgetSecretinfo.json
Normal file
13
docs/src/wadl/samples/resgetSecretinfo.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"updated": "2013-06-28T15:23:33.092660",
|
||||
"name": "AES key",
|
||||
"algorithm": "AES",
|
||||
"mode": "cbc",
|
||||
"bit_length": 256,
|
||||
"content_types": {
|
||||
"default": "application/octet-stream"
|
||||
},
|
||||
"expiration": "2013-05-08T16:21:38.134160",
|
||||
"secret_ref": "http://localhost:8080/v1/12345/secrets/888b29a4-c7cf-49d0-bfdf-bd9e6f26d718",
|
||||
}
|
48
docs/src/wadl/samples/resgetSecrets.json
Normal file
48
docs/src/wadl/samples/resgetSecrets.json
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"secrets": [
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"updated": "2013-06-28T15:23:30.668641",
|
||||
"mode": "cbc",
|
||||
"name": "Main Encryption Key",
|
||||
"algorithm": "AES",
|
||||
"created": "2013-06-28T15:23:30.668619",
|
||||
"secret_ref": "http://localhost:9311/v1/12345/secrets/e171bb2d-f14f-433e-84f0-3dfcac7a7311",
|
||||
"expiration": "2014-06-28T15:23:30.668619",
|
||||
"bit_length": 256,
|
||||
"content_types": {
|
||||
"default": "application/octet-stream"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"updated": "2013-06-28T15:23:32.210474",
|
||||
"mode": "cbc",
|
||||
"name": "Backup Key",
|
||||
"algorithm": "AES",
|
||||
"created": "2013-06-28T15:23:32.210467",
|
||||
"secret_ref": "http://localhost:9311/v1/12345/secrets/6dba7827-c232-4a2b-8f3d-f523ca3a3f99",
|
||||
"expiration": null,
|
||||
"bit_length": 256,
|
||||
"content_types": {
|
||||
"default": "application/octet-stream"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": "ACTIVE",
|
||||
"updated": "2013-06-28T15:23:33.092660",
|
||||
"mode": null,
|
||||
"name": "PostgreSQL admin password",
|
||||
"algorithm": null,
|
||||
"created": "2013-06-28T15:23:33.092635",
|
||||
"secret_ref": "http://localhost:9311/v1/12345/secrets/6dfa448d-c35a-4158-abaf-e4c249efb580",
|
||||
"expiration": null,
|
||||
"bit_length": null,
|
||||
"content_types": {
|
||||
"default": "text/plain"
|
||||
}
|
||||
}
|
||||
],
|
||||
"next": "http://localhost:9311/v1/12345/secrets?limit=3&offset=5",
|
||||
"previous": "http://localhost:9311/v1/12345/secrets?limit=3&offset=0"
|
||||
}
|
4
docs/src/wadl/samples/resgetversioninfo.json
Normal file
4
docs/src/wadl/samples/resgetversioninfo.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"v1": "current",
|
||||
"build": "2013.2.20130913025647"
|
||||
}
|
8
docs/src/wadl/samples/snapshot_create.json
Normal file
8
docs/src/wadl/samples/snapshot_create.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"snapshot": {
|
||||
"display_name": "snap-001",
|
||||
"display_description": "Daily backup",
|
||||
"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
|
||||
"force": true
|
||||
}
|
||||
}
|
7
docs/src/wadl/samples/snapshot_create.xml
Normal file
7
docs/src/wadl/samples/snapshot_create.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<snapshot xmlns="http://docs.rackspace.com/volume/api/v1"
|
||||
name="snap-001"
|
||||
display_name="snap-001"
|
||||
display_description="Daily backup"
|
||||
volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
|
||||
force="true" />
|
22
docs/src/wadl/samples/snapshot_list_simple.json
Normal file
22
docs/src/wadl/samples/snapshot_list_simple.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"snapshots": [
|
||||
{
|
||||
"id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
|
||||
"display_name": "snap-001",
|
||||
"display_description": "Daily backup",
|
||||
"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
|
||||
"status": "available",
|
||||
"size": 100,
|
||||
"createdAt": "2012-02-29T03:50:07Z"
|
||||
},
|
||||
{
|
||||
"id": "e479997c-650b-40a4-9dfe-77655818b0d2",
|
||||
"display_name": "snap-002",
|
||||
"display_description": "Weekly backup",
|
||||
"volume_id": "76b8950a-8594-4e5b-8dce-0dfa9c696358",
|
||||
"status": "available",
|
||||
"size": 100,
|
||||
"createdAt": "2012-03-19T01:52:47Z"
|
||||
}
|
||||
]
|
||||
}
|
17
docs/src/wadl/samples/snapshot_list_simple.xml
Normal file
17
docs/src/wadl/samples/snapshot_list_simple.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<snapshots xmlns="http://docs.rackspace.com/volume/api/v1">
|
||||
<snapshot id="3fbbcccf-d058-4502-8844-6feeffdf4cb5"
|
||||
display_name="snap-001"
|
||||
display_description="Daily backup"
|
||||
volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
|
||||
status="available"
|
||||
size="100"
|
||||
createdAt="2012-02-29T03:50:07Z" />
|
||||
<snapshot id="e479997c-650b-40a4-9dfe-77655818b0d2"
|
||||
display_name="snap-002"
|
||||
dislay_description="Weekly backup"
|
||||
volume_id="76b8950a-8594-4e5b-8dce-0dfa9c696358"
|
||||
status="available"
|
||||
size="100"
|
||||
createdAt="2012-03-19T01:52:47Z" />
|
||||
</snapshots>
|
11
docs/src/wadl/samples/snapshot_show.json
Normal file
11
docs/src/wadl/samples/snapshot_show.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"snapshot": {
|
||||
"id": "3fbbcccf-d058-4502-8844-6feeffdf4cb5",
|
||||
"display_name": "snap-001",
|
||||
"display_description": "Daily backup",
|
||||
"volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
|
||||
"status": "creating",
|
||||
"size": 100,
|
||||
"createdAt": "2012-02-29T03:50:07Z"
|
||||
}
|
||||
}
|
9
docs/src/wadl/samples/snapshot_show.xml
Normal file
9
docs/src/wadl/samples/snapshot_show.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<snapshot xmlns="http://docs.rackspace.com/volume/api/v1"
|
||||
id="3fbbcccf-d058-4502-8844-6feeffdf4cb5"
|
||||
display_name="snap-001"
|
||||
display_description="Daily backup"
|
||||
volume_id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
|
||||
status="creating"
|
||||
size="100"
|
||||
createdAt="2012-02-29T03:50:07Z" />
|
8
docs/src/wadl/samples/volume_create.json
Normal file
8
docs/src/wadl/samples/volume_create.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"volume": {
|
||||
"display_name": "vol-001",
|
||||
"display_description": "Another volume.",
|
||||
"size": 100,
|
||||
"volume_type": "SATA",
|
||||
}
|
||||
}
|
8
docs/src/wadl/samples/volume_create.xml
Normal file
8
docs/src/wadl/samples/volume_create.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<volume xmlns="http://docs.rackspace.com/volume/api/v1"
|
||||
display_name="vol-001"
|
||||
display_description="Another volume."
|
||||
size="100"
|
||||
volume_type="SATA">
|
||||
|
||||
</volume>
|
24
docs/src/wadl/samples/volume_list_simple.json
Normal file
24
docs/src/wadl/samples/volume_list_simple.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"volumes": [
|
||||
{
|
||||
"id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
|
||||
"display_name": "vol-001",
|
||||
"display_description": "Another volume.",
|
||||
"size": 100,
|
||||
"volume_type": "1",
|
||||
"snapshot_id": null,
|
||||
"attachments": [],
|
||||
"createdAt": "2012-02-14T20:53:07Z"
|
||||
},
|
||||
{
|
||||
"id": "76b8950a-8594-4e5b-8dce-0dfa9c696358",
|
||||
"display_name": "vol-002",
|
||||
"display_description": "Yet another volume.",
|
||||
"size": 100,
|
||||
"volume_type": "1",
|
||||
"snapshot_id": null,
|
||||
"attachments": [],
|
||||
"createdAt": "2012-03-15T19:10:03Z"
|
||||
}
|
||||
]
|
||||
}
|
20
docs/src/wadl/samples/volume_list_simple.xml
Normal file
20
docs/src/wadl/samples/volume_list_simple.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<volumes xmlns="http://docs.rackspace.com/volume/api/v1">
|
||||
<volume xmlns="http://docs.rackspace.com/volume/api/v1"
|
||||
id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
|
||||
display_name="vol-001"
|
||||
display_description="Another volume."
|
||||
status="active"
|
||||
size="100"
|
||||
volume_type="1"
|
||||
createdAt="2012-02-14T20:53:07Z">
|
||||
</volume>
|
||||
<volume xmlns="http://docs.rackspace.com/volume/api/v1"
|
||||
id="76b8950a-8594-4e5b-8dce-0dfa9c696358"
|
||||
display_name="vol-002"
|
||||
display_description="Yet another volume."
|
||||
status="active"
|
||||
size="100"
|
||||
volume_type="1"
|
||||
createdAt="2012-03-15T19:10:03Z" />
|
||||
</volumes>
|
12
docs/src/wadl/samples/volume_show.json
Normal file
12
docs/src/wadl/samples/volume_show.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"volume": {
|
||||
"id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
|
||||
"display_name": "vol-001",
|
||||
"display_description": "Another volume.",
|
||||
"size": 100,
|
||||
"volume_type": "1",
|
||||
"snapshot_id": null,
|
||||
"attachments": [],
|
||||
"createdAt": "2012-02-14T20:53:07Z"
|
||||
}
|
||||
}
|
10
docs/src/wadl/samples/volume_show.xml
Normal file
10
docs/src/wadl/samples/volume_show.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<volume xmlns="http:'//docs.rackspace.com/volume/api/v1"
|
||||
id="521752a6-acf6-4b2d-bc7a-119f9148cd8c"
|
||||
display_name="vol-001"
|
||||
display_decription="Another volume"
|
||||
status="active"
|
||||
size="100"
|
||||
volume_type="1"
|
||||
createdAt="2012-02-14T20:53:07Z">
|
||||
</volume>
|
15
docs/src/wadl/samples/volume_type_list.json
Normal file
15
docs/src/wadl/samples/volume_type_list.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"volume_types": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "SATA",
|
||||
"extra_specs": {},
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "SSD",
|
||||
"extra_specs": {},
|
||||
}
|
||||
]
|
||||
}
|
||||
|
9
docs/src/wadl/samples/volume_type_list.xml
Normal file
9
docs/src/wadl/samples/volume_type_list.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<volume_types xmlns="http://docs.rackspace.com/volume/api/v1">>
|
||||
<volume_type id="1" name="SATA">
|
||||
<extra_specs/>
|
||||
</volume_type>
|
||||
<volume_type id="2" name="SSD">
|
||||
<extra_specs/>
|
||||
</volume_type>
|
||||
</volume_types>
|
7
docs/src/wadl/samples/volume_type_show.json
Normal file
7
docs/src/wadl/samples/volume_type_show.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"volume_type": {
|
||||
"id": "1",
|
||||
"name": "SATA",
|
||||
"extra_specs": {},
|
||||
}
|
||||
}
|
7
docs/src/wadl/samples/volume_type_show.xml
Normal file
7
docs/src/wadl/samples/volume_type_show.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<volume_type xmlns="http://docs.rackspace.com/volume/api/v1"
|
||||
id="1" name="SATA">
|
||||
<extra_specs/>
|
||||
</volume_type>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user