emended test for correctness
[Net-Amazon-S3-Policy.git] / README
blob4d03cdb96c08174873cba73f07a6e1aaf082c79f
1 Net-Amazon-S3-Policy version 0.1.3
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 AVAILABILITY
37 You can either grab the module from CPAN, or see what's going on at
38 http://repo.or.cz/w/Net-Amazon-S3-Policy.git
41 INSTALLATION
43 To install this module, run the following commands:
45         perl Makefile.PL
46         make
47         make test
48         make install
50 Alternatively, to install with Module::Build, you can use the following commands:
52         perl Build.PL
53         ./Build
54         ./Build test
55         ./Build install
58 DEPENDENCIES
60 version and JSON.
62 COPYRIGHT AND LICENCE
64 Copyright (C) 2008, Flavio Poletti
66 This library is free software; you can redistribute it and/or modify
67 it under the same terms as Perl itself.