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

Controller Component Threat Model #60

Merged
merged 11 commits into from
Sep 27, 2024
Merged

Conversation

ytimocin
Copy link
Contributor

@ytimocin ytimocin commented Aug 9, 2024

Adding the threat model doc for the controller component.

@ytimocin ytimocin force-pushed the ytimocin/threat/controller branch from a9e6911 to 0ae21ad Compare August 9, 2024 22:41
@ytimocin ytimocin force-pushed the ytimocin/threat/controller branch 3 times, most recently from cad2565 to d280848 Compare August 13, 2024 01:53
@ytimocin ytimocin changed the title Adding a folder for threat models and adding the threat model doc for the controller component Adding a template for threat models and the threat model doc for the controller component Aug 13, 2024
Copy link
Member

@brooke-hamilton brooke-hamilton left a comment

Choose a reason for hiding this comment

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

@ytimocin this is excellent! 🚀


#### Data Serialization / Formats

We use custom parsers to parse Radius-related resource IDs and do not use any other custom parsers and instead rely on Kubernetes built-in parsers. Therefore, we trust Kubernetes security measures to handle data serialization and formats securely. The custom parser that parses Radius resource IDs has its own security mechanisms that don't accept anything other than a Radius resource ID.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have an action item to do fuzz-testing on the resource ID.

Custom format + untrusted data -> do fuzz testing.


## Action Items

1. Use a hashing algorithm other than SHA-1 while computing the hash of the configuration of a Deployment object. This is a breaking change because deployments that are already hashed with SHA1 should be redeployed so that reconciler can work as expected.
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a breaking change, we'd just do extra work 😆

1. Use a hashing algorithm other than SHA-1 while computing the hash of the configuration of a Deployment object. This is a breaking change because deployments that are already hashed with SHA1 should be redeployed so that reconciler can work as expected.
2. Check if RBAC with Least Privilege is configured for every component to ensure that each component has only the permissions it needs to function. Make changes to the necessary components if required.
3. Define and implement necessary Network Policies to ensure that communication is accepted only from expected and authorized components. Regularly review and update these policies to maintain security.
4. Containers should run as a non-root user wherever possible to minimize the risks. Check if we can run any of the Radius containers as non-root. Do the necessary updates.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer that these "review" items be handled as part of the threat model review.

For example:

Check if RBAC with Least Privilege is configured for every component to ensure that each component has only the permissions it needs to function.

The threat model is the right place for us to define the "permissions each component needs to function". It doesn't make sense to push this work out of the threat model.


Containers should run as a non-root user wherever possible to minimize the risks. Check if we can run any of the Radius containers as non-root.

This is just scratching the surface in terms of policies applied to our components 😆. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/#policy-instantiation

@ytimocin ytimocin force-pushed the ytimocin/threat/controller branch from 8e36962 to b945030 Compare September 27, 2024 19:52
@ytimocin ytimocin merged commit 8578acf into main Sep 27, 2024
2 checks passed
@ytimocin ytimocin deleted the ytimocin/threat/controller branch September 27, 2024 19:58
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.

9 participants