<?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 OnTap granular debugging of role access in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTap-granular-debugging-of-role-access/m-p/147294#M32761</link>
    <description>&lt;P&gt;I'm building an automation suite to handle some of the day to day for our storage administrators. In doing so I want to grant the service user the least privilege necessary to achieve the desired outcome. Since updating my Ansible machine to the current dev release even&amp;nbsp;&lt;A title="na_ontap_gather_facts" href="https://docs.ansible.com/ansible/latest/modules/na_ontap_gather_facts_module.html" target="_blank" rel="noopener"&gt;na_ontap_gather_facts&lt;/A&gt;&amp;nbsp;doesn't work without some sort of write permissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;clustername::*&amp;gt; security login role show -role ansible-user
           Role          Command/                                      Access
Vserver    Name          Directory                               Query Level
---------- ------------- --------- ----------------------------------- --------
clustername ansible-user DEFAULT                                      readonly
                          system node autosupport                      all
2 entries were displayed.&lt;/PRE&gt;
&lt;P&gt;Note that I've added the 'autosupport / all' component as that's the first change I want to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could sift through the Ansible code, but it seems to me that there should be a more straightforward way from the audit log to identify the specific privilege requested that's being denied. This is what is in the audit log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Tue Mar 19 14:24:15 2019  clustername-2  [kern_audit:info:14677] 8503e9000000081c :: clustername:ontapi :: 10.170.38.66:34252 :: clustername:unknown :: Error: POST /servlets/netapp.servlets.admin.XMLrequest_filer HTTP/1.1 401 Unauthorized
Tue Mar 19 14:24:15 2019  clustername-2  [kern_audit:info:2152] 8503e9000000081d :: clustername:ontapi :: 10.170.38.66:34254 :: clustername:ansible-user :: &amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.110" vfiler="clustername"&amp;gt;&amp;lt;ems-autosupport-log&amp;gt;&amp;lt;computer-name&amp;gt;Ansible&amp;lt;/computer-name&amp;gt;&amp;lt;event-id&amp;gt;12345&amp;lt;/event-id&amp;gt;&amp;lt;event-source&amp;gt;na_ontap_gather_facts&amp;lt;/event-source&amp;gt;&amp;lt;app-version&amp;gt;2.8.0.dev0&amp;lt;/app-version&amp;gt;&amp;lt;category&amp;gt;Information&amp;lt;/category&amp;gt;&amp;lt;event-description&amp;gt;setup&amp;lt;/event-description&amp;gt;&amp;lt;log-level&amp;gt;6&amp;lt;/log-level&amp;gt;&amp;lt;auto-support&amp;gt;false&amp;lt;/auto-support&amp;gt;&amp;lt;/ems-autosupport-log&amp;gt;&amp;lt;/netapp&amp;gt; :: Pending
Tue Mar 19 14:24:15 2019  clustername-2  [kern_audit:info:2152] 8503e9000000081d :: clustername:ontapi :: 10.170.38.66:34254 :: clustername:ansible-user :: Insufficient privileges: user 'ansible-user' does not have write access to this resource :: ONTAPI :: Error&lt;/PRE&gt;
&lt;P&gt;I recall having the capability to see privileges denied at a very granular level in 7-mode then being able to correct them as they come up. Where is this functionality in cDOT, or am I just not reading the audit logs the way they're meant to be read?&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2019 15:01:28 GMT</pubDate>
    <dc:creator>fwdalrymple</dc:creator>
    <dc:date>2019-03-19T15:01:28Z</dc:date>
    <item>
      <title>OnTap granular debugging of role access</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTap-granular-debugging-of-role-access/m-p/147294#M32761</link>
      <description>&lt;P&gt;I'm building an automation suite to handle some of the day to day for our storage administrators. In doing so I want to grant the service user the least privilege necessary to achieve the desired outcome. Since updating my Ansible machine to the current dev release even&amp;nbsp;&lt;A title="na_ontap_gather_facts" href="https://docs.ansible.com/ansible/latest/modules/na_ontap_gather_facts_module.html" target="_blank" rel="noopener"&gt;na_ontap_gather_facts&lt;/A&gt;&amp;nbsp;doesn't work without some sort of write permissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;clustername::*&amp;gt; security login role show -role ansible-user
           Role          Command/                                      Access
Vserver    Name          Directory                               Query Level
---------- ------------- --------- ----------------------------------- --------
clustername ansible-user DEFAULT                                      readonly
                          system node autosupport                      all
2 entries were displayed.&lt;/PRE&gt;
&lt;P&gt;Note that I've added the 'autosupport / all' component as that's the first change I want to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could sift through the Ansible code, but it seems to me that there should be a more straightforward way from the audit log to identify the specific privilege requested that's being denied. This is what is in the audit log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Tue Mar 19 14:24:15 2019  clustername-2  [kern_audit:info:14677] 8503e9000000081c :: clustername:ontapi :: 10.170.38.66:34252 :: clustername:unknown :: Error: POST /servlets/netapp.servlets.admin.XMLrequest_filer HTTP/1.1 401 Unauthorized
Tue Mar 19 14:24:15 2019  clustername-2  [kern_audit:info:2152] 8503e9000000081d :: clustername:ontapi :: 10.170.38.66:34254 :: clustername:ansible-user :: &amp;lt;netapp xmlns="http://www.netapp.com/filer/admin" version="1.110" vfiler="clustername"&amp;gt;&amp;lt;ems-autosupport-log&amp;gt;&amp;lt;computer-name&amp;gt;Ansible&amp;lt;/computer-name&amp;gt;&amp;lt;event-id&amp;gt;12345&amp;lt;/event-id&amp;gt;&amp;lt;event-source&amp;gt;na_ontap_gather_facts&amp;lt;/event-source&amp;gt;&amp;lt;app-version&amp;gt;2.8.0.dev0&amp;lt;/app-version&amp;gt;&amp;lt;category&amp;gt;Information&amp;lt;/category&amp;gt;&amp;lt;event-description&amp;gt;setup&amp;lt;/event-description&amp;gt;&amp;lt;log-level&amp;gt;6&amp;lt;/log-level&amp;gt;&amp;lt;auto-support&amp;gt;false&amp;lt;/auto-support&amp;gt;&amp;lt;/ems-autosupport-log&amp;gt;&amp;lt;/netapp&amp;gt; :: Pending
Tue Mar 19 14:24:15 2019  clustername-2  [kern_audit:info:2152] 8503e9000000081d :: clustername:ontapi :: 10.170.38.66:34254 :: clustername:ansible-user :: Insufficient privileges: user 'ansible-user' does not have write access to this resource :: ONTAPI :: Error&lt;/PRE&gt;
&lt;P&gt;I recall having the capability to see privileges denied at a very granular level in 7-mode then being able to correct them as they come up. Where is this functionality in cDOT, or am I just not reading the audit logs the way they're meant to be read?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 15:01:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTap-granular-debugging-of-role-access/m-p/147294#M32761</guid>
      <dc:creator>fwdalrymple</dc:creator>
      <dc:date>2019-03-19T15:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: OnTap granular debugging of role access</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTap-granular-debugging-of-role-access/m-p/147805#M32906</link>
      <description>&lt;P&gt;Same issue here, i can't work out what permission is missing when creating and export policy. If I SSH i can create the policy so it looks like the user has the correct permisions. Do you have any tips to sift through the Ansible code?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 14:14:58 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTap-granular-debugging-of-role-access/m-p/147805#M32906</guid>
      <dc:creator>PaulF</dc:creator>
      <dc:date>2019-04-08T14:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: OnTap granular debugging of role access</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/OnTap-granular-debugging-of-role-access/m-p/155409#M34962</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I just ran into a similar situation and discovered the fix.&amp;nbsp;&lt;/SPAN&gt;ontap_gather_facts and ontap_info fail when trying to create a log entry. &amp;nbsp; The role requires access to the 'event' command directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;sec login role create -role ansible-user -cmddirname event -access all&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 15:03:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/OnTap-granular-debugging-of-role-access/m-p/155409#M34962</guid>
      <dc:creator>RamK</dc:creator>
      <dc:date>2020-04-08T15:03:53Z</dc:date>
    </item>
  </channel>
</rss>

