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 the daemon config UI #909

Merged
merged 22 commits into from
Sep 26, 2023
Merged

Add the daemon config UI #909

merged 22 commits into from
Sep 26, 2023

Conversation

egbicker
Copy link
Contributor

@egbicker egbicker commented Sep 11, 2023

Adds the user interface components for fapolicyd configuration editing and deployment.

Closes #830

@egbicker
Copy link
Contributor Author

@jw3 I'm trying to implement the ConfigChangeset but even after rebuilding the rust layer I'm still getting AttributeError: module 'fapolicy_analyzer' has no attribute 'ConfigChangeset'

@jw3
Copy link
Member

jw3 commented Sep 12, 2023

@jw3 I'm trying to implement the ConfigChangeset but even after rebuilding the rust layer I'm still getting AttributeError: module 'fapolicy_analyzer' has no attribute 'ConfigChangeset'

I missed a registration call in #908. #910 adds it and adds an example config changest usage.

@jw3
Copy link
Member

jw3 commented Sep 18, 2023

✔️ Deployment nearly working, needs #911


There is also something going on that causes the unsaved rule changes dialog to always pop up, even when no rules have been edited.

@jw3
Copy link
Member

jw3 commented Sep 18, 2023

@egbicker do you have tests coming for the new stuff?

@egbicker
Copy link
Contributor Author

@jw3 Just got them pushed


try:
Copy link
Member

Choose a reason for hiding this comment

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

Whats going on here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's trying to load the changeset data and now we have 2 Changeset that return as string and the RuleChangeset has additional exceptions in the rust layer (I think its something about having 0 rules)

Copy link
Member

Choose a reason for hiding this comment

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

I was wondering about the nesting of the second try. Was that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was but not like that. Good catch.

Copy link
Member

@jw3 jw3 left a comment

Choose a reason for hiding this comment

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

This is looking pretty good. A few things

  • Noted the nested exception handling above for clarification
  • I still saw the unsaved rule notification, but that looks like a problem with the rules view state management Text editor state issues #912
  • Can a summary of config changes be added to this view? What bindings do we need added for this?
    image

@jw3
Copy link
Member

jw3 commented Sep 19, 2023

Added #912 describing some related concerns. Doesnt have to be fixed for this PR, but could be if simple enough.

Another thought with this is that the unsaved rule edit check would apply to config as well.

@egbicker
Copy link
Contributor Author

@jw3 I believe we'd need a binding like rules_difference

@jw3 jw3 mentioned this pull request Sep 21, 2023
@jw3
Copy link
Member

jw3 commented Sep 21, 2023

#913 is on the way

jw3 added a commit that referenced this pull request Sep 21, 2023
Add a binding function for diffing the configuration between two system
configurations.

The initial implementation here is for API and basic functionality to
support #909. There are improvements that will follow to eliminate false
positives.
@jw3 jw3 changed the title Config Initial UI Daemon Config UI Sep 26, 2023
@jw3 jw3 changed the title Daemon Config UI Add the daemon config UI Sep 26, 2023
@jw3 jw3 merged commit ed29903 into ctc-oss:master Sep 26, 2023
@jw3 jw3 added this to the v1.2 milestone Sep 26, 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.

Add GUI support for managing fapolicyd.config
2 participants