<?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 Re: Java SDK : Can't create a role with a default app in Security</title>
    <link>https://community.splunk.com/t5/Security/Java-SDK-Can-t-create-a-role-with-a-default-app/m-p/284674#M7611</link>
    <description>&lt;P&gt;Thank you gyslainlatsa, but I tried your advice unsuccessfuly and anyway it doesn't seem to be related to my problem. What fails is the call to create/update the &lt;EM&gt;role&lt;/EM&gt; while giving it a default app.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2016 09:41:38 GMT</pubDate>
    <dc:creator>manur</dc:creator>
    <dc:date>2016-02-19T09:41:38Z</dc:date>
    <item>
      <title>Java SDK : Can't create a role with a default app</title>
      <link>https://community.splunk.com/t5/Security/Java-SDK-Can-t-create-a-role-with-a-default-app/m-p/284672#M7609</link>
      <description>&lt;P&gt;I have a role called &lt;STRONG&gt;accessadmin&lt;/STRONG&gt;, with capabilities &lt;STRONG&gt;edit_roles&lt;/STRONG&gt; and &lt;STRONG&gt;edit_user&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;When I try to use it to create &lt;STRONG&gt;another role&lt;/STRONG&gt; with a default app, I get an error. Here's the Java code :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Role createdRole = service.getRoles().create("someRole");
createdRole.setImportedRoles(parentRole);
createdRole.setSearchFilter(searchFilter);
createdRole.setDefaultApp(defaultApp);
createdRole.update();
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the error message :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;com.splunk.HttpException: HTTP 403 -- User 'accessadmin' with roles { accessadmin } cannot write: /nobody/user-prefs/user-prefs/role_someRole { read : [ * ], write : [ admin ] }, removable: no
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Crucially, there is &lt;STRONG&gt;no error&lt;/STRONG&gt; if I create the same role &lt;STRONG&gt;without&lt;/STRONG&gt; specifying a default app.&lt;/P&gt;

&lt;P&gt;I'm using Splunk 6.3.2 in a docker container.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 14:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Java-SDK-Can-t-create-a-role-with-a-default-app/m-p/284672#M7609</guid>
      <dc:creator>manur</dc:creator>
      <dc:date>2016-02-18T14:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Java SDK : Can't create a role with a default app</title>
      <link>https://community.splunk.com/t5/Security/Java-SDK-Can-t-create-a-role-with-a-default-app/m-p/284673#M7610</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;par example, To make the Search app the default landing app for a user:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1. Create a file called user-prefs.conf in the user's local directory:
etc/users/&amp;lt;user&amp;gt;/user-prefs/local/user-prefs.conf
       · For the admin user the file would be in:
           etc/users/admin/user-prefs/local/user-prefs.conf
        · For the test user, it would be in:
           etc/users/test/user-prefs/local/user-prefs.conf
2. Put the following line in the user-prefs.conf file:
default_namespace = search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or following this link:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.2/Admin/ConfigureSplunktoopeninanapp"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.2/Admin/ConfigureSplunktoopeninanapp&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2016 23:53:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Java-SDK-Can-t-create-a-role-with-a-default-app/m-p/284673#M7610</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2016-02-18T23:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Java SDK : Can't create a role with a default app</title>
      <link>https://community.splunk.com/t5/Security/Java-SDK-Can-t-create-a-role-with-a-default-app/m-p/284674#M7611</link>
      <description>&lt;P&gt;Thank you gyslainlatsa, but I tried your advice unsuccessfuly and anyway it doesn't seem to be related to my problem. What fails is the call to create/update the &lt;EM&gt;role&lt;/EM&gt; while giving it a default app.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 09:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Java-SDK-Can-t-create-a-role-with-a-default-app/m-p/284674#M7611</guid>
      <dc:creator>manur</dc:creator>
      <dc:date>2016-02-19T09:41:38Z</dc:date>
    </item>
  </channel>
</rss>

