|
@@ -143,24 +143,26 @@ $storageClient->getBlob(
|
|
|
<title>Einen Blob öffentlich verfügbar machen</title>
|
|
<title>Einen Blob öffentlich verfügbar machen</title>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- By default, blob storage containers on Windows Azure are protected from public
|
|
|
|
|
- viewing. If any user on the Internet should have access to a blob container, its ACL
|
|
|
|
|
- can be set to public. Note that this applies to a complete container and not to a
|
|
|
|
|
- single blob!
|
|
|
|
|
|
|
+ Standardmäßig sind Blob Speicher Container in Windows Azure geschützt vor
|
|
|
|
|
+ öffentlichem Zugriff. Wenn ein Benutzer im Internet Zugriff auf einen Blob Container
|
|
|
|
|
+ haben soll, kann seine ACL auf öffentlich (public) gesetzt werden. Es ist zu
|
|
|
|
|
+ beachten dass das auf den kompletten Container angewendet wird, und nicht auf einen
|
|
|
|
|
+ einzelnen Blob!
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- Using the following code, blob storage container ACL can be set on development
|
|
|
|
|
- storage. Note that the container has already been created before.
|
|
|
|
|
|
|
+ Bei Verwendung des folgenden Codes kann die ACL eines Blob Speicher Containers auf
|
|
|
|
|
+ den Development Speicher gesetzt werden. Es ist zu beachten das der Container
|
|
|
|
|
+ hierfür bereits vorher erstellt worden sein muss.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<example id="zend.service.windowsazure.storage.blob.api.public-blob">
|
|
<example id="zend.service.windowsazure.storage.blob.api.public-blob">
|
|
|
- <title>Making a blob publicly available</title>
|
|
|
|
|
|
|
+ <title>Einen Blob öffentlich zugänglich machen</title>
|
|
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
<programlisting language="php"><![CDATA[
|
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
|
|
|
|
|
|
-// make container publicly available
|
|
|
|
|
|
|
+// Den Container öffentlich zugänglich machen
|
|
|
$storageClient->setContainerAcl('testcontainer', Zend_Service_WindowsAzure_Storage_Blob::ACL_PUBLIC);
|
|
$storageClient->setContainerAcl('testcontainer', Zend_Service_WindowsAzure_Storage_Blob::ACL_PUBLIC);
|
|
|
]]></programlisting>
|
|
]]></programlisting>
|
|
|
</example>
|
|
</example>
|
|
@@ -168,35 +170,37 @@ $storageClient->setContainerAcl('testcontainer', Zend_Service_WindowsAzure_Stora
|
|
|
</sect2>
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="zend.service.windowsazure.storage.blob.root">
|
|
<sect2 id="zend.service.windowsazure.storage.blob.root">
|
|
|
- <title>Root container</title>
|
|
|
|
|
|
|
+ <title>Stamm Container</title>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- Windows Azure Blob Storage provides support to work with a "root container".
|
|
|
|
|
- This means that a blob can be stored in the root of your storage account,
|
|
|
|
|
- i.e. <code>http://myaccount.blob.core.windows.net/somefile.txt</code>.
|
|
|
|
|
|
|
+ Der Windows Azure Blob Speicher bietet Unterstützung für die Arbeit mit einem "Stamm
|
|
|
|
|
+ Container" (root). Das bedeutet das ein Blob im Stamm des Speicher Containers
|
|
|
|
|
+ gespeichert werden kann, z.B.
|
|
|
|
|
+ <code>http://myaccount.blob.core.windows.net/somefile.txt</code>.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- In order to work with the root container, it should first be created using the
|
|
|
|
|
- <methodname>createContainer()</methodname> method, naming the container
|
|
|
|
|
- <varname>$root</varname>. All other operations on the root container should be issued
|
|
|
|
|
- with the container name set to <varname>$root</varname>.
|
|
|
|
|
|
|
+ Um mit dem Stamm Container zu arbieten sollte er zuerst durch Verwendung der
|
|
|
|
|
+ <methodname>createContainer()</methodname> Methode erstellt worden sein, und der
|
|
|
|
|
+ Container sollte <varname>$root</varname> heißen. Alle anderen Operationen auf dem
|
|
|
|
|
+ Stamm Container sollten ausgeführt werden indem der Containernamen auf
|
|
|
|
|
+ <varname>$root</varname> gesetzt wird.
|
|
|
</para>
|
|
</para>
|
|
|
</sect2>
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="zend.service.windowsazure.storage.blob.wrapper">
|
|
<sect2 id="zend.service.windowsazure.storage.blob.wrapper">
|
|
|
- <title>Blob storage stream wrapper</title>
|
|
|
|
|
|
|
+ <title>Blob Speicher Stream Wrapper</title>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- The Windows Azure SDK for PHP provides support for registering a blob storage
|
|
|
|
|
- client as a PHP file stream wrapper. The blob storage stream wrapper provides
|
|
|
|
|
- support for using regular file operations on Windows Azure Blob Storage.
|
|
|
|
|
- For example, one can open a file from Windows Azure Blob Storage with
|
|
|
|
|
- the <functionname>fopen()</functionname> function:
|
|
|
|
|
|
|
+ Die Windows Azure SDK für PHP bietet Unterstützung für die Registrierung eines Blob
|
|
|
|
|
+ Speicher Clients als PHP File Stream Wrapper. Der Blob Speicher Stream Wrapper bietet
|
|
|
|
|
+ Unterstützung für die Verwendung von regulären Datei Operationen auf dem Windows Azure
|
|
|
|
|
+ Blob Speicher. Zum Beispiel kan eine Datei vom Windows Azure Blob Speicher aus mit der
|
|
|
|
|
+ Funktion <functionname>fopen()</functionname> geöffnet werden:
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<example id="zend.service.windowsazure.storage.blob.wrapper.sample">
|
|
<example id="zend.service.windowsazure.storage.blob.wrapper.sample">
|
|
|
- <title>Example usage of blob storage stream wrapper</title>
|
|
|
|
|
|
|
+ <title>Beispiel der Verwendung des Blob Speicher Stream Wrappers</title>
|
|
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
<programlisting language="php"><![CDATA[
|
|
|
$fileHandle = fopen('azure://mycontainer/myfile.txt', 'r');
|
|
$fileHandle = fopen('azure://mycontainer/myfile.txt', 'r');
|
|
@@ -208,44 +212,47 @@ fclose($fileHandle);
|
|
|
</example>
|
|
</example>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- In order to do this, the Windows Azure SDK for PHP blob storage client
|
|
|
|
|
- must be registered as a stream wrapper. This can be done by calling the
|
|
|
|
|
- <methodname>registerStreamWrapper()</methodname> method:
|
|
|
|
|
|
|
+ Um das zu tun muss die Windows Azure SDK für den PHP Blob Speicher Client als Stream
|
|
|
|
|
+ Wrapper registriert werden. Das kann getan werden indem die Methode
|
|
|
|
|
+ <methodname>registerStreamWrapper()</methodname> aufgerufen wird:
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<example id="zend.service.windowsazure.storage.blob.wrapper.register">
|
|
<example id="zend.service.windowsazure.storage.blob.wrapper.register">
|
|
|
- <title>Registering the blob storage stream wrapper</title>
|
|
|
|
|
|
|
+ <title>Den Blob Speicher Stream Wrapper registrieren</title>
|
|
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
<programlisting language="php"><![CDATA[
|
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
|
-$storageClient->registerStreamWrapper(); // registers azure:// on this storage client
|
|
|
|
|
|
|
+// registriert azure:// auf diesem Speicher Client
|
|
|
|
|
+$storageClient->registerStreamWrapper();
|
|
|
|
|
|
|
|
-// or:
|
|
|
|
|
|
|
+// oder:
|
|
|
|
|
|
|
|
-$storageClient->registerStreamWrapper('blob://'); // regiters blob:// on this storage client
|
|
|
|
|
|
|
+// registriert blob:// auf diesem Speicher Client
|
|
|
|
|
+$storageClient->registerStreamWrapper('blob://');
|
|
|
]]></programlisting>
|
|
]]></programlisting>
|
|
|
</example>
|
|
</example>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- To unregister the stream wrapper, the <methodname>unregisterStreamWrapper()</methodname>
|
|
|
|
|
- method can be used.
|
|
|
|
|
|
|
+ Um den Stream Wrapper zu deregistrieren kann die Methode
|
|
|
|
|
+ <methodname>unregisterStreamWrapper()</methodname> verwendet werden.
|
|
|
</para>
|
|
</para>
|
|
|
</sect2>
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="zend.service.windowsazure.storage.blob.sharedaccesssig">
|
|
<sect2 id="zend.service.windowsazure.storage.blob.sharedaccesssig">
|
|
|
- <title>Shared Access Signature</title>
|
|
|
|
|
|
|
+ <title>Shared Access Signaturen</title>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- Windows Azure Bob Storage provides a feature called "Shared Access Signatures". By
|
|
|
|
|
- default, there is only one level of authorization possible in Windows Azure Blob
|
|
|
|
|
- Storage: either a container is private or it is public. Shared Access Signatures provide
|
|
|
|
|
- a more granular method of authorization: read, write, delete and list permissions can be
|
|
|
|
|
- assigned on a container or a blob and given to a specific client using an URL-based
|
|
|
|
|
- model.
|
|
|
|
|
|
|
+ Der Windows Azure Bolb Speicher bietet ein Feature welches "Shared Access Signatures"
|
|
|
|
|
+ genannt wird. Standardmäßig gibt es nur ein Level der Authorosierung welche in Windows
|
|
|
|
|
+ Azure Blob Speicher möglich ist: entweder ist ein Container privat oder er ist
|
|
|
|
|
+ öffentlich. Shared Access Signaturen bieten eine feinere Methode der Authorisierung:
|
|
|
|
|
+ Lese-, Schreib-, Lösch- und Anzeigerechte können auf einem Container oder einem Blob
|
|
|
|
|
+ für einen speziellen Client zugeordnet werden indem ein URL-basierendes Modell verwendet
|
|
|
|
|
+ wird.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- An example would be the following signature:
|
|
|
|
|
|
|
+ Ein Beispiel würde die folgende Signatur sein:
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<literallayout>
|
|
<literallayout>
|
|
@@ -253,28 +260,30 @@ http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A0
|
|
|
</literallayout>
|
|
</literallayout>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- The above signature gives write access to the "phpazuretestshared1"
|
|
|
|
|
- container of the "phpstorage" account.
|
|
|
|
|
|
|
+ Die obige Signatur gibt Schreibrechte auf den Container "phpazuretestshared1" des
|
|
|
|
|
+ Accounts "phpstorage".
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<sect3 id="zend.service.windowsazure.storage.blob.sharedaccesssig.generate">
|
|
<sect3 id="zend.service.windowsazure.storage.blob.sharedaccesssig.generate">
|
|
|
- <title>Generating a Shared Access Signature</title>
|
|
|
|
|
|
|
+ <title>Erstellen einer Shared Access Signature</title>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- When you are the owner of a Windows Azure Bob Storage account, you can create and
|
|
|
|
|
- distribute a shared access key for any type of resource in your account. To do this,
|
|
|
|
|
- the <methodname>generateSharedAccessUrl()</methodname> method of the
|
|
|
|
|
- <classname>Zend_Service_WindowsAzure_Storage_Blob</classname> storage client can be
|
|
|
|
|
- used.
|
|
|
|
|
|
|
+ Wenn man Eigentümer eines Windows Azure Blob Speicher Accounts ist kann man einen
|
|
|
|
|
+ geteilten Zugriffsschlüssel für jeden Typ einer Ressource im eigenen Account
|
|
|
|
|
+ erstellen und teilen. Um das zu tun kann die Methode
|
|
|
|
|
+ <methodname>generateSharedAccessUrl()</methodname> des
|
|
|
|
|
+ <classname>Zend_Service_WindowsAzure_Storage_Blob</classname> Speicher Clients
|
|
|
|
|
+ verwendet werden.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- The following example code will generate a Shared Access Signature for write access
|
|
|
|
|
- in a container named "container1", within a timeframe of 3000 seconds.
|
|
|
|
|
|
|
+ Der folgende Beispielcode erzeugt eine Shared Access Signatur für den
|
|
|
|
|
+ Schreibzugriff in einem Container der "container1" heißt, in einem Zeitrahmen von
|
|
|
|
|
+ 3000 Sekunden.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<example id="zend.service.windowsazure.storage.blob.sharedaccesssig.generate-2">
|
|
<example id="zend.service.windowsazure.storage.blob.sharedaccesssig.generate-2">
|
|
|
- <title>Generating a Shared Access Signature for a container</title>
|
|
|
|
|
|
|
+ <title>Erstellung einer Shared Access Signatur für einen Container</title>
|
|
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
<programlisting language="php"><![CDATA[
|
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
@@ -290,13 +299,13 @@ $sharedAccessUrl = storageClient->generateSharedAccessUrl(
|
|
|
</example>
|
|
</example>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- The following example code will generate a Shared Access Signature for read access
|
|
|
|
|
- in a blob named <filename>test.txt</filename> in a container named "container1"
|
|
|
|
|
- within a time frame of 3000 seconds.
|
|
|
|
|
|
|
+ Der folgende Beispielcode erzeugt eine Shared Access Signatur für den Lesezugriff in
|
|
|
|
|
+ einem Blob der <filename>test.txt</filename> heißt und einem Container der
|
|
|
|
|
+ "container1" heißt, in einem Zeitrahmen von 3000 Sekunden.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<example id="zend.service.windowsazure.storage.blob.sharedaccesssig-generate-3">
|
|
<example id="zend.service.windowsazure.storage.blob.sharedaccesssig-generate-3">
|
|
|
- <title>Generating a Shared Access Signature for a blob</title>
|
|
|
|
|
|
|
+ <title>Erzeugen einer Shared Access Signatur für einen Blob</title>
|
|
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
<programlisting language="php"><![CDATA[
|
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob();
|
|
@@ -313,12 +322,13 @@ $sharedAccessUrl = storageClient->generateSharedAccessUrl(
|
|
|
</sect3>
|
|
</sect3>
|
|
|
|
|
|
|
|
<sect3 id="zend.service.windowsazure.storage.blob.sharedaccesssig.consume">
|
|
<sect3 id="zend.service.windowsazure.storage.blob.sharedaccesssig.consume">
|
|
|
- <title>Working with Shared Access Signatures from others</title>
|
|
|
|
|
|
|
+ <title>Arbeiten mit Shared Access Signaturen von anderen</title>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- When you receive a Shared Access Signature from someone else, you can use the
|
|
|
|
|
- Windows Azure SDK for PHP to work with the addressed resource. For example, the
|
|
|
|
|
- following signature can be retrieved from the owner of a storage account:
|
|
|
|
|
|
|
+ Wenn man eine Shared Access Signatur von jemandem anderen erhält kann man die
|
|
|
|
|
+ Windows Azure SDK für PHP verwenden um mit der adressierten Ressource zu arbeiten.
|
|
|
|
|
+ Zum Beispiel kann man die folgende Signatur vom Eigentümer eines Speicher Accounts
|
|
|
|
|
+ erhalten:
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<literallayout>
|
|
<literallayout>
|
|
@@ -326,13 +336,14 @@ http://phpstorage.blob.core.windows.net/phpazuretestshared1?st=2009-08-17T09%3A0
|
|
|
</literallayout>
|
|
</literallayout>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- The above signature gives write access to the "phpazuretestshared1" "container" of
|
|
|
|
|
- the phpstorage account. Since the shared key for the account is not known, the
|
|
|
|
|
- Shared Access Signature can be used to work with the authorized resource.
|
|
|
|
|
|
|
+ Die obige Signatur gibt Schreibzugriff auf "phpazuretestshared1" "container" des
|
|
|
|
|
+ PhpSpeicher Accounts. Da der geteilte Schlüssel für den Account nicht bekannt ist,
|
|
|
|
|
+ kann die Shared Access Signatur verwendet werden um mit der authorisierten Ressource
|
|
|
|
|
+ zu arbeiten.
|
|
|
</para>
|
|
</para>
|
|
|
|
|
|
|
|
<example id="zend.service.windowsazure.storage.blob.sharedaccesssig.consuming">
|
|
<example id="zend.service.windowsazure.storage.blob.sharedaccesssig.consuming">
|
|
|
- <title>Consuming a Shared Access Signature for a container</title>
|
|
|
|
|
|
|
+ <title>Verwenden einer Shared Access Signatur für einen Container</title>
|
|
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
<programlisting language="php"><![CDATA[
|
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob(
|
|
$storageClient = new Zend_Service_WindowsAzure_Storage_Blob(
|
|
@@ -351,11 +362,12 @@ $storageClient->putBlob(
|
|
|
</example>
|
|
</example>
|
|
|
|
|
|
|
|
<para>
|
|
<para>
|
|
|
- Note that there was no explicit permission to write to a specific blob. Instead, the
|
|
|
|
|
- Windows Azure SDK for PHP determined that a permission was required to either write
|
|
|
|
|
- to that specific blob, or to write to its container. Since only a signature was
|
|
|
|
|
- available for the latter, the Windows Azure SDK for PHP chose those credentials to
|
|
|
|
|
- perform the request on Windows Azure blob storage.
|
|
|
|
|
|
|
+ Es ist zu beachten das es keine explizite Erlaubnis für das Schreiben eines
|
|
|
|
|
+ spezifischen Blobs gab. Stattdessen hat die Windows Azure SDK für PHP festgestellt
|
|
|
|
|
+ das eine Erlaubnis benötigt wurde um entweder an den spezifischen Blob zu schreiben,
|
|
|
|
|
+ oder an seinen Container zu schreiben. Da nur eine Signatur für das letztere
|
|
|
|
|
+ vorhanden war, hat die Windows Azure SDK für PHP diese Zugriffsrechte ausgewählt um
|
|
|
|
|
+ die Anfrage auf den Windows Azure Blob Speicher durchzuführen.
|
|
|
</para>
|
|
</para>
|
|
|
</sect3>
|
|
</sect3>
|
|
|
</sect2>
|
|
</sect2>
|