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

Menu item for fapolicyd trust sync #675

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

egbicker
Copy link
Contributor

@egbicker egbicker commented Dec 6, 2022

Menu option to force fapolicyd to refresh the trust database.

Calls signal_trust_reload to write the reload signal to the fifo pipe.

Closes #634

@jw3
Copy link
Member

jw3 commented Dec 6, 2022

I'll add a binding to sync the fapolicyd backend.

There used to exist a function to reload trust by writing the fapolicyd pipe, it was removed in #548. The logic will be similar, binding only probably.

@jw3
Copy link
Member

jw3 commented Dec 7, 2022

Binding has been merged to master, signal_trust_reload

https://github.com/ctc-oss/fapolicy-analyzer/blob/master/crates/pyo3/src/trust.rs#L166

@egbicker egbicker linked an issue Dec 8, 2022 that may be closed by this pull request
@egbicker
Copy link
Contributor Author

egbicker commented Dec 8, 2022

@jw3 I'm having some issues replicating the issue. Where you installing the RPM while the application was running and which RPM were you trying to insatll?

@jw3
Copy link
Member

jw3 commented Dec 12, 2022

@egbicker I've saw this sporadically while reinstalling our app and messing with the fapolicyd install and trust database, but no solid reproducer is known. I was thinking the tdb util could help to set up testing.. but it cant quite tweak the db the way it needs to recreate this. Nevertheless, the function is general enough that we dont need to fix anything to need to implement it.

One addition from the additional discussion: we need to pop up a confirmation dialog after this that says we need to restart the application to see the changes. If you have the ability to gracefully exit the application from that dialog, from say a "Restart now" button, then great. Otherwise just make it an Ok button and they can restart at their leisure.

@dorschs57 FYI this action is eventually going to expand, but is blocked until after the trust loading stuff evolves to fix the latency issues. When there is a mechanism that loads trust in the background and signals the frontend of changes, then this will leverage that to reload the System trust after this refresh trust function completes.

@jw3 jw3 changed the title Database Sync Menu item for fapolicyd trust sync Dec 16, 2022
@jw3 jw3 added enhancement New feature or request trust labels Dec 16, 2022
fapolicy_analyzer/ui/main_window.py Outdated Show resolved Hide resolved
fapolicy_analyzer/ui/main_window.py Show resolved Hide resolved
@jw3 jw3 marked this pull request as draft January 16, 2023 15:29
@egbicker
Copy link
Contributor Author

@jw3 what's missing here?

@jw3
Copy link
Member

jw3 commented Feb 1, 2023

@jw3 what's missing here?

We are going to wait on #750 and see how this integrates with that.

  1. Signal fapolicyd to reload trust db
  2. Resync our trust views with disk

@jw3 jw3 added this to the v1.1 milestone Mar 2, 2023
@jw3
Copy link
Member

jw3 commented Mar 2, 2023

I think this is going to sit until 1.1 where we can integrate this with the async trust load to eliminate the reload after notifying fapolicyd to reload.

@jw3 jw3 modified the milestones: v1.1, v1.2 Jun 24, 2023
@jw3 jw3 removed this from the v1.2 milestone Sep 18, 2023
@jw3 jw3 mentioned this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request trust
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a button to sync trust
3 participants