Git Product home page Git Product logo

renci-nrig / notary-service Goto Github PK

View Code? Open in Web Editor NEW
5.0 7.0 1.0 3.15 MB

Docker-based Django web application designed to make secure access SAFE attestations on the behalf of users for secure data enclaves. Makes use of COmanage Registry (CILogon 2.0), SAFE, Neo4j and Kafka technologies.

License: MIT License

Dockerfile 0.03% Shell 0.84% Python 41.60% CSS 1.00% JavaScript 25.90% HTML 30.63%
docker docker-compose django python neo4j nginx postgres kafka cilogon comanage-registry

notary-service's Introduction

Notary Service

What is Notary Service?

Notary Service (NS) consists of a web server interacting with different principals (Researchers, representatives of Institutional Governance, Infrastructure Providers and Data Providers) via their User Agent. It accepts policy descriptions and associated document forms from Data Providers (DPs) and then presents different views of those documents to other principals to allow them to make digitally signed statements (attestations) about the requirements spelled out in the documents. NS also provides a communications channel between DPs and other principals that allows for direct negotiation of access via threaded conversations linked to a particular context. The attestations are recorded using SAFE in the remote Data Policy Store. The attestations are then used by Data Provider agents guarding access to data to make decisions regarding granting access to the data by the principals.

NS Principals

Principals authenticate to NS using their institutional credentials via NS integration with CILogon. NS can rely on a combination of InCommon, CILogon claims and local configuration to assign roles to principals. Based on those roles the NS presents different views of the DUA process to principals allowing them to make attestations recorded as SAFE assertions mapped onto different steps of the DUA.

The DUA is specified as a series of DAGs (Directed Acyclic Graphs) describing the different phases and facets of the DUA. The nodes are individual attestations required by the DUA workflow, while the directed edges describe dependencies between nodes. The nodes in the DUA workflow graphs are tagged with the type of principal or the principal role that must make the respected attestation within the workflow. For example, the figure below demonstrates several separate DAGs - one describing the DUA workflow for research approval, comprised of two branches - one intended for researchers (PIs and individual project staff) and the other for the representatives of the institutional governance (e.g. IRB).

Workflows

The second graph shows the DUA workflow for the infrastructure provider. As shown, individual project members may be required to provide attestations in both types of graphs. Examples of these situations may be: requiring project staff to provide data privacy pledges for the research approval and staff providing attestations of passing the required infrastructure training for the infrastructure approval.

Additionally, infrastructure providers may require acknowledgements from PIs or staff for their internal bookkeeping, as reflected in the third ‘Infrastructure Acknowledgement’ graph. SAFE statements generated from this graph are not expected to be used in data access approval, but may be used for other purposes. These types of acknowledgements are a common requirement by institutional infrastructure providers.

System Requirements

There are a small set of system requirements in order to run Notary Service code. If you're planning on doing additional development to this codebase, then additional requirements may be applicable.

  • To Run

    • Docker
    • Docker Compose
  • To Develop

    • Docker
    • Docker Compose
    • Python 3 / Pip 3
    • Virtualenv

Table of Contents

  • TL;DR - Just run it all in Docker and I don't care about specifics
  • Scripts - Convenience scripts for setting up or tearing down a development environment
  • Environment and Configuration - How to setup your development environment
  • Virtualenv - Establish a Python virtual environment
  • Build - Building the stack
  • Run - Running the stack
  • Docker - I want to do all of this in docker
  • Lib - Additional libraries/packages for Notary Service
  • References - Reference information about all the things

TL;DR

NOTE: Assumes you already have OIDC Client credentials, and LDAP access setup for a COmanage Registry.

cp env.template .env                                  # set variables accordingly
cp nginx/default.conf.template nginx/default.conf     # configure accordingly
source .env
UWSGI_UID=$(id -u) UWSGI_GID=$(id -g) docker-compose up -d

Once all of the containers have completed their startup scripts, you will find the running notary service at the specified URL.

Example: https://127.0.0.1:8443/

Landing page

Wait! What if I don't know how to set variables accordingly or to configure accordingly?.. Then keep reading below.

Scripts

Convenience scripts are provided in the scripts directory. The scripts are somewhat macOS specific due the primary development environment, but can be modified to run elsewhere.

  1. macos-development-environment.sh - generates the directories and environment stubs for the user to populate with their own configuration parameters, and starts the database, neo4j, and nginx containers.

  2. stop-and-remove-all.sh - as the name suggests, stops all running containers, removes them, and purges the system of user created container volume mounts.

Move on to the Environment and Configuration section.

Environment and Configuration

Your project must be configured prior to running it for the first time. Example configuration files have been provided as templates to start from.

Do not check any of your configuration files into a repository as they will contain your projects secrets (use .gitignore to exclude any files containing secrets).

  1. .env from env.template - Environment variables for docker-compose.yml to use
  2. nginx/default.conf from nginx/default.conf.template - Example Nginx SSL configuration file to use for deployment.

.env

A file named env.template has been provided as an example, and is used by the docker-compose.yml file.

cp env.template .env

Once copied, modify the default values for each to correspond to your desired deployment. The UID and GID based entries should correspond to the values of the user responsible for running the code as these will relate to shared volumes from the host to the running containers.

# docker-compose environment file
#
# When you set the same environment variable in multiple files,
# here’s the priority used by Compose to choose which value to use:
#
#  1. Compose file
#  2. Shell environment variables
#  3. Environment file
#  4. Dockerfile
#  5. Variable is not defined

# Django settings
export PYTHONPATH=$(pwd):$(pwd)/venv:$(pwd)/.venv
export DJANGO_SECRET_KEY='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
export DJANGO_DEBUG=True
export DJANGO_LOG_LEVEL='DEBUG'
export DJANGO_SESSION_COOKIE_AGE='3600'
export DJANGO_TIME_ZONE='America/New_York'
export OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS='900'

# NS Roles
export ROLE_IMPACT_USER='ImpactUser'
export ROLE_DP='DataProvider'
export ROLE_INP='InfrastructureProvider'
export ROLE_PI='PrincipalInvestigator'
export ROLE_IG='InstitutionalGovernance'
export ROLE_NSADMIN='NotaryServiceAdmin'
export ROLE_ENROLLMENT_APPROVAL='EnrollmentApproval'

# COmanage COU IDs / FLAGs
export COU_ID_ACTIVE_USER=100
export COU_ID_PROJECTS=101
export COU_ID_DATA_PROVIDERS=102
export COU_ID_INFRASTRUCTURE_PROVIDERS=103
export COU_ID_PRINCIPAL_INVESTIGATORS=104
export COU_ID_INSTITUTIONAL_GOVERNANCE=105
export COU_ID_NOTARY_SERVICE_ADMINS=106
export COU_ID_ENROLLMENT_APPROVAL=107
export COU_FLAG_PI_ADMIN='-ADMIN'
export COU_FLAG_PI_MEMBER='-PI'
export COU_FLAG_STAFF='-STAFF'

# Neo4J configuration
#export NEO4J_BOLT_URL=bolt://localhost:7687
export NEO4J_BOLT_URL=bolt://neo4j:7687
export NEO4J_DATA_PATH_DOCKER=/data
export NEO4J_DATA_PATH_HOST=./neo4j/data
export NEO4J_GID=1000
export NEO4J_HOST=neo4j
export NEO4J_IMPORTS_PATH_DOCKER=/imports
export NEO4J_IMPORTS_PATH_HOST=./neo4j/imports
export NEO4J_LOGS_PATH_DOCKER=/logs
export NEO4J_LOGS_PATH_HOST=./neo4j/logs
export NEO4J_PASS=password
export NEO4J_UID=1000
export NEO4J_USER=neo4j

# Nginx configuration
export NGINX_DEFAULT_CONF=./nginx/default.conf
export NGINX_SSL_CERTS_DIR=./ssl

# Notary Service
export NS_NAME=localhost
export NS_PRESIDIO_JWT_PUBLIC_KEY_PATH='./safe/keys/safe-principal.pub'
export NS_PRESIDIO_JWT_PRIVATE_KEY_PATH='./safe/keys/safe-principal.key'

# COmanage API - privileged API user generated in COmanage
export COMANAGE_API_URL='https://FQDN_OF_REGISTRY'
export COMANAGE_API_USER='co_123.api-user-name'
export COMANAGE_API_PASS='xxxx-xxxx-xxxx-xxxx'
export COMANAGE_API_CO_ID=123
export COMANAGE_API_CO_NAME='RegistryName'
export COMANAGE_API_SSH_KEY_AUTHENTICATOR_ID=123

# OIDC CILogon / COmanage - values provided when OIDC client is created
export OIDC_RP_CLIENT_ID=''
export OIDC_RP_CLIENT_SECRET=''
export OIDC_RP_CALLBACK='https://127.0.0.1:8443/oidc/callback/'
export OIDC_STORE_ACCESS_TOKEN=true
export OIDC_STORE_ID_TOKEN=true

# PostgreSQL database - default values should not be used in production
export POSTGRES_HOST=database
export PGDATA=/var/lib/postgresql/data
export POSTGRES_DB=postgres
export POSTGRES_PASSWORD=postgres
export POSTGRES_PORT=5432
export POSTGRES_USER=postgres

# SAFE server
export SAFE_SERVER=safe
export SAFE_SERVER_PORT=7777
export RIAK_IP=riak
export RIAK_PORT=8098
export SLANG_SCRIPT=impact/mvp-ns.slang
export AKKA_LOG_LEVEL=info
export SAFE_IMPORTS=./safe/imports
export SAFE_PRINCIPAL_KEYS=./safe/keys
export SAFE_PRINCIPAL_PUBKEY=./safe/keys/ns.pub

# uWSGI services in Django
export UWSGI_GID=1000
export UWSGI_UID=1000

nginx/default.conf

A file named nginx/default.conf.template has been provided as an exmaple.

cp nginx/default.conf.template nginx/default.conf

Once copied, entries for FQDN_OR_IP should be replaced with actual hostnames or IPs along with port information if not using default values. Also note that macOS will not use file based sockets, so TCP sockets should be used instead.

# the upstream component nginx needs to connect to
upstream django {
    server unix:///code/base.sock; # UNIX file socket
    # Defaulting to macOS equivalent of docker0 network for TCP socket
    #server host.docker.internal:8000; # TCP socket
}

server {
    listen 80;
    server_name FQDN_OR_IP;
    return 301 https://FQDN_OR_IP$request_uri;
}

server {
    listen   443 ssl default_server;
    # the domain name it will serve for
    server_name FQDN_OR_IP; # substitute your machine's IP address or FQDN

    # If they come here using HTTP, bounce them to the correct scheme
    error_page 497 https://$server_name$request_uri;
    # Or if you're on the default port 443, then this should work too
    # error_page 497 https://;

    ssl_certificate /etc/ssl/SSL.crt;
    ssl_certificate_key /etc/ssl/SSL.key;

    charset     utf-8;

    # max upload size
    client_max_body_size 75M;   # adjust to taste

    # Django media
    location /media  {
        alias /code/media;  # your Django project's media files - amend as required
    }

    location /static {
        alias /code/static; # your Django project's static files - amend as required
    }

    # Finally, send all non-media requests to the Django server.
    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Host $http_host;
        proxy_redirect off;

        uwsgi_pass  django;
        include     /code/uwsgi_params; # the uwsgi_params file
    }
}
  • NOTE: host.docker.internal is macOS specific, substitute as required by your operating system

docker-compose.yml

Choose the compose definition that fits your deployment and copy it over the docker-compose.yml file (default is local-development)

  • compose/local-development.yml
  • compose/production.yml
  • compose/production-selinux.yml

Double check that all variable references found in .env, or their default values are suitable for your deployment.

If you're planning on doing local development with virutalenv, configure the database to be reachable from the local machine.

ns_core_uwsgi.ini

NOTE: Depending on your system (macOS) you may not be able to run the Nginx server using sockets mounted from the host. For more information refer to this Github issue: Support for sharing unix sockets. If this is the case, you'll either need to run your Nginx server over ports, or run everything in Docker. The following will describe how to run the Nginx server using TCP ports.

Update the uWSGI ini file

...
; use protocol uwsgi over TCP socket (use if UNIX file socket is not an option)
socket              = :8000
; add an http router/server on the specified address **port**
;http                = :8000
; map mountpoint to static directory (or file) **port**
;static-map          = /static/=static/
;static-map          = /media/=media/
; bind to the specified UNIX/TCP socket using uwsgi protocol (full path) **socket**
;uwsgi-socket        = ./example.sock
; ... with appropriate permissions - may be needed **socket**
;chmod-socket        = 666
...

Move on to the Virtualenv section.

Virtualenv

By default this project is configured to run everything in Docker which may be non-optimal for development. In order to enable local development using Python 3 the user must make a few small changes prior to running the code.

If you're only wanting to run this in Docker, move on to the Docker section.

Using virtualenv locally

Create the virtual environment and install packages

virtualenv -p $(which python3) venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

Move on to the Build section.

Build

Once all configuration has been done, the user can build the necessary containers by issuing:

docker-compose build

Anytime a modification is made to the Django code, a new container should be built prior to launching the docker-compose definition.

Move on to the Run section.

Run

Be sure to source the environment variables that were configured from the .env file.

source .env

database

Create the database directories if they do not exist

mkdir -p pg_data/data pg_data/logs

Start the pre-defined PostgreSQL database in Docker

docker-compose up -d database

Validate that the database container is running.

$ docker-compose ps
  Name                Command              State           Ports
-------------------------------------------------------------------------
database   docker-entrypoint.sh postgres   Up      0.0.0.0:5432->5432/tcp

neo4j

Create the neo4j directories if they do not exist

mkdir -p neo4j/data neo4j/imports neo4j/logs

Start the pre-defined PostgreSQL database in Docker

docker-compose up -d neo4j

Validate that the neo4j container is running.

$ docker-compose ps
  Name                Command              State           Ports
-------------------------------------------------------------------------
database   docker-entrypoint.sh postgres   Up      0.0.0.0:5432->5432/tcp

django

Start the Django service

  • Local virtualenv

    • Launch the run_uwsgi.sh script from your virtualenv, passing in your UID and GID values
    UWSGI_UID=$(id -u) UWSGI_GID=$(id -g) ./run_uwsgi.sh
    

    NOTE: The process output should remain observable in the terminal after running this command, use ctrl-c to end the process, or ctrl-z to suspend it.

  • Docker only

    • Launch django container from docker-compose
    docker-compose up -d django
    

    Validate that the service is running

    $ docker-compose ps
      Name                Command              State                      Ports
    ----------------------------------------------------------------------------------------------
    ...
    django     /code/docker-entrypoint.sh      Up      0.0.0.0:8000->8000/tcp
    ...

nginx

Start the nginx service

$ docker-compose up -d nginx

Validate that the service is running on the expected port(s)

$ docker-compose ps
  Name                Command              State                      Ports
----------------------------------------------------------------------------------------------
...
nginx      nginx -g daemon off;            Up      0.0.0.0:8443->443/tcp, 0.0.0.0:8080->80/tcp
...

At this point the notary-service stack should be running and can be verified at your defined URL: http(s)://HOSTNAME:PORT

ns_workflow

Neo4j/APOC graph database for managing Notary Service Workflows. Build information at https://github.com/RENCI-NRIG/impact-docker-images/tree/master/neo4j

References

Django / Python / Nginx

Docker

notary-service's People

Contributors

ibaldin avatar mjstealey avatar yaxue1123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

milstein

notary-service's Issues

ns_workflow - completeness check when common-set node exists on unused path

Suspect that the completeness check fails when common-set node(s) exist in the graph that are not marked as True.

This case can exist when a single select node is encountered, and common-set node(s) exist on the unused outbound paths.

This can be replicated by using the included example graph at: https://github.com/RENCI-NRIG/notary-service/tree/master/lib/ns_workflow/tests and choosing to walk the "Workstation" path instead of the "Server" path at the "ServerOrWorkstation" node.

UI update - user profile page

To achieve better UI design and user experience for the user profile page of Notary Service, several usability evaluation and tests are performed. Based on the heuristic evaluation results and user feedback of the prototyping, updates need to be implemented to fix existing usability issues. As a frontend developer, I will:

  • Add a side menu and divide main body into tabs including 'User Profile', 'CILogon Certificate', 'Messages' and 'Identity Attributes';

  • Replace dropdown buttons with radio buttons for 'Preferences', and add clear success messages after saving the preference setting;

  • Update the message table with three buttons on top to toggle between active/ deleted messages consistently;

  • Add tooltips to the table names of table 'Identity: CILogon Claims', 'COmanage membership', and 'Other attributes';

COmanage integration

Add COmanage to notary-service

  • new Django app comanage (extend user model to include profile based on OIDC_Claims)
  • include development SSL certificates
  • update Nginx config for SSL
  • create dedicated development OIDC Client RP in ImPACT registry

ImPACT UI Changes

Migrated from Word to GH issue for easier tracking

These are loosely in order of priority determined by @llchristopherson , however, you can and should reshuffle their priority based on feasibility, @mjstealey .

Rename some of the roles:

  • Change "Project PI" to "Project PIs and Co-PIs" Change "Project PI" to "Co-PI"
  • Change "Project PI Admin" to "Project Management" Change "Project PI Admin" to "Lead PI"
  • Change "Project Member" to "Project Staff"
  • All other roles keep their names as is.

Alter User Privileges as shown in the table below
First four cells are either major revisions or new features, and are lower priority than all the other stuff.

  • X = is true now, has this privilege now.
  • Add = not currently a privilege, please add.
  • Remove = has this privilege currently, please remove.
  • Check when completed
Task Proj Mgmt PI & Co-PI NS Admin
Enroll in NS (Start a project) Add    
Approve enrollment     Add
Add a project in NS Add   X – via CoM ^
Add staff to a project Add * Add * X – via CoM ^
Edit project metadata X   X
Associate data/infrastructure with a project X   X
View a list of projects you are associated with X X X
Make attestations per project X X X
See the Datasets tab and the datasets you are currently using X X X
See the Datasets tab and a list of all datasets for browsing X Add X
See the Templates tab Remove   X
See the Infrastructure tab and all infrastructure X Add X
See the Infrastructure tab and the infrastructure you are currently using X X X

* The PI (Lead PI or Co-PI) should only be able to add their own staff from their own institution.
^ You are currently working to change these functions so they are not done through CoManage.

Data Provider Functionality

  • The DP should have a way to view his datasets and associated projects. He should be able to mark datasets as "off" (i.e., not available, invisible, something so that it doesn't appear to others that the dataset is available to them, says "no" in some way). This should be doable for a single project or all projects.

  • Please put Templates before Datasets in the navigation bar since the DP will need to interact with that before the Datasets tab. So in other words, Templates should be to the left of Datasets.

Lead PI and Co-PI Dataset and Infrastructure Browsing Ability

  • Both PI roles should be able to see a list of available infrastructure on the Infrastructure tab. This should be sorted or presented in some way so the infrastructure s/he is currently using is distinct from the infrastructure s/he is not using.

  • Both PI roles should be able to see a list of all datasets in NS (for browsing/shopping purposes). As with Infrastructure, this should be sorted or presented in some way so the datasets s/he is currently using are distinct from the ones s/he is not.

Institutional Governance Functionality

  • IGs should be able to unassign themselves from a project. Currently they can't.

  • An IG should have a way to distinguish between the projects he is assigned to so he doesn't have to page through them all or remember their names to find the ones that are his (in the eventuality that he might encounter a long list). Perhaps projects can be listed in 2 sections on the page: a section for the projects he is assigned to and a section for all the others. The ones he is assigned to should probably appear first.

Infrastructure Provider and Institutional Governance Functionality

  • IP and IG might should see a list of all datasets in the Datasets tab.
  • IP and IG might should see a list of all infrastructure in the Infrastructure tab.

General Notes
With all lists of things, the items that the person is currently using should appear first. The items he is not using should appear after. This can be in whatever way @mjstealey and @yaxue1123 want (e.g., tabs, sections on the page, etc.)

SAFE - integration

  • include local SAFE server in docker-compose
  • add documentation for key generation making use of Let's Encrypt format (mocked for development and GitHub published files)
  • add SAFE related calls to Django safe app
  • remove use of is_complete flag from projects_projectworkflowusercompletionbyrole and calculate completeness from neo4j node state every time (slow, but more accurate)

backlog - placeholder for issues, bugs, and other things that need to be resolved

Issues, bugs and other thing that need to be resolved should be made note of in this thread while the notary service is being developed.

Individual developer issues will be derived from the contents of this thread and worked on separately.

Make sure to include any references, documentation or other supporting material that may be useful for better understanding the issue.

UI Improvement

  • Branding change: Logo update and theme color update across the app;
  • Added responsive design to navbar for different screen sizes;
  • Applied css style for lists, callout messages, etc. to increase usability aesthetically;
  • Added SEO to the html files.

Documentation

include neo4j graph as part of template registry

update template registry object to persist the Neo4j graph that was validated instead of deleting it

  • allows the user to "preview" what a workflow would entail without having to invoke it in a project first

UI update - overall style and FAQ page

After the update of the UI of User Profile page, continuous updates for the overall UI style are required to achieve consistency. Also, modification of the universal app header and footer is suggested based on the heuristic evaluation result. As a frontend developer, I will:

  • Apply the same Bootstrap table style (striped, bordered) and button style (success, danger, warning, info) to all tables and buttons across the application;

  • Update the UI of FAQ page: replace the plain JavaScript to toggle hide and show with Bootstrap data-toggle attributes; make the default state of the question to be show; apply the consistent style as "Identity Attribute" tables in the user profile page;

  • Replace the old logo picture with the new logo across the application (three places including nav brand, index page and about page). Change the color theme accordingly based on the new color palette generated from the new logo;

  • Modify the app header: remove padding and margin; adjust items' logic/ hierarchy across the menu (e.g. add dropdown for "About" and include "Overview" and "FAQ" as dropdown items, move "Profile" and "Logout" to be within the profile popup card); add breakpoints and responsive features as the user's viewport size changes (use hamburger menu when the viewport is comparatively small);

  • Modify the app footer: amplify the footer with more content and reasonable size (e.g. add copyright; add related links; add contact and feedback options ...); change the position of footer from fixed in the viewport to fixed to the end of the page to save space for main content and give more space for potential footer content (when the page main body doesn't take up all page space, the footer will show; otherwise the footer will be outside the viewport and at the end of the page for users to scroll down and see.)

datasets - workflows - templates - neo4j graphs

Create a datasets app

Dataset (minimal model)

  • dataset_identifier as URL
  • safe_identifier as SCID
  • templates as NSTemplate reference from many-to-many relationship table

NSTemplate (minimal model)

  • graphml_definition as file

NSWorkflow (minimal model)

  • template as NSTemplate reference
  • safe_attestation as ... TBD

workflow node assignment and traversal

Enable workflow traversal that reflects SAFE policy attestation requirements

  • using COmanage roles, instantiate nodes onto a workflow graph that represent one or more required tasks for a user to attest to
  • define a workflow language that can be used to concisely define node state, completeness or otherwise convey information relative to attestation or rendering
  • ensure all required hooks exist as part of the ns_workflow library. workflow manipulation and traversal code should not reside within the Django portion of notary service

Create projects based on COmanage COUs

Projects stubs should be solely based on COmanage COU values for *-PI:admins entries.

Example
If a COU named CO:COU:nstest-PI:admins exists, then a project should be generated with the nstest label.

  • Auto-populate personnel based on COUs for CO:COU:nstest-PI:admins, nstest-PI:members:active nstest-STAFF:members:active COUs
  • Only members of CO:COU:nstest-PI:admins can then edit/update the project stub and select a name, description, infrastructure and dataset(s)

Additional projects that make use of the same label (for example, nstest) can only be created by the notary-service administrator

project behavior / cleanup during workflow interaction

  • better manage is_complete flag from projects_projectworkflowusercompletionbyrole table when workflows are updated or deleted removed as part of #63
  • re-order underlying data and state calculations when interacting with the project_details page - involves reviewing the POST request and revamping how form attributes are handled/calculated.
  • finish wiring up project personnel refresh
  • auto-complete any nodes for IP or DP (copy contents) if they've already been completed for an existing workflow (per project / dataset / workflow relationship). This occurs when a project has multiple affiliations since workflows are split by affiliation. Address post MVP
  • add affiliation column to the Personnel portion of the project_detail.html render

update workflow elements and test graphs per 06/28/19 discussion

Per discussion on 6/28/19:

  • Ensure all ID checks are based on uid to sub check between LDAP groups (COmanage) and Identity from AuthN (CILogon)
  • do next_set check before performing is_complete check in projects/workflows.py
  • hide "get access" button until the workflows are completed for that dataset. only visible to PI, STAFF
  • For DP in project - replace "get access" with "get report" button (workflow level - owned datasets)
  • IG / PI - get report button (workflow level - all datasets)
  • submit button for workflows instead of node names
    • Asserting True/check use I Agree
    • SingleSelection, etc. use Submit
  • research graph
    • PrintEnvironment - String - textbox
    • SplitPledge1 - String - textbox
    • SplitPledge2 - String - textbox
    • HardcopyDiscardPledge - String - textbox
    • CodeBackupSelectionPledge - MultiSelection - provide 3/4 options to choose from
    • IRBAbidePledge - wording
    • SplitStaffPledge1/2 - wording
  • infrastructure graph
    • ServerUsedInOtherProjects - SingleSelection - Yes/No
    • ServerSecurityProtocols - StringList - single textbox with + option
    • WorkstationSecurityProtocols - StringList - single textbox with + option

Integration and cleanup

  • add well known endpoint to expose JWT identity cert for Presidio
  • add landing pages for COmanage workflow enrollment steps to guide user through process
  • UI modifications from #84
  • check Affiliation when user logs in after enrollment
  • do not show User information in any tabs prior to the User being fully enrolled (check for empty co_person_id)
  • send message to user when being added to or removed from a project

dataset attribute for non-cert entries

Presidio by default will expect to have a user certificate presented to it in addition to a signed JWT. Allow for data providers to host data in Presidio with only signed JWT and not certificates.

  • add attribute expect_user_certificate to dataset object (default to True)

update project registry

additional information that should be included in project registration

  • refactor project workflow to properly handle COmanage naming convention (:admins vs -PI:members:active)
  • infrastructure (by reference to infrastructure object)
  • organizational participation (by reference from organizational relationship - non-editable for MVP)

Transferring to another issue
institutional governance personnel (by reference from organizational relationship - self assign)
infrastructure workflow personnel (by reference from organizational relationship - self assign)

add infrastructure registry

Allow users who have the Infrastructure Provider (-INP:member:active) role to be able to register infrastructure within Notary Service.

  • new "infrastructure" tab on UI
  • new app for infrastructure with new, edit, detail and delete options
  • update project definition to include infrastructure assignment

user messaging via Kafka

  • Integrate Kafka (Zookeeper) into compose stack
  • create user message model
  • create Kafka producer/consumer classes around message model (with serializers)
  • integrate messages onto site landing page based on user identity
  • document message model usage for external apps to push to via REST (may be post MVP) post MVP
  • document tools that can be used to interact with messaging interface outside of Django post MVP

enforce role based authorization

Enforce roles at the Django level based on a User's role in COmanage

  • Valid roles are PI, STAFF, DP, INP, IG
  • An additional ADMIN level role will be extracted from the CO:Admins designation in COmanage
  • The Django User's role should be selectable via a preference choice that is the aggregate of all discovered roles from COmanage

JWT - notary service / presidio integration - initial pass

Work with @vjorlikowski to establish the JWT process for notary service (NS) as it relates to presidio (PRES).

per meeting with @vjorlikowski on 4/15:

SELinux option using frontend / backend network

Generate an SELinux definition for CentOS based deployments (Ubuntu/AppArmor not being pursued due to our shop using only CentOS based infrastructure)

Split network definitions to frontend and backend for ease of port definitions and security partitioning

permissions-cleanup

Ensure all permissions are set appropriately per role for user interaction within all sections

CILogon certificate retrieval from profile page

Add app to allow user to retrieve CILogon certificate from within NS

  • launch from profile page
  • byo key or autogen key (4096) for user
  • allow export option once generated
  • force user to explicitly exit page, at which point the user cert files will be purged from temp storage.

unify test coverage with pytest

Use pytest to provide testing and coverage metrics

  • apply to base, comanage, lib and users
  • modify existing lib/workflow to be package based
  • validate test/coverage metrics with Jenkins job on turtles.renci.org

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.