1 Reply Latest reply on Jun 10, 2015 12:01 PM by rareddy

    What is the use of admin shell addDataRoleMapping

    sridhar_reddy

      HI,

      We are using admin shell api to map a role with specified data role.

                addDataRoleMapping(vdb.getName(), vdb.getVersion(), "testrole","test_user_role")

       

      When we print(using groovy script) the vdb roles and policies it displayed the above mapped role name("test_user_role") mapped with data role name ("testrole").

       

      1) But it's not updating the xml file in vdb.

      2) When we undelploy, redeploy and re-print the vdb roles & policies then the given mapped role name not present.

      3) Internally where it updates the given mapped role name.

      4) where exactly we can use this addDataRoleMapping feature

      5) Is there any option to save or download the VDB file.

       

       

       

       

        • 1. Re: What is the use of admin shell addDataRoleMapping
          rareddy

          Sridhar,

           

          When you deploy a VDB, (not copying into a directory) using CLI or Admin API, the server makes private copy of the deployment artifact in a separate directory under "data". Even when you copy it, during the startup of the server the artifact goes though a deployment phase that makes the same private copy.

           

          So, now when you issue "addDataRoleMapping" this is working with private internal copy, it saves to it. When you undeploy a VDB, it is equivalent to "DROP DATABASE", you can not expect the permissions defined as database be intact on any future similarly named VDB. So, as along as you did not undeploy the VDB, the mapped role should survive any server restarts.

           

          Ramesh..