Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display SSP Users/Personas & Inventory Items #590

Merged
merged 17 commits into from
Aug 31, 2022

Conversation

tuckerzp
Copy link
Contributor

@tuckerzp tuckerzp commented Aug 29, 2022

This adds a new Users table and Inventory Items table to the System Implementation section of a System Security plan. These are fairly similar to the Components table, so some of the repeated functionality was extracted to functions.

The Users table serves as a way to view data as described by the Users spec of a System Security Plan.

To understand the managed inventory instances of the system, this Inventory Items table displays data as described here Inventory Items of a System Security Plan.

Markdown support inside the ToolTip will be part of a future issue.

Testing

Use https://raw.githubusercontent.com/EasyDynamics/oscal-demo-content/fc199b650389d749c2a87754f578101741bb6b12/system-security-plans/ssp-example.json to view a more flushed out example of users.

closes #404
Closes #224

@tuckerzp tuckerzp requested a review from a team August 29, 2022 18:19

export default function testOSCALSystemImplementation(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an effort to not continue adding to our less than optimal tests, I decided to go ahead and replace this with a Describe. It still tests the same thing, but in a more clear way.

@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team August 30, 2022 15:05
Co-authored-by: Bradley Fellstrom <bfellstrom@easydynamics.com>
@Bronstrom Bronstrom changed the title Display SSP Users/Personas Display SSP Users/Personas & Inventory Items Aug 30, 2022
@Bronstrom Bronstrom added the enhancement New feature or request label Aug 30, 2022
To reduce tech debt, users, components, and inventory items
have been split into their own classes to be used in both the
OSCAL Assessment and Implementation Layers.
@Bronstrom
Copy link
Contributor

Bronstrom commented Aug 30, 2022

I have refactored users, components, and inventory-items to make future implementation of the assessment layer easier. I have gone forth and broken the OSCALSystemImplementation tests to there own respective test classes and expanded a little on the tests. To further refactor, properties and style can be made into it's own separate classes to be reused instead of duplicated how it is now.

Let me know what you all think about naming these new classes prefixed with "OSCALAssessmentImplementation…". I'm not sure how much I like the name being so long, but these classes will be used in both OSCAL layers.

@kylelaker
Copy link
Contributor

OSCALAssessmentImplementation

I think that using System for now might be better to meet the current use case and we can rename it or specialize it later if needed. I see that a later commit does this

Copy link
Contributor

@kylelaker kylelaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have lots of new components so we need lots of new .story.js files

Comment on lines 16 to 42
const OSCALSystemImplementationTableTitle = styled(Typography)`
flex: 1 1 100%;
padding-top: 1em;
padding-bottom: 1em;
`;

const StyledHeaderTableCell = styled(TableCell)(({ theme }) => ({
[`&.${tableCellClasses.head}`]: {
backgroundColor: theme.palette.primary.main,
color: theme.palette.common.white,
},
textAlign: "left",
minWidth: "10em",
}));

const StyledTableRow = styled(TableRow)(({ theme }) => ({
// Use hover color for even numbered rows
"&:nth-of-type(even)": {
backgroundColor: theme.palette.action.hover,
},
}));

const OSCALPropertiesSubDataHeader = styled(TableCell)`
text-transform: capitalize;
white-space: nowrap;
padding: 0.75em 0.75em;
`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like some of these are pretty consistent across the newly added files; can we extract these to another OSCALSystemImplementationTableStyles.js file or something?

@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team August 31, 2022 13:31
Copy link
Contributor

@kylelaker kylelaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small refactorings for consistency and performance. The one on component lookups is fully untested

src/components/OSCALSystemImplementationUsers.js Outdated Show resolved Hide resolved
src/components/OSCALSystemImplementationUsers.js Outdated Show resolved Hide resolved
src/components/OSCALSystemImplementationInventoryItems.js Outdated Show resolved Hide resolved
src/components/OSCALSystemImplementationInventoryItems.js Outdated Show resolved Hide resolved
@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team August 31, 2022 17:51
Copy link
Contributor

@kylelaker kylelaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thanks, @Bronstrom!

@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team August 31, 2022 18:19
Copy link
Contributor Author

@tuckerzp tuckerzp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't actually hit approve. But I do approve of the reworks @Bronstrom made

@kylelaker kylelaker merged commit 1303463 into develop Aug 31, 2022
@kylelaker kylelaker deleted the feature/display-ssp-users branch August 31, 2022 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display SSP Users/Personas Display SSP Inventory Items
4 participants