<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Limit access to bucket with S3 policy in Object Storage</title>
    <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159597#M9</link>
    <description>&lt;P&gt;Hi folks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following policy to limit access per groups to only one specific bucket (3 groups, 3 buckets):&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"Statement": [&lt;BR /&gt;{&lt;BR /&gt;"Effect": "Allow",&lt;BR /&gt;"Action": "s3:*",&lt;BR /&gt;"Resource": [&lt;BR /&gt;"arn:aws:s3:::bucket1",&lt;BR /&gt;"arn:aws:s3:::bucket1/*"&lt;BR /&gt;],&lt;BR /&gt;"Condition": {&lt;BR /&gt;"IpAddress": {&lt;BR /&gt;"aws:SourceIp": "192.168.1.10"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use this to limit access to only a specific bucket and only from one ip address. When I test it I don't see any bucket. Any Idea?&lt;/P&gt;
&lt;P&gt;I tried it already without the ip address condition, still same problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 10:52:48 GMT</pubDate>
    <dc:creator>SYNTAXERROR</dc:creator>
    <dc:date>2025-06-04T10:52:48Z</dc:date>
    <item>
      <title>Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159597#M9</link>
      <description>&lt;P&gt;Hi folks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following policy to limit access per groups to only one specific bucket (3 groups, 3 buckets):&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"Statement": [&lt;BR /&gt;{&lt;BR /&gt;"Effect": "Allow",&lt;BR /&gt;"Action": "s3:*",&lt;BR /&gt;"Resource": [&lt;BR /&gt;"arn:aws:s3:::bucket1",&lt;BR /&gt;"arn:aws:s3:::bucket1/*"&lt;BR /&gt;],&lt;BR /&gt;"Condition": {&lt;BR /&gt;"IpAddress": {&lt;BR /&gt;"aws:SourceIp": "192.168.1.10"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use this to limit access to only a specific bucket and only from one ip address. When I test it I don't see any bucket. Any Idea?&lt;/P&gt;
&lt;P&gt;I tried it already without the ip address condition, still same problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:52:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159597#M9</guid>
      <dc:creator>SYNTAXERROR</dc:creator>
      <dc:date>2025-06-04T10:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159624#M10</link>
      <description>&lt;P&gt;&amp;nbsp;I don't know but I simply looked at the manual and immediately spotted that you have a typo in the condition (should be sgws:SourceIp). There may be other typos or mistakes. The manuals have a few correctly working policy examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.netapp.com/sgws-110/topic/com.netapp.doc.sg-s3/GUID-53596498-9334-44DB-A4CE-DFEC28CF21FF.html?cp=5_0_5_1" target="_blank"&gt;https://docs.netapp.com/sgws-110/topic/com.netapp.doc.sg-s3/GUID-53596498-9334-44DB-A4CE-DFEC28CF21FF.html?cp=5_0_5_1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 12:53:22 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159624#M10</guid>
      <dc:creator>elementx</dc:creator>
      <dc:date>2020-09-23T12:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159670#M11</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you. This is the documentation for 11.0. In 11.3 it states that you have to use aws:SourceIp.&lt;/P&gt;
&lt;P&gt;I also tested it without the condition.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 07:06:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159670#M11</guid>
      <dc:creator>SYNTAXERROR</dc:creator>
      <dc:date>2020-09-24T07:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159671#M12</link>
      <description>&lt;P&gt;Ok, so you're on v11.3 and neither sgws: nor aws:&amp;nbsp; work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) When you remove the IP Condition, can the bucket be accessed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) When you only have the IP condition, can the bucket be accessed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 07:20:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159671#M12</guid>
      <dc:creator>elementx</dc:creator>
      <dc:date>2020-09-24T07:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159691#M13</link>
      <description>&lt;P&gt;Yeah, sorry for missing the version &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) As mentioned this doesn't not work neither&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) No not yet but I will test that asap...&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 10:53:50 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159691#M13</guid>
      <dc:creator>SYNTAXERROR</dc:creator>
      <dc:date>2020-09-24T10:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159752#M14</link>
      <description>&lt;DIV class="lia-quilt-row lia-quilt-row-main"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-main"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV id="bodyDisplay" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;2) No not yet but I will test that asap...&lt;/P&gt;
&lt;P&gt;-&amp;gt; Tested now and it works as expected so it is only the bucket part which does not work...&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:43:19 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159752#M14</guid>
      <dc:creator>SYNTAXERROR</dc:creator>
      <dc:date>2020-09-28T09:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159753#M15</link>
      <description>&lt;P&gt;Could be a syntax error in your policy file. Can you create a "public" (or other name) test bucket and try like this?&lt;/P&gt;
&lt;PRE&gt;{
  "Sid": "AllowEveryoneReadOnlyAccess",
  "Effect": "Allow",
  "Principal": "*",
  "Action": [ "s3:GetObject", "s3:ListBucket" ],
  "Resource":[ "urn:sgws:s3:::public", "urn:sgws:s3:::public/*"],
  "Condition": {
    "IpAddress": {
    "sgws:SourceIp": "1.1.1.1/32"
  }
}
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 10:23:59 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159753#M15</guid>
      <dc:creator>elementx</dc:creator>
      <dc:date>2020-09-28T10:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159758#M16</link>
      <description>&lt;P&gt;Another example ("Deny" Policy, inverse match - Deny access to all clients but from specified subnet)&lt;/P&gt;
&lt;P&gt;- Bucket: td01&lt;/P&gt;
&lt;P&gt;- Td-centos server is in 10.193.205 subnet&lt;/P&gt;
&lt;P&gt;- Client PC is not on the subnet&lt;/P&gt;
&lt;PRE&gt;[root@td-centos ~]# cat td01_ip.json

{
  "Statement": [
    {
      "Sid": "IPAllow",
      "Effect": "Deny",
      "Principal": "*",
      "Action": "s3:*",
      "Resource": [
         "arn:aws:s3:::td01",
         "arn:aws:s3:::td01/*"
      ],
      "Condition": {
                "NotIpAddress": {"aws:SourceIp": "10.193.205.0/24"}
      }
    }
  ]
}

[root@td-centos ~]# aws s3api put-bucket-policy --bucket td01 --profile user01 --policy file://td01_ip.json --endpoint-url https://sgdemo.netapp.com

[root@td-centos ~]#

[root@td-centos ~]# aws s3api get-bucket-policy --bucket td01 --profile user01 --endpoint-url https://sgdemo.netapp.com

{

    "Policy": "{\"Statement\":[{\"Sid\":\"IPAllow\",\"Effect\":\"Deny\",\"Principal\":\"*\",\"Action\":\"s3:*\",\"Resource\":[\"arn:aws:s3:::td01\",\"arn:aws:s3:::td01/*\"],\"Condition\":{\"NotIpAddress\":{\"aws:SourceIp\":\"10.193.205.0/24\"}}}]}"

}

[root@td-centos ~]#


aws s3 ls s3://td01 --profile user01 --endpoint-url https://sgdemo.netapp.com
2020-09-22 16:36:23      65536 TestObject.0
2020-09-22 16:36:24      65536 TestObject.1
2020-09-22 16:36:24      65536 TestObject.2
2020-09-22 16:36:24      65536 TestObject.3
2020-09-22 16:36:24      65536 TestObject.4

# From another client

[root@td-centos ~]#

$ aws s3 ls s3://td01 --profile user02 --endpoint-url https://10.193.205.63 --no-verify-ssl

An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Authorization failed.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:11:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159758#M16</guid>
      <dc:creator>elementx</dc:creator>
      <dc:date>2020-09-28T15:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159780#M17</link>
      <description>&lt;P&gt;So I set the ILM policy to "Full Access" and use the following policy?:&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"Statement": [&lt;BR /&gt;{&lt;BR /&gt;"Effect": "Allow",&lt;BR /&gt;"Principal": {&lt;BR /&gt;"AWS": "arn:aws:iam::32994846229177:group/NewGroup"&lt;BR /&gt;},&lt;BR /&gt;"Action": "s3:*",&lt;BR /&gt;"Resource": [&lt;BR /&gt;"arn:aws:s3:::bucket1",&lt;BR /&gt;"arn:aws:s3:::bucket1/*"&lt;BR /&gt;],&lt;BR /&gt;"Condition": {&lt;BR /&gt;"IpAddress": {"aws:SourceIp": "192.168.1.1"}&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Effect": "Deny",&lt;BR /&gt;"Principal": "*",&lt;BR /&gt;"Action": "s3:*",&lt;BR /&gt;"Resource": [&lt;BR /&gt;"arn:aws:s3:::bucket1",&lt;BR /&gt;"arn:aws:s3:::bucket1/*"&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;]&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:31:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159780#M17</guid>
      <dc:creator>SYNTAXERROR</dc:creator>
      <dc:date>2020-09-29T10:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159855#M18</link>
      <description>&lt;P&gt;Looks good, but test it yourself to verify.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 14:53:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159855#M18</guid>
      <dc:creator>elementx</dc:creator>
      <dc:date>2020-10-01T14:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Limit access to bucket with S3 policy</title>
      <link>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159915#M19</link>
      <description>&lt;P&gt;Did not work but I managed to get it working like this:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;"Statement": [&lt;BR /&gt;{&lt;BR /&gt;"Effect": "Deny",&lt;BR /&gt;"NotPrincipal": {&lt;BR /&gt;"AWS": "arn:aws:iam::12345678910111213:group/group1"&lt;BR /&gt;},&lt;BR /&gt;"Action": "s3:*",&lt;BR /&gt;"Resource": [&lt;BR /&gt;"arn:aws:s3:::bucket1",&lt;BR /&gt;"arn:aws:s3:::bucket1/*"&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"Effect": "Deny",&lt;BR /&gt;"Principal": "*",&lt;BR /&gt;"Action": "s3:*",&lt;BR /&gt;"Resource": [&lt;BR /&gt;"arn:aws:s3:::bucket1",&lt;BR /&gt;"arn:aws:s3:::bucket1/*"&lt;BR /&gt;],&lt;BR /&gt;"Condition": {&lt;BR /&gt;"NotIpAddress": {"aws:SourceIp": "192.168.1.10/32"}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help...&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 07:05:46 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Object-Storage/Limit-access-to-bucket-with-S3-policy/m-p/159915#M19</guid>
      <dc:creator>SYNTAXERROR</dc:creator>
      <dc:date>2020-10-05T07:05:46Z</dc:date>
    </item>
  </channel>
</rss>

