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

Add a table for profiles #128

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Add a table for profiles #128

merged 1 commit into from
Aug 4, 2022

Conversation

rhmdnd
Copy link
Owner

@rhmdnd rhmdnd commented Aug 3, 2022

This commit adds a table for profiles so that we can reference controls,
and results to a parent profile.

This table is not designed, at least initially, to store more than just
a profile name and some metadata. This area will be tricky to navigate
moving forward since it would be idea to rely on OSCAL defintions for
profiles, and use OSCAL profiles distributed by standards bodies, and
not maintain them in a service.

This approach is being discussed in issue #84.

@openshift-ci openshift-ci bot requested review from jhrozek and mrogers950 August 3, 2022 21:33
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Aug 3, 2022
@rhmdnd rhmdnd force-pushed the create-profile-table branch from 894c6cc to 8027fdb Compare August 3, 2022 21:39
@@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS profiles (
id uuid PRIMARY KEY,
name VARCHAR(255),
Copy link
Collaborator

Choose a reason for hiding this comment

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

asked a question about a control name in PR 84, from a technical perspective, this looks fine!

Copy link
Owner Author

Choose a reason for hiding this comment

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

I can see dropping the control name, since we can derive it from the profile (if we have a standard catalog of controls using something like OSCAL).

But for the profile, this would be a little more difficult. Because we don't want to store the entire catalog in our database (at least not yet), but we want to reference the controls in an OSCAL file. How would we link the profile here to that file?

One option would be to add a table with a text field that just stores the entire OSCAL catalog in JSON. Then we link the profile to the catalog and render the controls from the catalog.

For example, the NIST SP 800-53 is 8.7M, which should fit within a TEXT column.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oops, sorry, I guess I commented on the wrong PR. I agree that the profile should have a name. The PR looks good, I can either ack it right away or wait for @Vincent056 to chime in.

@rhmdnd rhmdnd force-pushed the create-profile-table branch from 8027fdb to 58271de Compare August 4, 2022 17:34
@rhmdnd
Copy link
Owner Author

rhmdnd commented Aug 4, 2022

/hold

@rhmdnd
Copy link
Owner Author

rhmdnd commented Aug 4, 2022

/hold cancel

This commit adds a table for profiles so that we can reference controls,
and results to a parent profile.

This table is not designed, at least initially, to store more than just
a profile name and some metadata. This area will be tricky to navigate
moving forward since it would be idea to rely on OSCAL defintions for
profiles, and use OSCAL profiles distributed by standards bodies, and
not maintain them in a service.

This approach is being discussed in issue #84.

Fixes #32
@rhmdnd rhmdnd force-pushed the create-profile-table branch from 4b57721 to ed22900 Compare August 4, 2022 17:41
Copy link
Collaborator

@Vincent056 Vincent056 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 4, 2022
@openshift-ci openshift-ci bot merged commit f3d84f2 into main Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants