Skip to main content

Utility to push SAFE policies for a specific dataset.

Project description

# WP-DSO-Publish

## Operation

[Pyforms-based](https://pyforms-gui.readthedocs.io/en/v4/index.html) GUI that publishes to safe two workflow policies (one for Research and Infrastructure Approval, respectively) and a dataset policy that requires that both are satisfied prior to granting access (via [Presidio](https://github.com/RENCI-NRIG/impact-presidio)). This is consistent with SAFE ImPACT [MVP example](https://github.com/RENCI-NRIG/impact-docker-images/tree/master/safe-server/1.0.1).

Requires Python3 and pip3. Be sure to load the required dependencies: `bash $ pip install -r requirements.txt `

Running it as as simple as, starting from the directory the contains wp_dso_publish/ `bash $ export PYTHONPATH=wp_dso_publish/:$PYTHONPATH $ python -m wp_dso_publish `

The GUI presents two tabs - one with identifiers for the two workflows and the dataset, one with SAFE parameters. Identifiers can either be filled in or auto-generated (GUIDs) using the ‘Generate button’. SAFE server base URL is automatically filled in. SAFE public key for the dataset owner principal must also be specified (typically has the .pub extension) via file browser.

Once all parameters are filled in, press the ‘Push Combined Policy to SAFE’ button and inspect the outcome.

If everything went according to plan, cut-and-paste the workflow identifiers when registering the workflows with the Notary Service. Similarly cut-and-paste the dataset identifier when registering the dataset.

## Saving settings

The app relies on confapp module to restore settings in the form of Python code from a file named ‘saved-settings.py’, if it exists. Any filled in settings are saved when ‘Saved Settings’ button is pressed and then automatically restored when the program is restarted next time. The file can be edited by hand if needed. The following parameters (as strings) need to be defined (example): ` RESEARCH_APPROVAL_ID = '53f8e808-5d91-4eff-8ecf-ab7d2dcda4d3' INFRASTRUCTURE_APPROVAL_ID = 'cf6d4ef7-d07a-4a7f-8ff5-1ec925f8df9b' DATASET_ID = '05b88841-d14b-471d-8e0f-5da29bf8da68' PUBLIC_KEY_PATH = '/path/to/public/key/key.pub' SAFE_URL = 'http://localhost:7777/' `

## Tweaking

The layout is partially hard-wired in the code (see the last line of __main__.py): ` if __name__ == "__main__": pyforms.start_app(AppGUI, geometry=[100, 100, 500, 700]) ` which specifies the geometry of the main window. Couldn’t find a more elegant way to do it.

The rest of the layout is contained in [style.css](wp_dso_publish/style.css) file in the same directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wp_dso_publish-0.23.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wp_dso_publish-0.23-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file wp_dso_publish-0.23.tar.gz.

File metadata

  • Download URL: wp_dso_publish-0.23.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for wp_dso_publish-0.23.tar.gz
Algorithm Hash digest
SHA256 f0be8314fd0426e70f10febea158566115c93ff8146d91bdb3724094afedebec
MD5 5b550b73618d7c200eb0838287335ded
BLAKE2b-256 e4b6114134b6df16b11667bd2a7c43102a0059302d0987ce25fc04f75173034b

See more details on using hashes here.

File details

Details for the file wp_dso_publish-0.23-py2.py3-none-any.whl.

File metadata

  • Download URL: wp_dso_publish-0.23-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for wp_dso_publish-0.23-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b08a0c5882bc54cf9389e9febf86aa1851b5926581b0e748b71cb3d3382d4b1c
MD5 27275cdca8e7d32e11e14adb1ed872ba
BLAKE2b-256 ed8d12eee42f2d91a1ff346d6b0557ade53f535451af2340225925008c6c8d94

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page