diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED index c6f78680ca5e0e289d02569e66a181c4383a9d3c..6a7e8b004ff51e3cab1ffa777793da8ccc8dc190 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED @@ -52,6 +52,7 @@ DataResultViewerThumbnail.sortLabel.textTemplate=Sorted by: {0} DataResultViewerThumbnail.thumbnailSizeComboBox.large=Large Thumbnails DataResultViewerThumbnail.thumbnailSizeComboBox.medium=Medium Thumbnails DataResultViewerThumbnail.thumbnailSizeComboBox.small=Small Thumbnails +MultiUserSettingsPanel_Close_Case_To_Modify=Close case to modfy settings OptionsCategory_Name_General=Application OptionsCategory_Keywords_General=Autopsy Options HINT_DataContentTopComponent=This is a DataContent window diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java index 65c447c7afd4a186278a12e38ad50eef652b49ff..2556674e01cd3b56ddff2017f445a830afaa3182 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanel.java @@ -32,13 +32,17 @@ import org.sleuthkit.autopsy.events.MessageServiceConnectionInfo; import org.sleuthkit.autopsy.coreutils.Logger; import java.awt.Cursor; +import java.beans.PropertyChangeEvent; import java.io.IOException; +import java.util.EnumSet; import java.util.logging.Level; import javax.swing.ImageIcon; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import org.openide.util.ImageUtilities; import org.openide.util.Lookup; +import org.openide.util.NbBundle.Messages; +import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coordinationservice.utils.CoordinationServiceUtils; import org.sleuthkit.autopsy.core.UserPreferencesException; import org.sleuthkit.autopsy.coreutils.PlatformUtil; @@ -159,6 +163,11 @@ public MultiUserSettingsPanel(MultiUserSettingsPanelController theController) { goodIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/good.png", false)); badIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/bad.png", false)); enableMultiUserComponents(textBoxes, cbEnableMultiUser.isSelected()); + + Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> { + //disable when case is open, enable when case is closed + load(evt.getNewValue() != null); + }); } /** @@ -806,7 +815,11 @@ private void bnTestZKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS } }//GEN-LAST:event_bnTestZKActionPerformed - void load() { + @Messages({ + "MultiUserSettingsPanel_Close_Case_To_Modify=Close case to modfy settings" + }) + + void load(boolean caseOpen) { lbTestDatabase.setIcon(null); lbTestSolr8.setIcon(null); lbTestSolr4.setIcon(null); @@ -845,7 +858,13 @@ void load() { bnTestMessageService.setEnabled(false); cbEnableMultiUser.setSelected(UserPreferences.getIsMultiUserModeEnabled()); - this.valid(); // trigger validation to enable buttons based on current settings + + // When a case is open, prevent the user from changing + // multi-user settings. + cbEnableMultiUser.setEnabled(!caseOpen); + enableMultiUserComponents(textBoxes, cbEnableMultiUser.isSelected() && !caseOpen); + + this.valid(caseOpen); // trigger validation to enable buttons based on current settings } private void populateSolrAndZkSettings() { @@ -1096,11 +1115,15 @@ && arePropsEqual(a.getPort(), b.getPort()) * * @return true if it's okay, false otherwise. */ - boolean valid() { - tbOops.setText(""); - + boolean valid(boolean caseOpen) { + if(caseOpen) { + tbOops.setText(Bundle.MultiUserSettingsPanel_Close_Case_To_Modify()); + } else { + tbOops.setText(""); + } + if (cbEnableMultiUser.isSelected()) { - return checkFieldsAndEnableButtons() + return checkFieldsAndEnableButtons(caseOpen) && databaseSettingsAreValid() && indexingServerSettingsAreValid() && messageServiceSettingsAreValid(); @@ -1115,7 +1138,7 @@ && indexingServerSettingsAreValid() * * @return True or false. */ - boolean checkFieldsAndEnableButtons() { + boolean checkFieldsAndEnableButtons(boolean caseOpen) { boolean result = true; boolean dbPopulated = databaseFieldsArePopulated(); @@ -1125,15 +1148,15 @@ boolean checkFieldsAndEnableButtons() { boolean messageServicePopulated = messageServiceFieldsArePopulated(); // PostgreSQL Database - bnTestDatabase.setEnabled(dbPopulated); + bnTestDatabase.setEnabled(dbPopulated && !caseOpen); // Solr Indexing - bnTestSolr8.setEnabled(solr8Populated); - bnTestSolr4.setEnabled(solr4Populated); - bnTestZK.setEnabled(zkPopulated); + bnTestSolr8.setEnabled(solr8Populated && !caseOpen); + bnTestSolr4.setEnabled(solr4Populated && !caseOpen); + bnTestZK.setEnabled(zkPopulated && !caseOpen); // ActiveMQ Messaging - bnTestMessageService.setEnabled(messageServicePopulated); + bnTestMessageService.setEnabled(messageServicePopulated && !caseOpen); if (dbPopulated && messageServicePopulated && zkPopulated && (solr8Populated || solr4Populated)) { result = true; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanelController.java b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanelController.java index 212bfa7dcdafbe2230eb68dd3e8857792fde7b9e..536018955ed90062a70cbae5afa18e3b9ce25f11 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanelController.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/MultiUserSettingsPanelController.java @@ -27,6 +27,7 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import java.util.logging.Level; +import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; @OptionsPanelController.TopLevelRegistration(categoryName = "#OptionsCategory_Name_Multi_User_Settings", @@ -43,7 +44,7 @@ public final class MultiUserSettingsPanelController extends OptionsPanelControll @Override public void update() { - getPanel().load(); + getPanel().load(Case.isCaseOpen()); changed = false; } @@ -59,7 +60,7 @@ public void cancel() { @Override public boolean isValid() { - return getPanel().valid(); + return getPanel().valid(Case.isCaseOpen()); } @Override diff --git a/docs/doxygen-user/images/activeMQ_node_cleanup.png b/docs/doxygen-user/images/activeMQ_node_cleanup.png new file mode 100644 index 0000000000000000000000000000000000000000..739d6e6ad75ade25128fffb4101360abd44297eb Binary files /dev/null and b/docs/doxygen-user/images/activeMQ_node_cleanup.png differ diff --git a/docs/doxygen-user/multi-user/installActiveMQ.dox b/docs/doxygen-user/multi-user/installActiveMQ.dox index 07a6f1dcfdc9d2319977692f9e7cbc96eb5c81f5..5cedc7b348e8e4897f046350a67fad8fd9bd8f3e 100644 --- a/docs/doxygen-user/multi-user/installActiveMQ.dox +++ b/docs/doxygen-user/multi-user/installActiveMQ.dox @@ -24,20 +24,27 @@ If you need the JRE, install it with the default settings. \subsection install_activemq_install_mq ActiveMQ Installation -1. Extract the contents of the ActiveMQ archive folder to a location of your choice, bearing in mind that the files should be in a location that the running process will have write permissions to the folder. A typical folder choice would be similar to <i>C:\\Program Files\\apache-activemq-5.13.3</i>. Typically, it will ask for administrator permission to move the folder. Allow it if required. +<ol> +<li>Extract the contents of the ActiveMQ archive to a location of your choice, bearing in mind that the files should be in a location where the running process has write permissions. A typical folder choice would be similar to <i>C:\\Program Files\\apache-activemq-5.13.3</i>. The system may ask for administrator permission to move the folder. Allow it if required. -2. Edit the <i>conf\\activemq.xml</i> in the extracted folder to add <i>"&wireFormat.maxInactivityDuration=0"</i> to the URI for the _transportConnector_ named _openwire_. Add the text highlighted in yellow below: +<li>Open the <i>conf\\activemq.xml</i> file in the extracted folder in a text editor and make the following changes: +<ul> +<li> Add <i>"schedulePeriodForDestinationPurge="10000""</i> to the _broker_ tag then add <i>"gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000""</i> to the _policyEntry_ tag. This is highlighted in yellow below: + +\image html activeMQ_node_cleanup.png + +<li>Add <i>"&wireFormat.maxInactivityDuration=0"</i> to the URI for the _transportConnector_ named _openwire_. This is highlighted in yellow below: <br><br> \image html maxinactivityduration.PNG <br><br> +</ul> +<li>Install ActiveMQ as a service by navigating to the folder <i>bin\\win64</i>, right-clicking _InstallService.bat_, clicking _Run as administrator_, then click _Yes_. -3. Install ActiveMQ as a service by navigating to the folder <i>bin\\win64</i>, right-clicking _InstallService.bat_, clicking _Run as administrator_, then click _Yes_. - -4. Start the ActiveMQ service by pressing _Start_, type _services.msc_, and press _Enter_. Find _ActiveMQ_ in the list and press the _Start the service_ link. - -5. ActiveMQ should now be installed and configured using the default credentials. +<li>Start the ActiveMQ service by pressing _Start_, type _services.msc_, and press _Enter_. Find _ActiveMQ_ in the list and press the _Start the service_ link. +<li>ActiveMQ should now be installed and configured using the default credentials. +</ol> \subsection install_activemq_test Testing