~ack/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/testing/payload.py

  • Committer: Andreas Hasenack
  • Date: 2012-02-24 00:08:15 UTC
  • mfrom: (14.4.37 staging)
  • Revision ID: andreas@canonical.com-20120224000815-zot0e8b0cfz32cnk
Tags: 12.01.2
Merged from staging for the production deployment of 12.01.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
            <code>16</code>
23
23
            <name>running</name>
24
24
          </instanceState>
25
 
          <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal</privateDnsName>
 
25
          <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal\
 
26
</privateDnsName>
26
27
          <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName>
27
28
          <instanceType>c1.xlarge</instanceType>
28
29
          <launchTime>2009-04-27T02:23:18.000Z</launchTime>
58
59
            <code>16</code>
59
60
            <name>running</name>
60
61
          </instanceState>
61
 
          <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal</privateDnsName>
 
62
          <privateDnsName>domU-12-31-39-03-15-11.compute-1.internal\
 
63
</privateDnsName>
62
64
          <dnsName>ec2-75-101-245-65.compute-1.amazonaws.com</dnsName>
63
65
          <reason/>
64
66
          <keyName>keyname</keyName>
153
155
  <instancesSet>
154
156
    <item>
155
157
      <instanceId>i-1234</instanceId>
156
 
      <shutdownState>
 
158
      <currentState>
157
159
        <code>32</code>
158
160
        <name>shutting-down</name>
159
 
      </shutdownState>
 
161
      </currentState>
160
162
      <previousState>
161
163
        <code>16</code>
162
164
        <name>running</name>
164
166
    </item>
165
167
    <item>
166
168
      <instanceId>i-5678</instanceId>
167
 
      <shutdownState>
 
169
      <currentState>
168
170
        <code>32</code>
169
171
        <name>shutting-down</name>
170
 
      </shutdownState>
 
172
      </currentState>
171
173
      <previousState>
172
174
        <code>32</code>
173
175
        <name>shutting-down</name>
494
496
  <Errors>
495
497
    <Error>
496
498
      <Code>InvalidGroup.InUse</Code>
497
 
      <Message>Group groupID1:GroupReferredTo is used by groups: groupID2:UsingGroup</Message>
 
499
      <Message>Group groupID1:GroupReferredTo is used by groups: \
 
500
groupID2:UsingGroup</Message>
498
501
    </Error>
499
502
  </Errors>
500
503
  <RequestID>9a6df05f-9c27-47aa-81d8-6619689210cc</RequestID>
503
506
 
504
507
 
505
508
sample_authorize_security_group = """\
506
 
<AuthorizeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
 
509
<AuthorizeSecurityGroupIngressResponse\
 
510
 xmlns="http://ec2.amazonaws.com/doc/%s/">
507
511
  <return>true</return>
508
512
</AuthorizeSecurityGroupIngressResponse>
509
513
""" % (version.ec2_api,)
650
654
  <keySet>
651
655
    <item>
652
656
      <keyName>gsg-keypair</keyName>
653
 
      <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>
 
657
      <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
 
658
ca:9f:f5:f1:6f</keyFingerprint>
654
659
    </item>
655
660
  </keySet>
656
661
</DescribeKeyPairsResponse>
663
668
  <keySet>
664
669
    <item>
665
670
      <keyName>gsg-keypair-1</keyName>
666
 
      <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>
 
671
      <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
 
672
ca:9f:f5:f1:6f</keyFingerprint>
667
673
    </item>
668
674
    <item>
669
675
      <keyName>gsg-keypair-2</keyName>
670
 
      <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:70</keyFingerprint>
 
676
      <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
 
677
ca:9f:f5:f1:70</keyFingerprint>
671
678
    </item>
672
679
  </keySet>
673
680
</DescribeKeyPairsResponse>
678
685
<?xml version="1.0"?>
679
686
<CreateKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
680
687
  <keyName>example-key-name</keyName>
681
 
  <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>
 
688
  <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
 
689
ca:9f:f5:f1:6f</keyFingerprint>
682
690
  <keyMaterial>-----BEGIN RSA PRIVATE KEY-----
683
691
MIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp
684
692
HungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg
747
755
<?xml version="1.0"?>
748
756
<ImportKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/%s/">
749
757
  <keyName>example-key-name</keyName>
750
 
  <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>
 
758
  <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:\
 
759
ca:9f:f5:f1:6f</keyFingerprint>
751
760
</ImportKeyPairResponse>
752
761
""" % (version.ec2_api,)
753
762
 
837
846
  <Errors>
838
847
    <Error>
839
848
      <Code>InvalidClientTokenId</Code>
840
 
      <Message>The AWS Access Key Id you provided does not exist in our records.</Message>
 
849
      <Message>The AWS Access Key Id you provided does not exist in our\
 
850
 records.</Message>
841
851
    </Error>
842
852
  </Errors>
843
853
  <RequestID>47bfd77d-78d6-446d-be0d-f7621795dded</RequestID>
865
875
  <Code>InternalError</Code>
866
876
  <Message>We encountered an internal error. Please try again.</Message>
867
877
  <RequestID>A2A7E5395E27DFBB</RequestID>
868
 
  <HostID>f691zulHNsUqonsZkjhILnvWwD3ZnmOM4ObM1wXTc6xuS3GzPmjArp8QC/sGsn6K</HostID>
 
878
  <HostID>f691zulHNsUqonsZkjhILnvWwD3ZnmOM4ObM1wXTc6xuS3GzPmjArp8QC/sGsn6K\
 
879
</HostID>
869
880
</Error>
870
881
"""
871
882
 
926
937
 
927
938
 
928
939
sample_get_bucket_location_result = """\
929
 
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU</LocationConstraint>
 
940
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU\
 
941
</LocationConstraint>
930
942
 
931
943
"""
932
944
sample_request_payment = """\
940
952
<?xml version="1.0" encoding="UTF-8"?>
941
953
<Error>
942
954
  <Code>SignatureDoesNotMatch</Code>
943
 
  <Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
944
 
  <StringToSignBytes>47 45 54 0a 31 42 32 4d 32 59 38 41 73 67 54 70 67 41 6d 59 37 50 68 43 66 67 3d 3d 0a 0a 54 68 75 2c 20 30 35 20 4e 6f 76 20 32 30 30 39 20 32 31 3a 33 33 3a 32 39 20 47 4d 54 0a 2f</StringToSignBytes>
 
955
  <Message>The request signature we calculated does not match the signature\
 
956
 you provided. Check your key and signing method.</Message>
 
957
  <StringToSignBytes>47 45 54 0a 31 42 32 4d 32 59 38 41 73 67 54 70 67 41 6d\
 
958
 59 37 50 68 43 66 67 3d 3d 0a 0a 54 68 75 2c 20 30 35 20 4e 6f 76 20 32 30\
 
959
 30 39 20 32 31 3a 33 33 3a 32 39 20 47 4d 54 0a 2f</StringToSignBytes>
945
960
  <RequestId>AB9216C8640751B2</RequestId>
946
 
  <HostId>sAPBpmFdsOsgUUwtSLsiT6KIwP1mPbmrYY0xUoahzJE263qmABkTaqzGhHddgOq5</HostId>
947
 
  <SignatureProvided>ltowhdrbjaQ8dQc9VS5MxzJfsPJZi0BZHEzJC3r9pzU=</SignatureProvided>
948
 
  <StringToSign>GET\n1B2M2Y8AsgTpgAmY7PhCfg==\n\nThu, 05 Nov 2009 21:33:29 GMT\n/</StringToSign>
 
961
  <HostId>sAPBpmFdsOsgUUwtSLsiT6KIwP1mPbmrYY0xUoahzJE263qmABkTaqzGhHddgOq5\
 
962
</HostId>
 
963
  <SignatureProvided>ltowhdrbjaQ8dQc9VS5MxzJfsPJZi0BZHEzJC3r9pzU=
 
964
</SignatureProvided>
 
965
  <StringToSign>GET\n1B2M2Y8AsgTpgAmY7PhCfg==\n\nThu, 05 Nov 2009 21:33:29\
 
966
 GMT\n/</StringToSign>
949
967
  <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>
950
968
</Error>
951
969
"""
955
973
<?xml version="1.0" encoding="UTF-8"?>
956
974
<Error>
957
975
  <Code>InvalidAccessKeyId</Code>
958
 
  <Message>The AWS Access Key Id you provided does not exist in our records.</Message>
 
976
  <Message>The AWS Access Key Id you provided does not exist in our records.\
 
977
</Message>
959
978
  <RequestId>0223AD81A94821CE</RequestId>
960
 
  <HostId>HAw5g9P1VkN8ztgLKFTK20CY5LmCfTwXcSths1O7UQV6NuJx2P4tmFnpuOsziwOE</HostId>
 
979
  <HostId>HAw5g9P1VkN8ztgLKFTK20CY5LmCfTwXcSths1O7UQV6NuJx2P4tmFnpuOsziwOE\
 
980
</HostId>
961
981
  <AWSAccessKeyId>SOMEKEYID</AWSAccessKeyId>
962
982
</Error>
963
983
"""
970
990
  </Owner>
971
991
  <AccessControlList>
972
992
    <Grant>
973
 
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
 
993
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
 
994
 xsi:type="CanonicalUser">
974
995
        <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>
975
996
        <DisplayName>foo@example.net</DisplayName>
976
997
      </Grantee>
977
998
      <Permission>FULL_CONTROL</Permission>
978
999
    </Grant>
979
1000
    <Grant>
980
 
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
 
1001
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\
 
1002
 xsi:type="CanonicalUser">
981
1003
        <ID>8a6925ce4adf588a4f21c32aa37900feed</ID>
982
1004
        <DisplayName>bar@example.net</DisplayName>
983
1005
      </Grantee>
986
1008
  </AccessControlList>
987
1009
</AccessControlPolicy>"""
988
1010
 
 
1011
sample_s3_get_bucket_lifecycle_result = """\
 
1012
<?xml version="1.0" encoding="UTF-8"?>
 
1013
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 
1014
   <Rule>
 
1015
      <ID>30-day-log-deletion-rule</ID>
 
1016
      <Prefix>logs</Prefix>
 
1017
      <Status>Enabled</Status>
 
1018
      <Expiration>
 
1019
         <Days>30</Days>
 
1020
      </Expiration>
 
1021
   </Rule>
 
1022
</LifecycleConfiguration>"""
 
1023
 
 
1024
sample_s3_get_bucket_lifecycle_multiple_rules_result = """\
 
1025
<?xml version="1.0" encoding="UTF-8"?>
 
1026
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 
1027
   <Rule>
 
1028
      <ID>30-day-log-deletion-rule</ID>
 
1029
      <Prefix>logs</Prefix>
 
1030
      <Status>Enabled</Status>
 
1031
      <Expiration>
 
1032
         <Days>30</Days>
 
1033
      </Expiration>
 
1034
   </Rule>
 
1035
   <Rule>
 
1036
      <ID>another-id</ID>
 
1037
      <Prefix>another-logs</Prefix>
 
1038
      <Status>Disabled</Status>
 
1039
      <Expiration>
 
1040
         <Days>37</Days>
 
1041
      </Expiration>
 
1042
   </Rule>
 
1043
</LifecycleConfiguration>"""
 
1044
 
 
1045
sample_s3_get_bucket_website_result = """\
 
1046
<?xml version="1.0" encoding="UTF-8"?>
 
1047
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 
1048
  <IndexDocument>
 
1049
    <Suffix>index.html</Suffix>
 
1050
  </IndexDocument>
 
1051
  <ErrorDocument>
 
1052
    <Key>404.html</Key>
 
1053
  </ErrorDocument>
 
1054
</WebsiteConfiguration>"""
 
1055
 
 
1056
sample_s3_get_bucket_website_no_error_result = """\
 
1057
<?xml version="1.0" encoding="UTF-8"?>
 
1058
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 
1059
  <IndexDocument>
 
1060
    <Suffix>index.html</Suffix>
 
1061
  </IndexDocument>
 
1062
</WebsiteConfiguration>"""
 
1063
 
 
1064
sample_s3_get_bucket_notification_result = """\
 
1065
<NotificationConfiguration />"""
 
1066
 
 
1067
sample_s3_get_bucket_notification_with_topic_result = """\
 
1068
<NotificationConfiguration>
 
1069
   <TopicConfiguration>
 
1070
       <Topic>arn:aws:sns:us-east-1:123456789012:myTopic</Topic>
 
1071
       <Event>s3:ReducedRedundancyLostObject</Event>
 
1072
   </TopicConfiguration>
 
1073
</NotificationConfiguration>"""
 
1074
 
 
1075
sample_s3_get_bucket_versioning_result = """\
 
1076
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>"""
 
1077
 
 
1078
sample_s3_get_bucket_versioning_enabled_result = """\
 
1079
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 
1080
  <Status>Enabled</Status>
 
1081
</VersioningConfiguration>"""
 
1082
 
 
1083
sample_s3_get_bucket_versioning_mfa_disabled_result = """\
 
1084
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 
1085
  <Status>Enabled</Status>
 
1086
  <MfaDelete>Disabled</MfaDelete>
 
1087
</VersioningConfiguration>"""