brian-ruf / OSCAL-GUI

Joint NIST/FedRAMP tool to interact with OSCAL files via a browser-based GUI
GNU General Public License v3.0
43 stars 16 forks source link

Date Last Modified error #5

Open isobiesk opened 4 years ago

isobiesk commented 4 years ago

I'm having an error when I upload a file to the GUI where it says that the date last modified is invalid.

To reproduce: Upload an OSCAL document to the GUI. I used the OSCAL documents in the OSCAL repo (catalogs and profiles). I also tried both methods of upload (drag and drop as well as choosing a file).

All documents and both upload methods produce the same error for me.

brian-ruf commented 4 years ago

@isobiesk First, please check to be sure you have the latest schema files.

  1. click "Tools & Maintenance"
  2. then "Update OSCAL Files" (Please note some personal firewalls or IT-department-managed computers may block this. If your firewall/endpoint protection blocks the download, the tool will tell you what to download and where to put them.)

While it's always good to have the latest OSCAL files, it is more likely the date in your OSCAL file is not formatted correctly. The OSCAL syntax is very strict about this.

  1. First, check the date type of the field that holds the date. Look up the field in the OSCAL Schema Reference

  2. Then look up the correct date syntax on the OSCAL Data Types Page.

If it's a date with time-zone, it has to appear in the OSCAL file as follows (the first is GMT. The second is with a timezone off-set): 2019-09-28Z 2019-12-02-08:00

If it's a dateTime-with-timezone, it has to appear in the OSCAL file like this: 2019-09-28T23:20:50.52Z 2019-12-02T16:39:57-08:00 2019-12-31T23:59:60Z

[Pulled this from a document I am composing for FedRAMP on this topic about the second format] For example, a publication date of 5:30 pm EST, January 10, 2020 must appear as 2020-01-10T17:30:00.00-05:00 This includes: • Numeric Year: Four-digits • A dash • Numeric Month: Two-digit, zero-padded • A dash • Numeric Day: Two digit, zero padded • The capital letter “T” (Do not use lower case) • Hour: Two digit, zero-padded, 24-hour clock (Use 18 for 6:00 pm) • A colon • Minute: Two digit, zero-padded • A colon • Seconds: Two digit, zero-padded • A decimal point • Fractions of a second: two or three digits, zero padded Followed by either: • A capital letter Z to indicate the time is expressed in Coordinated Universal Time (UTC) OR: • A plus or minus representing the offset from UTC • Hour Offset: Difference from UTC, two digit, padded. • A colon • Minutes Offset: Difference from UTC, two digit, padded.

brian-ruf commented 4 years ago

@isobiesk Please leave a comment either way. If it works, If it does turn out to be an issue of the format of the date in the file, I can close the issue.

isobiesk commented 4 years ago

@brianrufgsa it appears in the OSCAL file as such:

2019-09-23T14:1917.649-04:00

I was attending the OSCAL workshop and others also had this same issue.

isobiesk commented 4 years ago

*19:17

brian-ruf commented 4 years ago

Can you clarify which model (catalog, profile, component, or ssp) and field?

isobiesk commented 4 years ago

Screenshot (12)

This is what happens when I try to bring up the NIST SP800-53 R4.

brian-ruf commented 4 years ago

This appears to be an issue of having an out-of-date schema file. The issue is that it is expecting a field named "last-modified-date", and instead found a field named "last-modified" (without the "-date" at the end.)

The OSCAL syntax was changed. That's an old schema file looking for the old syntax. The latest schema files process this correctly (I just verified).

Try manually downloading THIS FILE, and placing in the webroot/oscal folder.

It should work after that.