Commit Graph

54 Commits (3ee3c6a34da04960f42eced3d20fc7dacae31bf8)

Author SHA1 Message Date
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 34c9c6ddeb fix: Changed United States -> United States of America in the org nationality list 2018-04-12 09:22:48 +02:00
iglocska 07bb645407 fix: Keep the original org name if merging an org into a newer copy with a number appended (such as _1111)
- no need to edit the resulting merge anymore
2018-02-16 17:14:32 +01:00
iglocska a0d7cececc new: Reowkred organisation merge workflow, #fixes 2931
- Organisation merge is now offered to the user by the edit page if a UUID was used to edit an organisation that is already in use
- Merging a local org with 1+ user(s) into an external organisation converts the target organisation into a local one
- Merging a local organisation with a logo into an organisation without one will move the current logo to over
  - caveat: this will only happen for organisations already using the new logo naming ([id].png as opposed to [name].png)
2018-02-16 16:34:12 +01:00
iglocska 9760f1144f new: New APIs to add/remove orgs and servers from sharing groups, fixes #2888
- added functions to manage the additions/removals of objects from sharing groups
- the following APIs are included:
  - /sharingGroups/addOrg/[sg_id]/[org_id]/[extend]
  - /sharingGroups/removeOrg/[sg_id]/[org_id]
  - /sharingGroups/addServer/[sg_id]/[server_id]/[all_orgs]
  - /sharingGroups/removeServer/[sg_id]/[server_id]

- All parameters are optional and can instead be passed as JSON objects such as:

  {
    "org_uuid": "55f6ea5e-2c60-40e5-964f-47a8950d210f",
    "sg_id": "49",
    "extend": 1
  }

- The API is extremely flexible with how to name objects, the following parameters are allowed:
  - Organisations:
    - org_id (The organisation's local instance ID)
    - org_uuid (The organisation's global UUID)
    - org_name (The organisation's identifier as known to the curent instance)
  - Server:
    - server_id (The server's local instance ID)
    - server_url (The URL of the server)
    - server_name (The local name of the server as assigned when adding the server)

The sharing groups can also be addressed by ID or UUID.
2018-02-02 08:46:14 +01:00
iglocska 05a89f5e87 Merge branch '2.4' into feature/tag_filter_rework 2017-11-30 22:28:35 +01:00
iglocska 4b16f6f2c1 fix: Trimp the org uuid upon entering it to avoid copy-pasta issues 2017-11-30 09:53:38 +01:00
iglocska 69423a8bcf new: Add restrictions for e-mail addresses to certain domains
TODO: tie it into the user edit action
2017-11-27 10:22:37 +01: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
iglocska 1e61074115 fix: Relaxed UUID4 requirement for UUID validation
- we shouldn't enforce anything beyond the basic format
2017-06-12 22:39:02 +02:00
iglocska bce780090f new: Added User and Organisation addition/change data to the ZMQ feed 2017-05-29 16:18:37 +02:00
iglocska 44df97b571 fix: Enforce the uuid creation on the UI 2017-04-06 15:07:33 +02:00
iglocska b900f18db6 fix: Enforce adding a UUID for external organisations too
- No need to support 2.3 any longer
2017-04-06 14:50:40 +02:00
Iglocska 75d8504de1 fix: fixed an issue that erroneously updated the date of an org creation on edit 2017-01-20 09:11:54 +01:00
Andreas Ziegler 9bf0e16ac6 new: add basic experimental support for PostgreSQL 2016-08-31 04:11:49 +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 fa8300adea chg: fix indention in some files 2016-08-22 03:40:17 +02:00
Andreas Ziegler 4a37f4edbc chg: remove obsolete backticks from sql queries
backticks are only necessary to escape reserved keywords.
as backticks are MySQL-specific, having them only where really necessary
 makes integrating support for other DBMS easier.
2016-08-15 06:26:25 +02:00
Iglocska 9522c96d54 Revert "Revert "chg: remove obsolete uuid() wrapper""
This reverts commit bae6eadfe7.
2016-07-11 00:59:47 +02:00
Iglocska bae6eadfe7 Revert "chg: remove obsolete uuid() wrapper"
This reverts commit 77ca0f8dd4.
2016-07-08 14:50:00 +02:00
Andreas Ziegler 77ca0f8dd4 chg: remove obsolete uuid() wrapper 2016-07-07 15:13:16 +02:00
Iglocska f13e488f49 fix: Organisations updated with no changes cause erroneous log entries, fixes #1099 2016-06-26 21:08:35 +02:00
Iglocska 4544ff3326 fix: Fixed an issue that caused MISP's capture org to disambiguate on the name instead of the UUID in some cases
- Due to a fallback mechanism the disambiguation happened on the name if there was no UUID match during the saving of an event instead of creating a new organisation. This was an issue if a remote org changed UUID for example.
2016-06-24 11:47:59 +02:00
Andreas Ziegler 8f9e152d8c add space before opening curly brackets 2016-06-04 15:45:11 +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
Iglocska 5e4f09352d fix: reverted a patch to allow organisations without uuids to be added 2016-06-03 21:55:52 +02:00
Steve Fossen e54b74551f not local and no uuid, it's an invalid organisation
sync fails with
[2016-06-01 21:04:26] main.ERROR: {"queue":"default","id":"99b7d5ef61e24389ea2edf8c3f209856","class":"ServerShell","args":[["pull","1","1","full","2075"]]} failed: SQLSTATE[HY000]: General error: 1364 Field 'uuid' doesn't have a default value {"type":"fail","log":"SQLSTATE[HY000]: General error: 1364 Field 'uuid' doesn't have a default value","job_id":"99b7d5ef61e24389ea2edf8c3f209856","time":55606,"worker":"misp:14872"} []
2016-06-03 10:43:09 -07:00
Iglocska 1362cf40b7 Added org merge tool
- allows a site admin to merge all objects belonging to an organisation into another
  - this can be useful if duplicate organisations exist for example
  - the tool overrides the built in mechanism and should only be used if absolutely required
  - at the end of the process the original organisation is removed

- the tool generates 2 files that are dropped in the log directory of MISP
  - 1 contains a JSON with all the changed fields and the IDs
  - 1 contains an SQL script that allows an admin to revert the changes
2016-01-27 23:59:34 +01:00
Iglocska eeb3dcc69b Replaced the footer text
- added link to the github page of MISP
- made the text "Powered by MISP vversion_number" fixed
- Replaced the surrounding text fields with two new fields (empty by default)
2016-01-17 21:22:50 +01:00
Iglocska 176ad85b88 Rework of the scheduled caching jobs
- fixed a series of issues with the exports
2016-01-10 19:45:33 +01:00
Iglocska c6143fc1b3 Invalid org capture method lead to orgs with empty UUIDs being matched with the first org with no uuid 2015-12-30 20:35:39 +01:00
Iglocska a06da3e90b Fixes to the first user initialisation
- updated the UserInit command line tool
- updated the built in user initialisation
2015-12-30 09:54:43 +01:00
Iglocska f1a54885ba Fixed the editing of sharing groups via event updates
- if a sync user adds / edits an event with a newer version of a sharing group
and the sync user is the local sync user of the SG or is an extender of the SG
then the sharing group will be updated

- valid changes:
  - Sharing group metadata changes
  - organisation detail changes (except uuid/name)
  - add / remove extend flag from orgs in the SG
  - add / remove all_orgs flag from servers in the SG
2015-12-14 00:03:45 +01:00
Iglocska 73ab39aa26 Further fixes to the sync
- corrected the edit access rights for sync users with sharing groups
- Various fixes to the organisation sync and how creation / modification dates are transmitted
- Internal format differences compared to 2.3 causing mismatched field lookups fixed
2015-12-11 14:11:37 +01:00
Iglocska 7ac9b2c70a Further fixes on the sharing group sync 2015-12-10 13:28:58 +01:00
Iglocska 1f3bfc3d6a Org and SG fixes for issues that are breaking the functionality 2015-12-10 10:54:31 +01:00
Iglocska 5f4c90699f Allow orgs to not have uuids
- only in if they are external orgs
2015-12-10 01:37:56 +01:00
iglocska 7fbbdafec2 Tighter control over deleting organisations 2015-11-14 11:08:41 +01:00
iglocska da8b2604ba Fixes to some validations issues using cakephp 2.7 2015-10-18 20:51:37 +02:00
iglocska 867dbbc7a3 Small fix thta resolves the inability to delete orgs 2015-10-18 19:51:11 +02:00
Iglocska 38d8bd0a77 Moved remaining UUID generation calls to the new uuid wrapper 2015-10-15 15:01:51 +02:00
Iglocska eeb1d8d117 Fixes to bugs with org usage from 2.3 2015-10-15 11:11:05 +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 3fb7764c00 First revision of the upgrade scripts
- .sql file to add all the new fields / tables
- admin tool to convert the old organisation fields to the new objects
- still missing a cleanup method (to remove the old organisation fields once the conversion is done)
2015-09-02 01:34:52 +02:00
Iglocska 6e5b9a5ac5 Cleanup and fixes to the memberslist 2015-08-31 03:08:49 +02:00
Iglocska a181f3f2a8 Merge branch 'master' into feature/sg
Conflicts:
	VERSION.json
2015-07-24 16:02:31 +02:00
Iglocska 3abf1d0536 Progress on the sync
- Creating objects whenever necessary during sync (sharing groups, organisations, etc)
- it's still WIP, but time to sleep
2015-04-27 00:44:28 +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 c24704a6c2 Lots of progress
- further work on implementing the SG changes everywhere
- reworked the alert e-mails
- reworked a lot of the logging
- several convenience methods
2015-04-20 11:46:55 +02:00