Policy Management Desktop Client POC
This is a lightweight Desktop UI Client that uses the AdminCLI for all interactions with OSDU. With AdminCLI we believe in releasing early and often and your feedback will make it better.
This has also been called the OSDU Admin CLI UI Wrapper and Policy Explorer.
Supported Platforms
- Supported on Mac, Windows and Linux
- Requires Python 3.9 or later
Note - Python Version
- This UI Has been well tested on Python 3.9 and 3.10. Very limited testing on Python 3.11
Features
- List, Add, Remove, Update Policies
- Template engine support of AdminCLI, however template preview (rendered output) is not supported.
- Checking if REGO in workspace is valid
- Simple searches with query string
- Retrieve storage records
- Check health of Policy Service (and OPA)
- Get info from defined services
- List groups
- List valid legal tags
- On Mac the application will honor 'dark mode' if you Mac is configured for dark appearance.
- and more
Utils Menu
The Utils menu at the top help to check few functionalities like Info and Health, review Groups and Legal Tags. Quickly navigate to Search using the menu above and it displays default Search results.
Checking Rego
Policy Service does not check for valid rego when adding or updating policy. We highly recommend running save and check
before uploading to Policy Service.
Policy View on Mac
Search View on Mac
Installation
Installation of Policy Management Desktop Client
- Install and configure the OSDU AdminCLI client
-
Install additional python packages required for the UI
pip install -r requirements.txt
- On Windows you might need to do
pip install -r requirements.txt --user
-
Set required environment variables from AdminCLI:
Postman Environment File:
* export POSTMAN_ENV_FILE="~/myenv.postman_env.json"
- using this option will cause the Settings->Token menu option to be disabled/greyed out.
Or directly set (if you use both the individual environment variables will override what is read in from the postman env file):
* export BASE_URL="https://xyz"
* export DATA_PARTITION="osdu"
Windows (set in system properties) or `setx variable "value"`
-
Set required environment variables for this application:
export TERM=unknown
-
Optionally set Access Token: If you do not set a
TOKEN
environment variable or thePOSTMAN_ENV_FILE
environment variable you will be prompted for the Access Token upon launch of the application.export TOKEN="..."
Launch
If you did not set a TOKEN environment variable you will get a dialog when starting the application. Paste your Access Token.
Compiling
If you want to distribute the Policy Management Desktop Client to but don't want to have to install Python. You can create an executable and distribute it to other desktops.
Compile on Windows
C:\> python -m PyInstaller --onefile ui.py --paths=../admincli --windowed
Compile on Mac and Linux
Source Code
Policy Management Desktop Client Source Code: https://community.opengroup.org/osdu/ui/admincli/-/tree/master/ui
Policy Service Source Code: https://community.opengroup.org/osdu/platform/security-and-compliance/policy
Policy Service Documentation: https://osdu.pages.opengroup.org/platform/security-and-compliance/policy/