Added test file to MANIFEST.
[Net-Amazon-S3-Policy.git] / README
blobf6b079934b4104c80da9073b92584ace99b6e3ac
1 Net-Amazon-S3-Policy version 0.1.0
3 Net::Amazon::S3::Policy gives you an object-oriented interface to man‐
4 age policies for Amazon S3 HTTP POST uploads.
6 Amazon S3 relies upon either a REST interface (see Net::Amazon::S3) or
7 a SOAP one; as an added service, it is possible to give access to the
8 upload of resources using HTTP POSTs that do not involve using any of
9 these two interfaces, but a single HTML FORM. The rules you have to
10 follow are explained in the Amazon S3 Developer Guide.
12 More or less, it boils down to the following:
14 ·   if the target bucket is not writeable by the anonymous group,
15    you’ll need to set an access policy;
17 ·   almost every field in the HTML FORM that will be used to build up
18    the HTTP POST message by the browser needs to be included into a
19    policy, and the policy has to be sent along within the HTTP POST
21 ·   together with the policy, also the bucket owner’s AWS ID (the pub‐
22    lic one) has to be sent, together with a digital signature of the
23    policy that has to be created using the bucket owner’s AWS secret
24    key.
26 This module lets you manage the build-up of a policy document, provid‐
27 ing you with tools to get the Base64 encoding of the resulting JSON
28 policy document, and to calculate the Base64 encoding of the signature.
29 See "Example" for a complete example of how to do this.
31 In addition to policy synthesis, the module is also capable of parsing
32 some policy (base64-encoded or not, but in JSON format). This shouldn’t
33 be a need in general... possibly for debug reasons.
35 INSTALLATION
37 To install this module, run the following commands:
39         perl Makefile.PL
40         make
41         make test
42         make install
44 Alternatively, to install with Module::Build, you can use the following commands:
46         perl Build.PL
47         ./Build
48         ./Build test
49         ./Build install
52 DEPENDENCIES
54 version and JSON.
56 COPYRIGHT AND LICENCE
58 Copyright (C) 2008, Flavio Poletti
60 This library is free software; you can redistribute it and/or modify
61 it under the same terms as Perl itself.