Implementing method-level security for PowerBuilder components

(CR #488947) You can implement method-level security after deploying PowerBuilder components. To implement method-level security for a PowerBuilder component:

  1. Add two users. For example, “Pass” and “Fail”.

  2. Change the role of the user “Pass” to admin-role. You can also define and use your role.

  3. Deploy the final_test NVO into EAServer from PowerBuilder.

  4. Deploy final_test.jar into EAServer from Web console or command line.

  5. Run PowerBuilder client and click the Pass and Fail buttons.

  6. Modify the $EAServer/config/ejbjar-final_test-user.xml file, as follows:

    <setProperties component="ejb.components.final_test.n_easerver_5_componentRemote">
        <transaction retry="false"/>
           <copyValues enable="false"/>
               <accessControl 
                  type="default"
                 auditDeny="true"
                auditPermit="true" 
           />
    <permitAccess method="of_return_name(String)" roles="admin-role" ports="${ejb.allowedPorts}"/>
    </setProperties>
    
  7. Run the Ant Refresh followed by the Run Ant Recompile from the Management Console.

  8. Run the PowerBuilder client.

    If the implementation is successful, the Pass button works.

    If you click Fail, the NO_PERMISSION exception occurs.