Commit Graph

493 Commits (a61caa3a6a541e6f9761ae99c033c7457050bc0b)

Author SHA1 Message Date
Steve Clement e26e4a2e92 Merge branch '2.4' into py-virtualenv 2018-10-08 07:45:04 +08:00
iglocska cea4f857bb fix: [ReST] increased ReST client execution time to 300s 2018-10-03 08:00:04 +02:00
Steve Clement 51a3a5cdbf chg: [python] Added and amended varios places where python is called 2018-09-28 14:59:26 +02:00
iglocska 0123f23739 fix: [sync] Fixed some issues throwing notices when pulling 2018-09-09 15:55:42 +02:00
iglocska 1ab8a4e710 fix: [REST client] baseurl can now be set optionally in the url 2018-09-07 13:46:37 +02:00
iglocska 780cc86ca8 new: [REST client] added the api enumeration to the rest client view 2018-09-05 07:43:49 +02:00
iglocska a27a5efd26 fix: [REST client] resolved issues with the URL builder for the REST queries causing double "/"s after the baseurl 2018-09-03 17:57:05 +02:00
iglocska 17e538be05 Merge branch '2.4' of github.com:MISP/MISP into 2.4 2018-09-01 23:53:39 +02:00
iglocska c91f1a5412 new: [REST client] Resolve urls and show API description if applicable 2018-09-01 23:53:03 +02:00
iglocska 84a146ea2c new: [REST client] Allow skipping SSL validation 2018-08-31 17:48:51 +02:00
iglocska a732cb4102 fix: [REST client] Fixed the url parser for the client not handling named params 2018-08-31 13:19:02 +02:00
iglocska 16f7ac960d fix: [merge conflict] added merge conflict resolution 2018-08-23 07:35:36 +02:00
iglocska 2a10276d07 Merge branch '2.4' into feature/api_rework 2018-08-22 17:39:56 +02:00
iglocska 113fa25471 new: [API] exposed the server related functionalities to the API
- server index
- server push
- server pull

- improved logging / error reporting of the sync functionalities
2018-08-22 17:00:13 +02:00
iglocska b407aba746 fix: [CS] Updated recent changes 2018-08-20 10:50:09 +02:00
iglocska 0694263e15 Merge branch '2.4' into feature/api_rework 2018-08-09 16:51:20 +02:00
iglocska 635be01f49 fix: [rest client] corrected the calculation of the rest client duration
- I can't maff gud
2018-08-08 13:31:08 +02:00
iglocska c8fcb16881 new: [feature] Built in REST client added to test / interact with the API directly from MISP
- no more shitty chrome extensions that crash during trainings, rejoice!
2018-08-08 11:29:38 +02:00
iglocska 9c755af7f7 chg: [cleanup] Removed unused view variable 2018-08-03 20:01:47 +02:00
iglocska c4500c15f0 fix: [sync] Fixed buggy connection test
- refactor revealed that the sync user access on the remote was never correctly determined
- fallback method that has since been removed for 2+ year old instances was always used due to the above issue
2018-08-03 19:20:00 +02:00
iglocska a81894f14c chg: [CS] Changed to PSR-2
- to make contributions easier, adopted PSR-2
- used php-cs-fixer to rework the style
- *sniff sniff* Goodbye tab indentation
2018-07-19 11:48:22 +02:00
iglocska 248439f6fb fix: [python3] Missed python3 call instead of python 2018-07-12 16:19:01 +02:00
iglocska 59b17b5af6 new: [sync] Added flag to avoid using the proxy
- in some cases you have internal sync between instances in which case going through the proxy is silly
2018-07-02 16:56:50 +02:00
iglocska 2aaf2c54c4 chg: [diagnostics] Make the STIX diagnostics a bit less cryptic 2018-06-22 09:34:56 +02:00
iglocska a930fdeaeb new: [i18n] Added tools to switch between languages via the server settings 2018-06-20 15:11:43 +02:00
iglocska 214df94bda chg: [i18n] Made the strings more i18n friendly across the application 2018-06-20 12:56:53 +02:00
chrisr3d 009dac1e43
add: [Diagnostic] Added maec python library requirements 2018-06-11 16:27:13 +02:00
iglocska ba5b5447f4 fix: Added missing lookup for pymisp versions via the diagnostics 2018-05-31 14:34:00 +02:00
iglocska 1dae56527f fix: Fixed editing servers to add a server certificate not saving said certificate 2018-05-18 10:03:50 +02:00
iglocska 68b8266584 new: New flash message system, fixes #3252
- 3 types of flash messages (success, error, warning)
- uses bootstrap's own classes/structure
2018-05-16 19:32:38 +02:00
iglocska 39f66eb868 fix: Restart the workers due to the new cakephp version causing issues 2018-05-09 09:15:18 +02:00
Sami Mokaddem 680311f68f chg: [Controllers] sets the ajax variable globally
As well as removing useless set in controllers and accessing it instead
of passing through the request.
2018-05-07 14:44:59 +00:00
iglocska 5e77af9cb0 fix: Fixed a bug that prevented servers from being added 2018-05-04 12:36:33 +02:00
iglocska 2cf4dfbafa fix: Allow "json" not to be set when adding a server via the API 2018-04-29 01:58:23 +02:00
iglocska 728c8bbb1d fix: Fixed /servers/add via REST API not working, fixes #3202
- corrected list of parameters
- added sane defaults so that only the minimum list of fields is actually required
- fixed a bunch of stuff that was just plain broken with this API
2018-04-28 21:53:29 +02:00
iglocska f60b16df0f chg: Changed the parameter order for the push server shell 2018-04-16 07:59:01 +02:00
StefanKelm 76deac9ca2
Update ServersController.php 2018-03-27 15:42:21 +02:00
iglocska d20e04ae6c fix: Fixed command execution for site admins
- a server setting allowing the override of the path variable for esoteric RHEL systems allowed site admins to inject arbitrary commands
- impact was limited by the setting being only accessible to the site administrator

- as reported by Michael Grolimund from Swiss Post (@grolinet)

- CVE-2018-6926
2018-02-12 17:58:47 +01:00
iglocska 42df9e36f3 fix: Fixed an issue with opcache not being used yet opcache_reset() being called, fixes #2727 2017-12-12 18:38:31 +01:00
Jan Skalny 084a3eb3ba fix: refresh rows in settings editor 2017-11-22 15:58:47 +01:00
iglocska 3ba6636bd5 new: change server settings via the API
Usage:

Viewing current setting value:

GET /servers/serverSettingsEdit/[mysetting]
Accept: application/json
Content-type: application/json
Authorization: [mykey]

Altering setting value:

POST /servers/serverSettingsEdit/[mysetting]
Accept: application/json
Content-type: application/json
Authorization: [mykey]
Body: {"value":"My new value"}

As a reminder, get all settings and diagnostics via:

GET /servers/serverSettings/download
Accept: application/json
Content-type: application/json
Authorization: [mykey]
2017-09-21 12:10:22 +02:00
iglocska d77ba1ddba new: Added objects to object preview 2017-09-13 13:53:40 +02:00
iglocska 470b7e5524 new: Added diagnostics for the new attachment tools 2017-09-08 10:31:02 +02:00
iglocska 952fff6252 fix: Fixes to several cases of reflected XSS, fixes #2381
- as reported by @import-au

- Additionally enforce content-type on all async APIs called by the UI using CakeResponse
2017-08-08 21:37:03 +02:00
iglocska 78f07139bd chg: Redacted certain server settings that could be considered sensitive
- Encryption passwords as well as redis password are now redacted from the server settings
- Also includes the JSON dump of the server settings

- Thanks to cert.govt.nz for the security report.
2017-07-12 15:49:39 +02:00
Kevin Allix f612f0c627 allow a setting to NOT define a 'test' function 2017-07-04 12:13:10 +02:00
iglocska d5a8e266e4 fix: Added missing ServersController.php change that populates $php_ini
- faildev forgot to commit the file
2017-06-28 15:44:28 +02:00
iglocska 57857c3a32 new: Performance improvements for the pub-sub modules
- Only load and open connection to redis for the pub-sub connection once.
- Massive performance boost when the ZMQ functionality is enabled
2017-06-16 08:41:12 +02:00
Richard van den Berg 7b18dc19bb Also test for mixbox version 2017-05-19 15:22:48 +02:00
iglocska 314daa4551 new: Add instance uuid 2017-05-11 10:49:23 +02:00
Ángel González 926895733b Cosmetic changes
Change space indents to tabs
Remove ?> at end of file
Add or remove some indentation where appropriate
2017-05-08 00:45:57 +02:00
iglocska 9ccdc579a6 new: New module type: Cortex
- similar to Enrichment modules except for not having the options to run hover
2017-05-03 13:13:36 +02:00
devnull- 9835b8932f Merge branch '2.4' into issues_1643 2017-04-27 10:04:32 +02:00
iglocska e3eaeed6f5 fix: Added fallback for getallheaders() missing for some systems 2017-04-12 14:17:43 +02:00
iglocska 3fbfe08f87 new: Added a POST server connection test
- hopefully it should help debug some issues
2017-03-23 11:52:07 +01:00
iglocska 84e4a62aba new: Update MISP from the diagnostics page
- right now it's pretty dumb, it simply pulls the same branch that the current user is on
- Any failure is shown but not acted upon, if the git pull fails the user will see it but it needs to be resolved via the command line
2017-03-23 10:01:29 +01:00
Sebastien Quioc 2dcc704bb9 feature: Adds the api support to ServersController to edit servers 2017-02-23 15:00:19 +01:00
Sebastien Quioc 4aba3518fe refactor(controllers): adds checks for input parameters before editing a server 2017-02-23 15:00:09 +01:00
Sebastien Quioc 6b0895dc66 feature: Adds the api support to ServersController to add new servers 2017-02-23 14:59:47 +01:00
devnull- f24682f86a Merge branch '2.4' into issues_1643 2017-02-16 21:49:45 +01:00
Iglocska ffd087ba38 fix: Added a warning if utf8 encoding isn't set up in the database config
- also, changed the default database config to enforce utf8
2017-01-19 16:40:23 +01:00
iglocska 2b187d48fc new: Add a new api to check the supported PyMISP version 2017-01-08 20:20:49 +01:00
devnull- 4795c86295 Quick & Dirty 'without_email' & 'Unpublish_event' options for Sync Server 2017-01-05 16:43:22 +01:00
Iglocska 396ab8046f fix: Fix empty space issues with server settings
- on input trim the string
- on the not empty check, first trim the string to warn users about existing issues
2017-01-02 16:32:11 +01:00
Iglocska 354df29301 chg: Added more information to the diagnostics download 2016-11-30 18:10:58 +01:00
Iglocska 6df592b6e0 fix: Fixed an issue where the diagnostics complained about STIX not being installed if the stixtest.py was not readable 2016-11-27 11:39:03 +01:00
Iglocska 28dfc401d0 new: Added checks for the loaded php extensions, fixes #1672
- Diagnosing not loaded extensions was a nightmare
- New system checks the loaded extensions via php and php-cli (could help with un****ing some RHEL/CentOS issues)
- Version check for the php-cli php version added

- only one extension is checked currently, to be updated at a later point in time (remember to also update the web and the cli extension list!)
2016-11-19 15:16:14 +01:00
Iglocska 0e015b8b26 fix: removed test code 2016-10-31 20:26:18 +01:00
Iglocska 2e682189e1 fix: Fixed an issue where pushing events worked even if the remote user wasn't a sync user 2016-10-31 20:25:38 +01:00
Andras Iklody 276257c16c Merge pull request #1578 from rotanid/cleanup
Cleanup
2016-10-29 20:00:58 +02:00
Iglocska 77a0efdc54 fix: Small fix to the worker start script 2016-09-30 10:24:13 +02:00
Andreas Ziegler e59d42ed2a chg: remove obsolete variables 2016-09-28 03:55:48 +02:00
Iglocska f7c347f9a4 fix: sort server preview events by timestamp, fixes #1558 2016-09-23 15:17:01 +02:00
Andreas Ziegler 9604af90e8 fix: issue resulting from references removal, #1501, 25e52a6 (#1544) 2016-09-18 16:43:09 +02:00
Andreas Ziegler 25e52a6786 chg: remove some references to variables 2016-09-15 17:08:58 +02:00
iglocska 80ed1cf65d fix: Removed filename check from the AppController
- rerouted all calls to the method to the Model equivalent
2016-09-01 09:18:54 +02:00
iglocska 0cd7d8c072 fix: invalid indeces used for the MISP.host_org_id setting 2016-08-31 11:54:56 +02:00
iglocska 48d46c1b0c fix: Fixes to the internal server setup
- Only allow enabling internal mode if the host organisation is set and it is chosen as the remote organisation when adding the server sync
- This ensures that internal sync only happens when the same organisation owns both instances
2016-08-28 21:56:56 +02:00
iglocska cdf890cfc6 fix: Some minor fixes to the client_certs for the sync to align it with the other upstream changes 2016-08-28 21:37:28 +02:00
iglocska 5a72f84c22 Merge branch '2.4' into 2.4.51 2016-08-28 21:08:02 +02:00
iglocska e013d6429d new: Simple diagnostic tool for the modules added 2016-08-25 17:42:46 +02:00
iglocska 873b201eb0 Merge branch '2.4' of https://github.com/MISP/MISP into 2.4 2016-08-25 11:38:59 +02:00
iglocska 822b0bf8fa chg: Cleanup of the controllers and models
- removed incorrect, useless boiler plate comments
- kept useful comments intact
- added some missing line breaks to make the codebase a bit more uniform
- removed some obviously obsolete TODO comments
2016-08-25 11:38:37 +02:00
Andreas Ziegler e8599fb16c chg: new filename regex & separate functions 2016-08-24 15:31:17 +02:00
Andreas Ziegler eb66a80c76 chg: filename regex changes 2016-08-24 02:35:04 +02:00
Andreas Ziegler cffcfa81d7 chg: remove whitespace (space/tab) from empty lines 2016-08-22 02:52:51 +02:00
iglocska 3c0f3fb8bb Merge branch '2.4' into 2.4.51 2016-08-21 22:59:30 +02:00
Andreas Ziegler f0905dc536 chg: rename FileAccess to FileAccessTool
every other tool classes name in the Lib/Tools/ folder also ends with "Tool"
2016-08-19 19:25:32 +02:00
Andreas Ziegler a2ff5424e1 chg: change FileAccess from static to instantiable class 2016-08-19 19:22:15 +02:00
iglocska 8c83896813 Merge branch 'sslclientsync' into 2.4.51 2016-08-18 10:03:53 +02:00
iglocska 444171bd2d Merge branch '2.4' into sslclientsync 2016-08-18 09:58:52 +02:00
iglocska 15a8000f05 Merge branch '2.4' into 2.4.51 2016-08-18 09:54:15 +02:00
iglocska 28a76076f7 new: Added a way to clear worker queues 2016-08-16 00:46:41 +02:00
iglocska f2f5194d19 First iteration of the internal sync rework 2016-08-10 16:27:24 +02:00
Richard van den Berg 81a5838131 Add support for sync server SSL client certificates 2016-08-01 16:30:22 +02:00
Iglocska 1f1c8c814e new: First revision of the new import system 2016-08-01 16:15:24 +02:00
Iglocska 80b6bca48f new: Added a php version check to teh diagnostics page 2016-07-20 12:37:09 +02:00
Iglocska 9d6a386af3 fix: Cherry picking and pulling updates should not require the pull flag to be set on an instance 2016-07-19 15:02:01 +02:00
Iglocska af2f355cb4 fix: removed the debug from the previous commit 2016-07-19 11:57:11 +02:00
Iglocska 1a97f80977 fix: fixed an issue with certificate uploades when adding an instance / editing an instance 2016-07-19 11:53:51 +02:00
Iglocska b80cc56ec9 Merge branch '2.4' into write 2016-07-04 19:33:45 +02:00
Iglocska 30af4483f4 chg: Added a check for the prio worker, added it to the worker tab 2016-06-24 17:12:42 +02:00
Iglocska 793341123f fix: Fix to a bug that allowed adding server connections without an org 2016-06-08 13:52:55 +02:00
Andreas Ziegler aec73ed50a chg: improve file access using new Lib 2016-06-07 00:21:14 +02:00
Andreas Ziegler 958aa7c414 use consistent spacing around else if 2016-06-04 15:49:54 +02:00
Andreas Ziegler 985451642e add space after keywords if/for/foreach/while/switch/catch 2016-06-04 15:45:39 +02:00
Andreas Ziegler 8a2352f7b8 remove single spaces in front of tabs 2016-06-04 01:14:25 +02:00
Andreas Ziegler 0fe692c56a remove whitespace at end of line 2016-06-04 01:10:45 +02:00
Andreas Ziegler 898ea1d97c remove whitespace (space/tab) from empty lines 2016-06-04 01:08:16 +02:00
Andreas Ziegler 8a9ffc1f9b remove obsolete space from: File ( 2016-05-31 18:03:59 +02:00
Iglocska f152e8afc1 chg: Added options to inject the SCL php paths into the PATH when executing the worker shell scripts on RHEL/CentOS 2016-05-02 08:19:53 +02:00
Iglocska 8db889ce7e SMIME changes
- tied into auto upgrade system
- tied into server settings
- some cleanup of overly verbose debug
- Enforcing enable/disable everywhere
- Changed temporary file structure
2016-04-26 16:40:12 +02:00
Iglocska 24c7fa61fe Merge branch 'permissionfix' into 2.4 2016-04-18 17:41:59 +02:00
Iglocska 92952cc5e4 Rework of the ACL 2016-04-18 03:19:01 +02:00
Iglocska 1fec658350 Fixes to the plugin settings not working for any plugin beyond the first one 2016-03-29 10:16:20 +02:00
Iglocska cf42ca42c0 Fix to an issue that causes the server certificate to be removed if a sync connection is edited. 2016-03-24 23:54:26 +01:00
Iglocska 4905578ba1 Dynamic settings retrieved from modules 2016-03-20 01:32:00 +01:00
Iglocska 1ba0db37d3 Better feedback on the sync connection test
- sync users that have not accepted the terms / have had a password reset initiated were redirected to the login page

- fixes to the issue
  - if a user with automation/sync access uses the API and gets blocked because the terms weren't accepted or there is a pending password change they will be notified in a JSON/XML response
  - the sync test now takes this into consideration starting with this version and will report the cause of the failure

- Both instances have to be 2.4.24+ for this to be reported correctly
2016-03-07 15:11:00 +01:00
Iglocska cb5a14c3e1 Slightly better error reporting for GPG diagnostic issues 2016-03-03 12:54:08 +01:00
Iglocska f40010ae09 Organisations sorted in the server add/edit views alphabetaically, fixes #974 2016-02-25 13:14:46 +01:00
William Robinet 4fea371c4b Fix permissions 2016-02-11 17:03:51 +01:00
Iglocska 89198e028b Removing PEM from a server connection parameter, fixes #771
- Added a way to remove the certificate file when editing the server connection
- Also, it shows the currently selected certificate file as it caused some confusion before
2016-02-07 21:00:40 +01:00
Iglocska 1caebfe1a0 Check permissions on config files, fixes #837
- red warning on the settings page if the config.php file is not writeable
- failed changes in settings due to the config.php file not being writeable logged
2016-01-12 10:44:06 +01:00
Iglocska 710828d397 Some small changes to the diagnostics
- made the PHP settings check look a bit more clear and changed it from failures to recommendations

- added a file permission check for config.php (can add more in the future such as the background worker log files which can prevent the workers from starting)
2016-01-12 00:19:06 +01:00
Iglocska bad00e9c2d Add check for values on diagnostics page, fixes #839 2016-01-11 23:52:09 +01:00
Iglocska 99e8263447 Small fixes 2015-12-09 02:29:04 +01:00
Iglocska 39945ca39e Fixes to the logging
- in some places MISP tried to save the org ID instead of the org name in the logs

- fixed
2015-12-03 10:20:29 +01:00
Iglocska ab26eafd63 Added the possibility to enable debug for site admins
- new option in server settings
- enable debug (equal to normal debug level 1) for site admins only

- regular users will be unaffected
2015-12-03 01:45:38 +01:00
Iglocska d433618c71 Also, enabled the filtering on pull
Merge branch 'master' into 2.4-beta

Conflicts:
	VERSION.json
	app/Controller/EventsController.php
	app/Lib/Tools/XMLConverterTool.php
	app/Model/Event.php
	app/Model/Server.php
2015-12-03 00:27:56 +01:00
Iglocska 714ed198e5 Various fixes throughout the application
- org field still used in some places other than the legitimate use-cases
2015-11-28 23:49:52 +01:00
iglocska 8cc0996c3c Merge branch 'master' into 2.4-beta
Conflicts:
	VERSION.json
	app/View/Elements/side_menu.ctp
	app/View/Pages/administration.ctp
2015-11-14 17:16:38 +01:00
iglocska afdcc1af0c Fixed a security issue with the CSRF protection being avoidable using some site admin functionality
- as discovered and reported by Egidio Romano of Minded Security

- Lacking checks of HTTP methods in some functionality could lead to a site admin uploading and executing malicious scripts

- Tightened HTTP method verification across the board for actions that modify data
- Turned some administrative tasks to POST only actions
2015-11-13 23:57:03 +01:00
iglocska fdcac8b72c Further work on the filter UI 2015-10-18 09:36:55 +02:00
Iglocska 328c666e3a Merge branch 'master' into feature/sg
Merging all the new changes from master

Conflicts:
	VERSION.json
	app/Console/Command/AdminShell.php
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Log.php
	app/Model/Server.php
	app/Model/User.php
	app/View/Elements/side_menu.ctp
	app/View/Pages/administration.ctp
	app/View/Users/admin_index.ctp
2015-10-12 09:41:20 +02:00
Iglocska dc638adac2 Upgrade to CakePHP 2.7, fixes #684
- cakephp submodule updated to 2.7
- make sure that you update your instance!

- not updating will not break compatibility
2015-10-09 15:59:25 +02:00
Iglocska e242c9add2 Set of changes to the sync
- finished preview feature
  - can now view events and attributes remotely
  - can copy over new event to local instance

- new sync mode (update)
  - allows to only pull changes to events that exist locally already
  - works well with the manual pull of events, no need to pull events that we didn't manually confirm, but can still update all events that we pulled over

- Fixed an issue with background tasks causing the logging to fail

- reworked connection test showing version numbers of both instances
  - also telling the admin whether the sync is compatible or not

- Further refactoring / tweaking of the vent view
2015-10-06 01:16:48 +02:00
Iglocska 6bcf104724 Progress on several features
- implemented a custom pagination tool for data sets that are not directly taken from teh db
  - currently creates a pagination object that mocks CakePHP pagination
  - supports the CakePHP pagination view helper
  - supports: pagination, sorting, custom filters

- implemented first step of the remote instance browser for admins
  - view an index of events on another instance
  - filter the events
  - uses the new pagination

- still missing:
  - remote event view
  - fetch event from remote instance

- reworked the event view
  - separated API and UI code path
    - major speedup for the API!
    - cleaner code as there was almost 0 overlap
  - discussions and attributes are now loaded separately from the event view
    - added after the event view loads via ajax
    - cleaner pagination
  - attribute pagination now finally allows for sorting
    - future improvement (coming soon): Show proposals only filter
    - filtering on the attributes in general
2015-09-29 02:54:25 +02:00
Iglocska a55e38ffda Fix to the previous commit 2015-09-23 12:32:00 +02:00
Iglocska 6ef7772e0b Fixed an issue with old upgraded instances that didn't use the db session handler
- diagnostic tool would throw exceptions because the db session tables are still missing in some older instances
- if a different session handler is used, the test is skipped
2015-09-23 12:14:32 +02:00
iglocska 656a391223 Progress on the sync
- pull from 2.3 -> 2.4 should work correctly now
2015-09-21 14:55:40 +02:00
iglocska 7f3996f43b Added an API to quickly check the current MISP version, fixes #664 2015-09-17 00:21:08 +02:00
iglocska 1079c4a1ea Added a diagnostic to check and purge overgrown session tables 2015-09-16 18:55:28 +02:00
Iglocska e1a95c62b0 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/EventsController.php
	app/Controller/ServersController.php
	app/Model/Attribute.php
	app/View/Users/statistics.ctp
2015-09-10 15:02:44 +02:00
Iglocska 2142bf87c3 Several issues resolved
- fixed an issue where pushing a single event would fail

- both event and attribute edits via the API work without providing a timestamp. The current timestamp is instead attached

- both event and attribute edits fill the required fields from the data in the database if not supplied (as long as the uuid is found)
2015-09-07 14:25:24 +02:00
Iglocska 5f8f22e272 flag incorrectly set for event edit's publishing right check 2015-08-31 04:21:46 +02:00
Iglocska 704880ce59 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Server.php
2015-08-30 13:29:05 +02:00
iglocska a93807439d Several bigger changes
- new functionality: Event blacklisting by UUID
  - site admins cna enable this feature in the server settings
  - enabling the feature will make the required db changes
  - any deleted event will automatically get blacklisted
  - this prevents deleted events from flowing back from a synced instance
  - site admins can manually add UUIDs to the list and remove entries

- fix to UUID duplication issues for attributes
  - simply run the admin script and it will regenerate the UUID of attributes that are duplicates, if any such exist
  - timestamps/event published status will not be affected

- config.core.php now includes a change that prevents from 404 exceptions being logged
  - the sync uses 404s to signal that an event with a given uuid does not exist when negotiating proposal synchronisation
  - this causes a dangerously high amount of noise in the logs
2015-08-17 16:10:10 +02:00
Iglocska 67bd44f5dc Relaxed visibility of org UUIDs and sharing groups (the latter for sync users) 2015-08-03 16:49:03 +02:00
Iglocska ad21d5c35a Further work on the Sharing Groups 2015-08-03 14:12:20 +02:00
Iglocska 326d62d822 Added the server filters to the server creation 2015-07-30 13:11:07 +02:00
Iglocska a9c737ff2b Further work on the sync filters 2015-07-27 16:30:52 +02:00
Iglocska 47cc0e4d18 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Model/Attribute.php
	app/Model/Event.php
2015-07-22 18:04:02 +02:00
Iglocska 1bf2995f4e Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
2015-07-22 17:19:13 +02:00
Iglocska b089cf077f Some changes to the workers
- some fixes with the previous iteration of the background workers
- PID now checked using ps -p instead of looking for it in /proc
2015-07-17 15:06:38 +02:00
Iglocska 1645ee1e3b Rework of the diagnostics for background workers
- shows dead background workers
- allows site admins to add workers to any queue on the fly
- allows site admins to kill workers on the fly
2015-07-12 21:45:11 +02:00
Iglocska f1a5ba52e5 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Lib/Tools/XMLConverterTool.php
	app/Model/Event.php
2015-07-08 14:02:54 +02:00
Iglocska 038ccd99bd Work on the new attribute types 2015-07-06 18:19:51 +02:00
Iglocska 45fdbf7839 File management fixed in server settings
- a previous patch removed the contents of the page
2015-07-01 09:50:51 +02:00
Iglocska 0481e6eb02 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
	app/Controller/ServersController.php
	app/Controller/ShadowAttributesController.php
	app/Controller/UsersController.php
	app/Model/Event.php
	app/webroot/js/ajaxification.js
2015-06-29 14:27:16 +02:00
Iglocska 3f215743f0 Complete rework of the ZeroMQ implementation
- python server running in the background doing the publishing
- MISP -> python script communication via redis
- configurable / controllable via the admin UI
2015-06-29 08:56:45 +02:00
Iglocska 3d2b8c3c10 Added pub/sub feature using ZeroMQ, fixes #540 and fixes #526
- by installing the requirements described in the update and the install instructions (ubuntu only for now, centos/red-hat versions to be tested and described), administrators can enable the pub/sub feature
- assign a port to the service via the interface
- each time an event is published, MISP will use ZMQ's PUB feature to push out a MISP JSON package using the "misp_json" prefix
2015-06-24 17:38:15 +02:00
Iglocska ae0e1aeacb Merge branch 'feature/rpz' into hotfix-2.3.86
Conflicts:
	app/Console/Command/EventShell.php
	app/Model/Server.php
2015-06-23 17:19:08 +02:00
Iglocska c73f71f243 Merge branch 'master' into feature/sg
The merging is complete

Conflicts:
	VERSION.json
	app/Console/Command/ServerShell.php
	app/Controller/AppController.php
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Controller/PostsController.php
	app/Controller/UsersController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Log.php
	app/Model/Server.php
	app/Model/User.php
	app/View/Elements/side_menu.ctp
	app/View/Users/admin_index.ctp
	app/webroot/js/ajaxification.js
2015-06-10 22:54:20 +02:00
Iglocska 3c6f73e41c Some further cleanup / refactoring 2015-06-10 13:01:36 +02:00
Iglocska 707140243a Updated the documentation to reflect the correct STIX / CyBox versions required
- Updated the admin tool to check the STIX / Cybox versions
2015-06-10 12:47:00 +02:00
Iglocska 47d02845d2 Added the option to use an alternat executable for gpg, fixes #498
- users can specify an alternate gnupg executable
- Since GnuPG2 is not compatible with the last stable CryptGPG version, there are 3 options for CentOS / Red Hat users:
  1. Don't use a passphrase for the server's PGP key
  2. Install the beta version of CryptGPG (1.4.0b4)
  3. Install GnuPG classic and point MISP to the executable

- This patch enables option 3, administrators can point MISP to the alternate executable in the server settings
2015-06-09 13:04:33 +02:00
Iglocska a81f4a19ed Server setting changes logged, fixes #531 2015-06-09 09:55:22 +02:00
iglocska ecf9facf07 Further progress 2015-05-25 20:54:10 +02:00
iglocska 81bd84af11 Further progress, still rough around the edges
- server settings and validation work
- configurable template via settings
- configurable via API as well

- Also trying to define the structure for future Plugin settings
- The idea is to have them in a separate tab all prepended with the plugin name
- since this is not yet part of the future flexible plugin system, it is still kept in the main codebase, but the idea is to get the naming conventions ready for the future version
2015-05-19 15:25:45 +02:00
iglocska 7fb6e2f95e Fixed issue with proxy settings attempted to be added in synctool, even if not set 2015-05-15 09:25:07 +02:00
Iglocska 6b43b94811 More changes to the sync
- pushes are now taking into account the push_rules and pull_rules fields
2015-04-26 20:13:34 +02:00
Iglocska ad1a15f36e Work on the sync
- commit to update secondary test instance
2015-04-26 13:21:51 +02:00
Iglocska 4ef36d473f Allow login via header for getVersion 2015-04-26 10:58:08 +02:00
Iglocska ee3e2b0007 Version negotiation 2015-04-26 10:55:39 +02:00
Iglocska 38f50e3917 Finished the connection test tool 2015-04-21 00:31:43 +02:00
Iglocska 9f1d47b6bc Added connection test
- also a fix to checkAuthUser
2015-04-20 23:49:18 +02:00
Iglocska 3bbaae6439 New Server add / edit
- add the remote organisation while adding a server
- remote organisation can be chosen from the list of local or known remote organisations. Alternatively a new remote org can be created on the fly
- Several UI changes
2015-04-20 22:36:29 +02:00
Iglocska 00dd47ef5e Server moved to new org object
- relation added
- index updated
2015-04-20 15:12:36 +02:00
Iglocska e0ef372392 Merge branch 'master' into feature/sg
Conflicts:
	app/Controller/EventsController.php
	app/Controller/UsersController.php
	app/Model/Event.php
2015-04-12 10:40:31 +02:00
iglocska 1afa15120f Further work on the sharing groups 2015-04-07 00:24:44 +02:00
Richard van den Berg 75f93641dc Use isOK() for version check 2015-03-19 15:09:54 +01:00
Richard van den Berg 850e4bd19f Catch HTTP error codes 2015-03-19 14:05:10 +01:00
Richard van den Berg 2f58fdec0d Catch invalid proxy configuration 2015-03-19 13:33:17 +01:00
Richard van den Berg 106b6cb06b Allow SyncTool with empty $server 2015-03-19 13:03:16 +01:00
Richard van den Berg 0e66ff140f Use SyncTool for diagnostics 2015-03-19 12:31:35 +01:00
Richard van den Berg b62032fc7b Fix typo 2015-03-19 12:20:16 +01:00
Richard van den Berg 2ccab722d7 Add proxy section to server diagnostics 2015-03-19 12:15:28 +01:00
iglocska 6b6c62bd53 Fix to the new sync issues since 2.3.39, fixing #365
Incorrectly trying to look up authenticated user in the model fixed
2015-01-15 13:46:11 +01:00
iglocska cedaac360a Fixes to the scheduled tasks and some documentation issues
- Scheduled pulls should work correctly now
- Scheduled pushes and pulls correctly display in the logs
- Scheduled caching correctly sets the next date of execution
2015-01-12 17:35:08 +01:00
iglocska aa492066d8 Diagnostics check fails on PGP check if the server's key is a sign only key 2014-11-14 13:12:40 +01:00
iglocska 4568589044 File management added and various small changes
- Important! Logo images have now moved to a different location! Make sure that you update your settings!
- Site admins can now manage the uploaded image files and the terms of use file via the server settings interface
- add, link, delete files directly from the interface
2014-10-29 15:20:30 +01:00
iglocska 035dfc8b12 Made the version check exclusive to the diagnostics tab 2014-10-27 17:21:57 +01:00
iglocska 6d73409b90 Version check tool added
- check the latest tag on github and compare it to the local version
- from here on all hotfix, minor, major releases should be tagged apropriately.
2014-10-27 16:03:43 +01:00
iglocska c2a4a993ba Incorrect script tmp directory checked in the health tool 2014-10-07 15:55:40 +02:00
iglocska 45cb52ca3f Cleanup of the worker health tool 2014-09-26 14:28:52 +02:00
iglocska e6bf73761e UI redesign of the template and worker health
- UI of templates a bit clearer
- Worker health tool added to the server settings tool
2014-09-24 15:35:25 +02:00
iglocska fa367febfa Download of the settings/diagnostics results implemented
- Should help with trouble shooting, administrators can now download a json file containing all the settings and issues shown by the tool.
2014-09-11 11:30:32 +02:00
iglocska 1058e418b9 Added the new server settings to the menues 2014-09-11 10:07:06 +02:00
iglocska 34cc73b21a Several changes for the diagnostic tool
- Added extra diagnostic tools
2014-09-10 16:55:34 +02:00
iglocska 2521106254 Reworked the server settings for boolean settings and settings that have a few options as values.
- Toggles instead of free-text
2014-09-10 10:37:58 +02:00
iglocska 79127902b7 Cleanup, MISP health tool
- cleanup of a lot of deprecated settings
- tool to help assess and alter issues with the instance settings
- new mechanism to store settings
2014-09-10 09:43:22 +02:00
iglocska 11b1ff6926 Changes to uploading a ca file for a server link
- create folder if it doesn't exist
- correctly save file if edited
2014-02-17 11:40:44 +01:00
iglocska 722f17f38d Deprecated flag used to check it sync is enabled
- fixed, now correctly looking for MISP.sync
2014-02-14 10:27:09 +01:00
iglocska 70c7f650f6 Changes to the logging and scheduling
- Scheduled tasks for pull / push now working as intended
- Rescheduling of all tasks fixed
- protection against the rescheduled task ending up in the past

- further event history fixes
- fixed lots of erroneous logging
- performance improvement with logging (no longer loading controllers for no reason)
- logging extra actions that weren't logged before (proposal accept / discard, server pull / push)
2014-01-29 15:52:09 +01:00
iglocska 467408d9f7 Org admins should be able to delete / edit their own server links 2014-01-24 10:43:07 +01:00
iglocska fb7f084e70 Permission issue with delete servers
- fixed a bug that prevented the deletion of sync links
2014-01-24 10:40:46 +01:00
iglocska a9d945ff19 Changes to the sync action pages
- fixed access control
- any admin can now encode new servers. Org admins can pull/push for their own instances.

- Upload certificates during an edit
2014-01-21 16:41:32 +01:00
iglocska c10d3e9b95 SSL certificate changes
- you can now upload a certificate file and allow a server link to use a provided self signed certificate. This should solve the issues that some organisations are having when trying to connect their instances
2014-01-16 08:47:25 +01:00
iglocska cbcd7ac625 Some small fixes
- Corrected some weak notifications on background jobs
- Changed the view slightly to view background jobs
- fixed an issue where editing a sync server setting would cause an error due to the id not being passed to the logging plugin
2014-01-07 11:08:21 +01:00
iglocska c6fd29fb29 Several features
- Sync for background jobs (pull + push)
- more e-mailing delegated to background jobs
- A bunch of bug fixes and minor changes
2014-01-06 05:15:47 +01:00
iglocska a380ab444a Work on the background job and the proposals
- Proposals now get synced on pull
- several bug fixes
- new startup script for the background workers
2014-01-05 21:30:39 +01:00
iglocska 2b11a78e22 Merge branch 'feature/roleChanges' into feature/XML_and_UI
Conflicts:
	app/Controller/UsersController.php
	app/View/Regexp/admin_add.ctp
	app/View/Regexp/admin_edit.ctp
	app/View/Regexp/admin_index.ctp
	app/View/Roles/admin_add.ctp
	app/View/Servers/add.ctp
	app/View/Servers/edit.ctp
	app/View/Servers/index.ctp
	app/View/Servers/pull.ctp
	app/View/Servers/push.ctp
2013-10-25 10:39:18 +02:00
iglocska 3c58e0071a Further work on the UI
- reworked almost all of the side menues to be centralised

- Some fixes for the IOC export not handling two new-ish types correctly

- Some changes to the menues (including a few options that didn't exist before)

- rework of the popovers in some forms
2013-10-24 16:41:42 +02:00
iglocska d27ddee207 First rework of the siteadmin role
- ADMIN org removed.

- Siteadmins are now identified by the perm_site_admin flag

- Siteadmins can now be of any organisation

- editing the regexp / whitelist rules can now be done by a special user with the perm_regexp_access in his/her role

- Executing a mass replace of attribute values based on the regexp rules cannot be initiated by a regexp/whitelist user, only by a site admin

- If the login page is reached without any users / roles defined they are automatically created (perviously it was only the user that was created)

- Org admins are restricted from assigning perm_site_admin, perm_sync and perm_regexp_access roles to users. This can only be done by a site admin.
2013-10-03 11:45:27 +02:00
iglocska a5c100309b Fixes to the Shadow attribute e-mailing
- E-mail locks are now correctly reset by discarding / accepting a proposal

- Also, new index page to see the list of proposals that a user can accept
2013-09-03 15:29:44 +02:00
iglocska 932f5b89df Introduced a typo in the previous commit. 2013-08-12 17:31:45 +02:00
iglocska 285ff481a5 Further updates to the sync 2013-08-12 17:23:32 +02:00
Christophe Vandeplas 8e8f41ab13 Fixes in server push 2013-07-17 14:27:51 +02:00
Christophe Vandeplas 2424cbbf26 Server push lower memory footprint solving OoM problem.
Enabled per-id push like pull
2013-07-17 14:06:24 +02:00
Christophe Vandeplas e13c2e883c fixing problems in pull with distribution data validation 2013-07-16 15:28:04 +02:00
Christophe Vandeplas 66ce874b99 do not change 'info' field upon pull (was: Imported from $url) 2013-07-12 10:34:59 +02:00
iglocska 3e9a967188 Removal of some references to the old private flag 2013-07-11 17:25:47 +02:00
iglocska 5948a7c329 Several copy paste failures fixed in the previous commit
- /facepalm
2013-06-27 17:57:33 +02:00
iglocska 8cdf97ff66 ACL checks changed
- until now checkAction was used to check permissions of a user

- but since all of the role permissions are checked beforefilter in
appcontroller and saved into a public array, doing a lookup of the
array saves an SQL call for each permission check.
2013-06-27 17:53:36 +02:00
Christophe Vandeplas 8fe83c333f micro cleanup of servers index 2013-06-19 14:58:48 +02:00
Christophe Vandeplas da3580de35 little bit more details about sync errors 2013-06-19 12:13:45 +02:00
Christophe Vandeplas dbf1065b3b sync pull backwards compatibility with MISPv2 2013-06-18 11:19:43 +02:00
Christophe Vandeplas 3b28d6f1e8 (workaround) better error message when HTTP problem with Server Pull 2013-06-18 09:12:09 +02:00
Iglocska 1635d99d8f Pull can not edit events / attributes
- added the _edit method in EventsController
2013-06-11 00:41:43 +02:00
Iglocska 040227d66a Some more fixes to the sync 2013-06-10 23:34:47 +02:00
Iglocska f8f290375e Further changes to the degradation of the distribution 2013-06-10 23:00:45 +02:00
iglocska cb3ac8be15 Changes to the event filtering
- there was a bug that pushed the data entered into the "published"
filter field to the date fields -> fixed

- Also a bug in the serverscontroller, pulling threw an undefined
warning from the log controller because a single saveField was used and
the logController couldn't save the url data for the action
2013-06-06 10:24:27 +02:00
Christophe Vandeplas 0614db919e fixes information leakage vulnerability on REST XML outputs 2013-05-22 10:52:03 +02:00
Christophe Vandeplas 62a3da46f2 removed useless hop_count 2013-05-22 08:18:34 +02:00
Andras Iklody 0eec208b45 Further changes to the authorisation 2013-04-26 15:46:39 +02:00
Andras Iklody eeaa071024 Removal of the remains of the old authorization / adding new ones where
needed
2013-04-26 14:43:44 +02:00
Christophe Vandeplas 5c0fc36b79 fix sanitization in Servers #96 2013-04-24 12:23:03 +02:00
Andras Iklody 3e89c80d09 Removed some obsolete code
- getName functions removed

- Fixed a reference to it in the logable behaviour
2013-04-18 08:49:59 +02:00
Andras Iklody 9a6733acfd Removal of deprecated code
- The flag private is deprecated, removed together with the code that was
  affected by it
2013-04-17 11:13:09 +02:00
Andras Iklody 32dc28adb9 Update to the admin privileges
- Changed the requirement for a lot of functions to be site admin as
  opposed to admin.
2013-03-05 15:19:58 +01:00
Andras Iklody fad8e809ad Minor changes
- some changes to the access control

- re-renabled regexp and blacklists, will need a closer look though

- editing a role should update ACL

- some other minor things
2013-02-21 17:24:41 +01:00
Andras Iklody 0f947085cb Reworked the sync / release control
- Fixed issues with the sync
	- Secondary publishes on remote servers failed
	- Introduced new fields in events to stop backward traverse of
	  edit information that lead to low performance and eroneous
	  distribution information updates when more than 2 servers were
	  linked
	- Deletion of an attribute now deletes on remote servers

- Changes to the event ownership
	- Original creator org now noted in the event itself
	- Only original creator org can change distribution
	- Events will show up with the original creator org for users
	  (admins can see both that and the owner of the event on the
	  local instance)
	- Server.organization now used in junction with the connecting
	  user's org and the instance's org (from the bootstrap) to
	  determine distribution flow control and access rights

- Lots of minor changes
2013-02-19 15:37:35 +01:00
Andras Iklody e88a3a9cf7 Updates to security
- perm_auth new toggle, can disable auth key usage for a role

- prevents sync / rest with a perm_auth == false key

- some changes to sync to provide better feedback on why it failed

- rewording of distribution options
2013-02-06 17:45:43 +01:00
Andras Iklody 5706fe183f Redirect for ServersController
Added redirect for index in case of non sync users
2013-02-06 08:34:41 +01:00
Andras Iklody 4d0fe60347 Corrected a typo preventing the sync from working 2013-01-30 14:02:36 +01:00
Andras Iklody 97f56a2275 Further changes to org admins
org admins can manage their own server connections
org admins cannot see other orgs' users in the users list
2013-01-29 08:56:38 +01:00
Andras 8d88bcb2b5 Fix for the synchronisation
An error in the pull fix broke the push/publish feature. Fixed.
2013-01-27 21:27:58 +01:00
Noud de Brouwer 3d40095547 coding standards
Coding Standards.
2013-01-25 07:51:20 +00:00
Andras Iklody 24b10579ad Pull fixed
Fixed the issues with pull, should work fine now
2013-01-24 17:32:57 +01:00
Noud de Brouwer d89ab91dee coding standards
Coding Standards.
2012-12-18 16:44:07 +00:00