Commit Graph

53 Commits

Author SHA1 Message Date
Chris PeBenito
ad28e76a15 apol: Fix tab field error exception to not override built-in TabError. 2016-07-09 12:06:12 -04:00
Chris PeBenito
3211062ac2 apol: Change workspace save to collect all error messages before stopping. 2016-07-04 07:43:19 -04:00
Chris PeBenito
cf2adac95b ApolMainWindow: Adjust save tab error messages. 2016-07-03 13:39:01 -04:00
Chris PeBenito
0712651b3d apol: Add TabError exception for tab save errors.
Also fix error message in workspace save error message.
2016-07-03 10:02:39 -04:00
Chris PeBenito
09bca896da ApolMainWindow: Do not save tab/workspace if there are errors.
Tabs should raise RuntimeError in save() if they have criteria errors.

For  and .
2016-07-01 22:14:35 -04:00
Chris PeBenito
a82be1fbdb apol: Improve tab loading error handling.
Add explicit type conversions so the Qt C++ code always gets the expected
type.  Add additional handlers to catch the exceptions and provide better
error messages.
2016-06-26 11:05:20 -04:00
Chris PeBenito
7b2c99cbfe apol: Implement core save/load tabs and workspace functions.
Still needs funtions on each individual tab for saving/loading settings.

Related to  and .
2016-06-01 12:55:50 -04:00
Chris PeBenito
2828db4a64 apol: Implement help menu
Populate with some help text from setools3.

Related to 
2016-04-19 16:03:15 -04:00
Chris PeBenito
edde585e5f apol: Add an "about" dialog 2016-04-19 16:03:15 -04:00
Chris PeBenito
fa32092a3c ApolMainWindow: improve file open/save dialogs 2016-04-15 11:19:17 -04:00
Chris PeBenito
7938a89e0d apol: implement permission map editor
Closes 
2016-04-12 15:02:45 -04:00
Chris PeBenito
256adbbebc apol: implement SummaryTab
Closes 
2016-04-10 10:46:34 -04:00
Chris PeBenito
ce347e4537 ChooseAnalysis: revise design to support switching MLS on/off
Due to the previous design, if the user loaded several policies with
different MLS on/off settings, the MLS-only analyses would continue
to appear, even if MLS was not enabled in the policy.

Also revise to override QDialog accept and show methods to bring in line
with typical design.
2016-04-08 13:30:01 -04:00
Chris PeBenito
91046e8ddb apol: move ChooseAnalysis to its own module 2016-04-08 11:47:37 -04:00
Chris PeBenito
2b6b35e558 ApolMainWindow: change tab creation to put analysis widget in directly
No need to put an empty widget in.
2016-04-08 09:48:03 -04:00
Chris PeBenito
f1a8077f79 apol: implement common query tab
Closes 
2016-04-05 15:00:05 -04:00
Chris PeBenito
27bc09c0e3 apol: Implement constraint tab
Closes 
2016-04-05 13:37:55 -04:00
Chris PeBenito
884480f8c4 apol: implement object class query
Closes 
2016-04-04 13:59:35 -04:00
Chris PeBenito
729ba7ded7 apol: implement nodecon query tab
Closes 
2016-04-04 10:36:23 -04:00
Chris PeBenito
e8f756a7ab ChooseAnalysis: fix fs_use_* capitalization 2016-04-04 10:32:26 -04:00
Chris PeBenito
14aa86c99d apol: implement portcon query
Closes 
2016-04-01 10:59:54 -04:00
Chris PeBenito
a158d412db apol: implement netif query
Closes 
2016-04-01 09:06:37 -04:00
Chris PeBenito
807efb1e10 ApolMainWindow: handle closing the policy
* Close all tabs when closing the policy
* Close the policy if using the "open policy" action and policy load
  succeeds.
* Warn the user the above actions will close analysis tabs
  (if any tabs are open)
* Set analysis widgets to delete on close since widgets are not deleted
  by QTabWidget.clear() or .removeTab()
2016-03-31 11:34:27 -04:00
Chris PeBenito
95ecdf492a apol: implement initial SID query tab
Closes 
2016-03-31 09:06:20 -04:00
Chris PeBenito
8f907fe0f0 ApolMainWindow: revise policy and permmap loading for status messages
Revise ordering of initialization so log messages about permisison map and
policy loading can be seen on the status bar.  Also fix exception handling
so a failure loading the policy specified on the CLI is handled.
2016-03-30 13:47:20 -04:00
Chris PeBenito
c6198c4fed apol: switch to new tabs 2016-03-30 11:00:40 -04:00
Chris PeBenito
21c70d5b74 apol: implement GenfsconQueryTab
Closes 
2016-03-30 10:43:54 -04:00
Chris PeBenito
c85d67f9e2 apol: implement fs_use_* query.
Closes 
2016-03-30 08:34:09 -04:00
Chris PeBenito
b1c6652de0 apol: implement type attribute query tab.
Closes 
2016-03-29 10:56:07 -04:00
Chris PeBenito
8f3a54eb37 apol: implement Boolean query tab.
Closes 
2016-03-29 09:12:05 -04:00
Chris PeBenito
fbee99a747 Implement TypeQueryTab.
Closes 
2016-03-16 08:47:55 -04:00
Chris PeBenito
8e5b4bc604 Implement RoleQueryTab
Closes 
2016-03-14 12:38:30 -04:00
Chris PeBenito
56b436fde6 ChooseAnalysis: show MLS-only tabs on MLS policies only. 2016-03-11 09:57:27 -05:00
Chris PeBenito
3434618aef LogHandlerToSignal: set default formatter and INFO level in __init__. 2016-03-11 09:00:20 -05:00
Chris PeBenito
6c2acc3fdd Rename LogToSignalHandler to LogHandlerToSignal. 2016-03-07 13:40:37 -05:00
Chris PeBenito
3f4630c6f9 apol: use INFO logs to update status displays
Connect all setools and setoolsgui INFO+ messages and display them on
the statusbar.

Use each tab's analysis/query INFO+ messages and display them on the
"busy" status dialog box.
2016-03-07 12:04:08 -05:00
Chris PeBenito
6a4cbf20d5 apol: log INFO messages to the status bar
Still keep the CLI messaging controlled by -v or --debug switches. For some
reason, the root logging had to be DEBUG for this to work, and
only as initialized by basicConfig.  Setting a NullHandler to DEBUG level
didn't work either.
2016-03-04 14:05:20 -05:00
Chris PeBenito
c017bd7cfa Apply logging best practices.
* Use __name__ for the logger name
* Add top-level library NullHandlers
2016-03-04 13:49:03 -05:00
Chris PeBenito
d7e8cf0701 apol: connect copy/paste menu options 2016-03-02 08:19:07 -05:00
Chris PeBenito
5cfab15fd7 apol: Add ctrl+w keyboard shortcut to close the current tab.
Also move the action definitions to apol.ui.
2016-03-01 13:41:29 -05:00
Chris PeBenito
16e03a3960 Implement UserQueryTab
Closes 
2016-02-25 10:03:20 -05:00
Chris PeBenito
f89f875a62 ChooseAnalysis: Sort analysis options 2015-12-15 09:17:07 -05:00
Chris PeBenito
cf7b0789ba apol: add MLS rule query 2015-12-15 08:51:14 -05:00
Chris PeBenito
6c702179c4 apol: add RBAC rule query
RuleResultModel: give up trying to have a parent class. Remove.
2015-12-15 08:04:01 -05:00
Chris PeBenito
cff5de89e6 apol: add domain transition analysis tab 2015-12-14 09:53:59 -05:00
Chris PeBenito
d8f69d912f InfoFlowAnalysisTab: initial implementation
Does not yet include graphical results.
2015-06-30 11:06:59 -04:00
Chris PeBenito
0caa0de8a4 ChooseAnalysis: only display implemented analyses as options.
Make it clear for early users of the tool that only some analyses are
implemented in the GUI so far.
2015-06-24 14:24:39 -04:00
Chris PeBenito
72530ff531 ApolMainWindow: Implement renamable tabs.
Tab renaming methods:
* double click the tab
* context menu on tab bar

Also:
* change initial tab name to include a number based on the total number
of tabs that have been opened.
* add tool tip to tab of the analysis type.
* add explicit close tab function to ensure analysis widgets are deleted.
2015-06-16 16:02:11 -04:00
Chris PeBenito
f3617938a7 Change loading retry to work on Python 2 consistently
In Python 2, ENOENT was an IOError exception.  In Python 3, IOError was
merged into OSError.
2015-06-15 14:14:26 -04:00
Chris PeBenito
9df420ad70 ApolMainWindow: misc enhancements
1. add icons for opening policy and new analysis
2. add shortcuts for copy, cut, paste
3. add filename to apol main window title
4. fix file chooser bug for selecting a policy.
5. improved handling where new analysis is started w/o open policy
2015-06-08 10:58:12 -04:00