openstack-manuals/doc/user-guide/section_swift_cli_howto.xml
Diane Fleming 64b6c9261e Folder rename, file rename, flattening of directories
Current folder name	New folder name	        Book title
----------------------------------------------------------
basic-install 	        DELETE
cli-guide	        DELETE
common	                common
NEW	                admin-guide-cloud	Cloud Administrators Guide
docbkx-example	        DELETE
openstack-block-storage-admin 	DELETE
openstack-compute-admin 	DELETE
openstack-config 	config-reference	OpenStack Configuration Reference
openstack-ha 	        high-availability-guide	OpenStack High Availabilty Guide
openstack-image	        image-guide	OpenStack Virtual Machine Image Guide
openstack-install 	install-guide	OpenStack Installation Guide
openstack-network-connectivity-admin 	admin-guide-network 	OpenStack Networking Administration Guide
openstack-object-storage-admin 	DELETE
openstack-security 	security-guide	OpenStack Security Guide
openstack-training 	training-guide	OpenStack Training Guide
openstack-user 	        user-guide	OpenStack End User Guide
openstack-user-admin 	user-guide-admin	OpenStack Admin User Guide
glossary	        NEW        	OpenStack Glossary

bug: #1220407

Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7
author: diane fleming
2013-09-08 15:15:50 -07:00

53 lines
2.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section
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="managing-openstack-object-storage-with-swift-cli">
<title>Managing OpenStack Object Storage with CLI
Swift</title>
<para>In the Object Store (swift) project there is a tool that
can perform a variety of tasks on your storage cluster
named swift. This client utility can be used for adhoc
processing, to gather statistics, list items, update
metadata, upload, download and delete files. It is based
on the native swift client library client.py.
Incorporating client.py into swift provides many benefits
such as seamlessly re-authorizing if the current token
expires in the middle of processing, retrying operations
up to five times and a processing concurrency of 10. All
of these things help make the swift tool robust and great
for operational use.</para>
<section xml:id="swift-acls">
<title>Swift ACLs</title>
<para>Swift ACLs work with users and accounts. Users have
roles on accounts - such as '.admin', which allows
full access to all containers and objects under the
account. ACLs are set at the container level and
support lists for read and write access, which are set
with the X-Container-Read and X-Container-Write header
respectively.</para>
<para>The swift client can be used to set the acls, using
the post subcommand with the option '-r' for the read
ACL, and '-w' for the write ACL. This example allows
the user 'testuser' to read objects in the container:
<programlisting>
$ swift post -r 'testuser'
</programlisting>
This could instead be a list of users.</para>
<para>If you are using the StaticWeb middleware to allow
OpenStack Object Storage to serve public web content,
you should also be aware of the ACL syntax for
managing allowed referrers. The syntax is '.r:'
followed by a list of allowed referrers. For example,
this command allows all referring domains access to
the object:
<programlisting>
$ swift post -r '.r:*'
</programlisting>
</para>
</section>
</section>