Java Implementation of REST API

Full Java example sources are provided to allow developers to quickly interface with the Privilege Management for Unix and Linux REST API. The sources are developed with JDK 7 and Eclipse and an example project is provided in the examples/java/PBULAPI directory (use import project from the Eclipse menu). We recommend JUnit 4 be installed and configured to run the provided test suite.

  • org/json/* contains the www.json.org simple java JSON implementation, and is included verbatim.
  • com/beyondtrust/pbul/* contains all of the example code to call the REST API, including:
    • PBULException: An exception used throughout the whole package.
    • PBULsession: Keeps the session information to implement the REST API, including the host URI, application ID, and key. It is used by the objects below to setup and call the REST API.
    • PBULutil: Provides miscellaneous methods required by the implementation.
    • PBULtype, PBULarray and PBULobject: Types defined to provide the data types required to access the settings file.
    • PBULevents: Provides access to the event logs.
    • PBULiologs: Provides access to I/O logs, including listing, searching, and retrieving.
    • PBULkey: Provides access to retrieve and create pb.key files.
    • PBULlicense: Provides details of the licensing on the host.
    • PBULpolicy: Provides two main methods to access the policy files, whether they are normal pb scripts, or CSV format.
    • PBULSolr: Provides a front-end to the SOLR option provided in Privilege Management for Unix and Linux 8.
  • The test folder provides a complete test suite containing test cases that call each of the provided methods and can also be used as examples.