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

OPA security assessment #275

Merged
merged 1 commit into from
Oct 30, 2019
Merged

Conversation

ashutosh-narkar
Copy link
Collaborator

This change includes the documents related to the OPA self-assessment and OPA recommendations.

Signed-off-by: Ashutosh Narkar [email protected]

Copy link
Member

@ultrasaurus ultrasaurus left a comment

Choose a reason for hiding this comment

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

quick nit: could you please wrap 80 columns, since it's easier to see diffs / comments if there are future changes, see writing style in CONTRIBUTING.md

@ashutosh-narkar
Copy link
Collaborator Author

Done.

quick nit: could you please wrap 80 columns, since it's easier to see diffs / comments if there are future changes, see writing style in CONTRIBUTING.md

Copy link
Member

@ultrasaurus ultrasaurus left a comment

Choose a reason for hiding this comment

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

LGTM!

before merging requires approval from...

@JustinCappos JustinCappos mentioned this pull request Sep 25, 2019
12 tasks
Copy link
Contributor

@lumjjb lumjjb left a comment

Choose a reason for hiding this comment

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

LGTM!


* Pushes to master are forbidden by convention

* OPA is at the passing criteria in the [Core Infrastructure Initiative (CII) badging process](https://bestpractices.coreinfrastructure.org/en/projects/1768)
Copy link
Contributor

Choose a reason for hiding this comment

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

While I concur that OPA's entry in the CII shows passing, I did a review of the detailed requirements per the worksheet here and there were some items I felt might need clarification or supporting details to accurately assert that they are met. That said, I don't think any of them would block this assessment as currently defined.

I would suggest changing the wording to "OPA asserts that it meets the criteria..."

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the wording.

Related Issues: [OPA-1781](https://github.com/open-policy-agent/opa/issues/1781)


### CNCF recommendations
Copy link
Member

Choose a reason for hiding this comment

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

suggestion from @dshaw @pragashj -- for clarification, let's rename: "Recommendations to CNCF"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

for confusion. Examining the language’s potential for confusion and mitigating
situations where these problems arise would help to improve user security.

### Project recommendations
Copy link
Member

Choose a reason for hiding this comment

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

suggestion from @dshaw @pragashj -- for clarification, let's rename: "Recommendations to the project team"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

#### The *input* Document

In some cases, policies require input values. In addition to the built-in data
document,OPA also has a built-in input document. When you query OPA, you can set
Copy link
Contributor

Choose a reason for hiding this comment

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

minor nit, space after ","

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


* The OPA daemon can be configured to authenticate and authorize requests. This
could prove beneficial especially in scenarios where the deployment environment
is untrusted. More details on deploying OPA securely can be found [here](https://www.openpolicyagent.org/docs/latest/security/). Additionally OAuth2.0 client credentials can be used to authenticate
Copy link
Contributor

Choose a reason for hiding this comment

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

this didn't get 80-col wrapped.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

issue.

* Since OPA does not contain any policies by default when started, it’s
recommended that the application fail-open in case of any non-200 response
Copy link
Contributor

Choose a reason for hiding this comment

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

Fail open? Surely it should fail closed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Corrected


### Related Projects / Vendors

* OPA’s policy language REGO, allows policy decisions that are more than
Copy link
Contributor

Choose a reason for hiding this comment

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

for consistent capitalisation should be "Rego".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

This change includes the documents related to the OPA self-assessment and OPA recommendations.

Signed-off-by: Ashutosh Narkar <[email protected]>
Copy link
Collaborator

@JustinCappos JustinCappos left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for all the hard work on this everyone.

@JustinCappos JustinCappos merged commit a741175 into cncf:master Oct 30, 2019
@JustinCappos
Copy link
Collaborator

Merging as JJ recommended

for confusion. Examining the language’s potential for confusion and mitigating
situations where these problems arise would help to improve user security.

### Project recommendations
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we get consequence section for each of the issues? The objective here is to have a follow-through on those consequences - follow through could take one of the forms of workflow to be specified/process to be documented/guidelines to be provided and agreed by community/tools to be built.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to clarify - do you mean examples of known consequences, or just an enumeration of hypothetical consequences? I myself would like to see issues relate to concrete actual known problems that can be drawn from existing forensic analysis of other projects or CVEs, etc. That said, we can't necessarily rely on 20/20 hindsight to anticipate all future problems so I acknowledge the need to allow for unknown unknowns.

from a wide range of adopters ([77 contributors](https://github.com/open-policy-agent/opa/graphs/contributors),
with Chef engineer in top 4 and Google engineer co-authoring RegoV2 specification).

## Summary
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add in Risks as a section to highlight areas of concerns, like for example trade-offs for solving for heterogeneity vs increased surface area of attack (as specified in the SIG Security call)

Copy link
Contributor

Choose a reason for hiding this comment

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

probably an aside to this PR but it would be interesting to plumb deeper into the notion of solving for X vs increased surface area. Is there a theoretical underpinning that requires that solving X always requires an increase in complexity or surface area? If complexity or surface area does go up (whether or not it MUST), is that necessarily a bad thing if compensating controls are in place? ie how to quantify the "breakeven" point on increased risk vs solved risk. anyway, something for another thread to be sure...

from a wide range of adopters ([77 contributors](https://github.com/open-policy-agent/opa/graphs/contributors),
with Chef engineer in top 4 and Google engineer co-authoring RegoV2 specification).

## Summary
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please add in the personas, primary and secondary, as expected to be used. This was brought up by @ckemper67 in the SIG call

Michael-Susu12138 pushed a commit to Michael-Susu12138/tag-security that referenced this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants