GithubHelp home page GithubHelp logo

nasa-pds / plaid Goto Github PK

View Code? Open in Web Editor NEW
9.0 12.0 0.0 5.32 MB

APPS PDS Label Assistant for Interactive Design (PLAID). See an overview of the software on YouTube. https://www.youtube.com/watch?v=WCo8erW_rL8

Home Page: https://plaid.jpl.nasa.gov

License: Other

JavaScript 61.65% CSS 2.71% PHP 32.34% HTML 0.40% Dockerfile 0.54% Makefile 0.02% Shell 0.49% Python 1.85%
pds

plaid's People

Contributors

jeffyuhaoliu avatar jordanpadams avatar nutjob4life avatar pdsen-ci avatar stirlingalgermissen avatar tloubrieu-jpl avatar voxparcxls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plaid's Issues

Upgrade PLAID to use latest IM

Came across issues with trying to upgrade some LDDs. Need to test and debug where the issues are.

Determine if these customizations in PLAID will cause significant overhead in the future

As a PDS Operator, I want to update PLAID to the latest PDS4 Discipline PDS Data Dictionaries

https://pds.nasa.gov/datastandards/dictionaries/

Namespace Parent Class
proc proc:Processing_Information
sp sp:Spectral_Characteristics
img_surface img_surface:Surface_Imaging
nucspec nucspec:NucSpec_Observation_Properties
msn msn:Mission_Information
img img:Imaging
geom geom:Geometry
speclib speclib:Spectral_Library_Product
msss_cam_mh msss_cam_mh:MSSS_Camera_Mini_Header
disp disp:Display_Settings
cart cart:Cartography
msn_surface msn_surface:Surface_Mission_Information
rings rings:Ring_Moon_Systems
survey survey:Survey

Develop procedure for deploying production version of PLAID

We need a procedure for how to deploy PLAID to plaid.jpl.nasa.gov OR just simply the installation and deployment instructions if they differ at all in production versus test regarding MySQL / Docker / etc. and we can forward plaid.jpl.nasa.gov to something like pds.nasa.gov/tools/plaid

All products are assumed to be Product_Observational by PLAID

๐Ÿ› Describe the bug

Whenever I try to create a product not Observational (e.g. Document, Context, etc.), the software tries to drop this into Product_Observational and it does not work.

Minimal support should include:
See https://pds.nasa.gov/datastandards/documents/im/v1/index_1G00.html#class_pds_observation_area for:

  • Product_Observational

See https://pds.nasa.gov/datastandards/documents/im/v1/index_1G00.html#class_pds_context_area for:

  • Product_Context
  • Product_Document
  • Product_Collection
  • Product_Bundle

Update PLAID to better manage dependencies

Current implementation

#15 will be implemented using a temporary solution where all discipline LDDs and the PDS common namespace are all in one uber JSON.

Proposed improvement

For a more refined solution, we would like to have each discipline LDD have its own JSON, and PLAID will parse that JSON for a new namespaces key to determine all dependent namespaces for the LDD, and load those other JSONs as appropriate.

Per this improvement to LDDTool, generated LDDs now contain this new key. See attached for the CART LDD: PDS4_CART_1G00_1950.JSON.txt

From this example you can see the new namespaces key:

[
  {
    "dataDictionary": {
      "Title": "PDS4 Data Dictionary" ,
      "Version": "1.16.0.0" ,
      "Date": "Tue Jan 19 19:36:45 PST 2021" ,
      "Description": "This document is a dump of the contents of the PDS4 Data Dictionary" ,
      "namespaces": ["pds:", "geom:", "cart:"] ,
      "classDictionary": [
...

PLAID should use this to then go through the other JSON files and parse each of those namespaces

Improved User Guide

Current User Guide is not very helpful and trail and error is necessary to figure out how to use the software. Improvements and/or tutorials would better help onboard new users.

Prepare PLAID for production release on pds.nasa.gov

  • EN to test deployment of PLAID to Staging (/tools/plaid)
  • EN deploy to Production
    • deploy to production
    • export from PLAID.jpl.nasa.gov and import to production
    • redirect plaid.jpl.nasa.gov to pds.nasa.gov/tools/plaid

`call_user_func` executes unfiltered arguments from http client

Vulnerability

In 9 places in the PLAID source code, call_user_func and call_user_func_array appear. In at least 3 of those locations, the first argument (the name of the function to call) is passed in from the HTTP client; for example:

if(isset($_POST['Function'])){
    $DOC = readInXML(getLabelXML());
    call_user_func($_POST['Function'], $_POST['Data']);
}

No checking is performed before making this call. A client could construct a specially formulated POST payload to execute an arbitrary PHP function with an arbitrary argument, such as system with rm -rf /. As a proof of concept, I was able to execute phpinfo() as well as pcntl_exec().

Software Version

main as of 2022-01-04.

As a PDS Operator, I want to update PLAID to the latest PDS4 Information Model

Per January tag-up, here is the plan to fix these issues:

  • PDS4 IM versions 1.14.0.0 and earlier - LDDs are not organized. Grab all dictionaries, use the latest
  • PDS4 IM versions 1.15.0.0 and on - group by IM version. Once a user selects an IM version, we have a specific subset of discipline LDDs

@jeffyuhaoliu identified an issue with the JSON including all dependencies. near term solution: have @jshughes create on uber JSON with all LDDs in it. future solution: JSON output for each dLDD will contain all dependent LDDs

Revise Docker and deployment docs for open source access

๐Ÿ“– Additional Details

  • See PR here for initial version of docs: #29
  • Per this comment, we need to update the Docker deployment and procedures to use publicly available images

โš–๏ธ Acceptance Criteria

Given a desire to deploy PLAID
When I perform the procedure described here (link TBD) to deploy using docker containers for dev purposes
Then I expect to be able to spin up PLAID and run in a dev environment

Given a desire to deploy PLAID
When I perform the procedure described here (link TBD) to deploy using docker containers for ops purposes (includes instructions for necessary HTTP proxying, file system mounting, etc)
Then I expect to be able to spin up PLAID and run in a dev environment

As an PDS Operator, I want a checklist for items to test in order to update to the latest PDS4 IM and LDDs

Motivation

... so that I can quickly spot check test that the new version worked.

Draft checklist

  • Verify new IM version appears on "create" page
  • Spot check 1+ changes to the new IM version appears in the PDS common portion of the workflow
  • Verify all new LDD versions appear on Discipline Dictonaries tab of the workflow
  • Spot check 1+ changes to 1+ LDDs appear in the LDD portion of the workflow

Compatibility with PDS4 version 1.13.0.0

Hi there,

I've just taken PLAID for a spin at it seems to be a really nifty tool. However, I am wondering whether there are plans to update PLAID to support v1.13 of the information model? If not, could you provide a rough estimate of the work required to complete such work?

All the best,
Ariel Ladegaard

As a developer, I want to see exception data

๐Ÿ’ช Motivation

So that I can more effectively containerize, open-sourcerize, and otherwise whip APPS PLAID into shape (especially with regard to how #30 is growing in scope), it would be great to see exception and error condition details.

๐Ÿ“– Additional Details

In eight different locations (and perhaps more) in the APPS PLAID code, there are lines like these:

} catch (PDOException $ed) {
    //print($ex->getMessage()); // Don't print any error message, for security reasons
    return true;
}

That makes debugging APPS PLAID about 43ร— more difficult.

I get that PHP is awful and sort of insecure by default but there probably is some way to at least write exception details to the server log without it also going to the HTTP client.

โš–๏ธ Acceptance Criteria

Given an exceptional condition
When I perform viewing the server log via docker-compose logs plaid
Then I expect to see stack traces or other exception data

โš™๏ธ Engineering Details

Have a release/tag workflow for PLAID

๐Ÿ’ช Motivation

...so that we can publish and track release and tags.

๐Ÿ“– Additional Details

โš–๏ธ Acceptance Criteria

Given
When I perform
Then I expect

โš™๏ธ Engineering Details

Base image used by APPS PLAID is not supported

Vulnerability

"APPS PLAID" uses as its base Docker image php:5.6-apache-jessie.

Debian Linux jessie reached end-of-life on 2018-06-17 and end of long-term support on 2020-06-30. It has received no security updates since then.

PHP 5.6 reached end of life on 2019-01-01 and has no long-term support. It has received no security updates since then.

Upgrading the base image of "APPS PLAID" is strenuously recommended.

Software Version

main

Update available discipline LDDs

Current list of discipline LDDs:

./proc
./sp
./img_surface
./nucspec
./msn
./img
./geom
./speclib
./msss_cam_mh
./disp
./cart
./msn_surface
./rings
./survey

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.