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

Enable AppArmor #714

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gangaram-tii
Copy link
Contributor

Description of changes

  • Enabled AppArmor
  • AppArmor profiles for Chromium and Firefox
  • AppArmor enabled in chromium-vm along with Chromium profile

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • [] Author has run nix flake check --accept-flake-config and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing

Verify if chromium profile is active inside chromium-vm.
$> sudo aa-status

Do audio and video recording/playback, Google spread sheet editing using Chromium browser.

A brief documentation and test report are available in confluence.

https://ssrc.atlassian.net/wiki/spaces/GA/pages/1187708968/Security#1.-AppArmor%3A

Copy link
Collaborator

@brianmcgillion brianmcgillion left a comment

Choose a reason for hiding this comment

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

The Chrome settings should also be applied to the business VM where it is also running Chrome.

Copy link
Collaborator

@mbssrc mbssrc left a comment

Choose a reason for hiding this comment

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

Hey, many thanks for the PR.

It would be great to add the following information to the documentation:

  • Profile creation: Base profile(s) used, adjustments and reasoning
  • Test information: How did we verify the profiles functionally, and what security testing/analysis did we perform?
    E.g., do we have a list of recent chromium CVEs and a potential analysis of how the confinement measures may have mitigated the impact? This would be a great motivation for using the profiles.
  • Performance impact: Thanks for the figures provided. It's however not entirely clear to me how we ended up with the conclusion.
    Can we add a final table with the testing results, with clear indicator of performance impact of the test case such as "video streaming: ~5-10% overhead during initial load, ~1% during execution, etc."
    Also, it would be helpful to describe the test methodology and tools used, so one can verify the results.

@gangaram-tii
Copy link
Contributor Author

The Chrome settings should also be applied to the business VM where it is also running Chrome.

Done.

@gangaram-tii gangaram-tii changed the title Enable AppArmor Enable AppArmor Aug 15, 2024
@gangaram-tii
Copy link
Contributor Author

Rebased to latest main.

@gangaram-tii gangaram-tii reopened this Aug 15, 2024
@gangaram-tii gangaram-tii temporarily deployed to internal-build-workflow August 15, 2024 21:21 — with GitHub Actions Inactive
@gangaram-tii
Copy link
Contributor Author

Hey, many thanks for the PR.

It would be great to add the following information to the documentation:

* Profile creation: Base profile(s) used, adjustments and reasoning

Updated the page on Confluence.

* Test information: How did we verify the profiles functionally, and what security testing/analysis did we perform?
  E.g., do we have a list of recent chromium CVEs and a potential analysis of how the confinement measures may have mitigated the impact? This would be a great motivation for using the profiles.

We did testing to verify if the rules in profile are behaving as per our expectation. Security analysis report is available here.

* Performance impact: Thanks for the figures provided. It's however not entirely clear to me how we ended up with the conclusion.
  Can we add a final table with the testing results, with clear indicator of performance impact of the test case such as "video streaming: ~5-10% overhead during initial load, ~1% during execution, etc."
  Also, it would be helpful to describe the test methodology and tools used, so one can verify the results.

Updated the test report and created a conclusion table.
Will upload scripts I used to take performance data.

@Mic92
Copy link
Collaborator

Mic92 commented Sep 18, 2024

Upstream fixes has been merged.

@mbssrc mbssrc added the Needs Testing CI Team to pre-verify label Oct 2, 2024
@gangaram-tii gangaram-tii temporarily deployed to internal-build-workflow October 9, 2024 05:40 — with GitHub Actions Inactive
@gangaram-tii gangaram-tii temporarily deployed to internal-build-workflow October 9, 2024 07:51 — with GitHub Actions Inactive
@gangaram-tii gangaram-tii temporarily deployed to internal-build-workflow October 10, 2024 11:23 — with GitHub Actions Inactive
@tiiuae tiiuae deleted a comment Oct 18, 2024
- options to enable Apparmor security
- profile for Chromium and Firefox

Signed-off-by: Ganga Ram <[email protected]>
- Chromium-vm
- Business-vm

Signed-off-by: Ganga Ram <[email protected]>
@barnabakos
Copy link
Collaborator

2 commits up to: b07c0cf
rebased to current tip of Ghaf main without conflicts: 5d5ae6d

platform: Lenovo X1 Carbon; flash script; USB SSD

  • ci-test-automation suite: ok
  • starting apps: ok
  • regression / ad-hoc testing: ok

works:

  • AppArmor profile is active inside chromium-vm & business-vm
  • audio and video recording/playback

notes:

  • N/A

issues:

  • cannot save files to "Unsafe share" from Chromium and Trusted Browser
    unsafe_share

@barnabakos barnabakos added bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR and removed Needs Testing CI Team to pre-verify labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants