Commit Graph

165 Commits (baa33a618c72ca8f4117843553358cae3009cbfc)

Author SHA1 Message Date
Christophe Vandeplas 2a8efc5770 minor admin tools improvements 2013-07-12 15:35:00 +02:00
Christophe Vandeplas e328dc948e huge performance increase in generateCount 2013-07-12 14:55:56 +02:00
iglocska 3e9a967188 Removal of some references to the old private flag 2013-07-11 17:25:47 +02:00
iglocska 53675fe3a3 Some UI changes and reattached the regexp for the admin validation tool
- org only events have a redish background in the event index

- org only events and attributes have their distribution level marked in
red
2013-07-11 16:38:39 +02:00
Christophe Vandeplas 7cda2a5dc2 minor change in reportValidationIssueAttributes() 2013-07-11 12:47:46 +02:00
iglocska 0b807a2666 Some cleanup
- removal of references to the old blacklist
2013-07-11 10:47:44 +02:00
iglocska 1f411c74cf Some UI fixes related to the debug/nondebug alignment 2013-07-09 10:05:19 +02:00
iglocska eeac31bee8 Regexp changes, UI changes
- first cleanup of regexp

- some changes left off from the UI changes that were not in the views
themselves
2013-07-04 15:45:11 +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 592180700e solves memory exhaustion upon generateCorrelation 2013-06-24 15:18:16 +02:00
iglocska f524f6d2c0 extra access control restriction for reportValidationIssues 2013-06-20 08:53:47 +02:00
Christophe Vandeplas 435c52c457 reportValidationIssues function 2013-06-19 14:51:58 +02:00
Christophe Vandeplas 8fa33f0733 first start of report functions. see issue #122 2013-06-19 12:28:55 +02:00
Christophe Vandeplas 001151adc8 fix incorrect order of checking user info (with REST authkey) 2013-06-12 17:09:03 +03:00
Christophe Vandeplas 68c2fd09fe Merge branch 'develop' of https://github.com/MISP/MISP into feature/sync/timestamp
Conflicts:
	app/View/Attributes/index.ctp
	app/View/Events/add.ctp
	app/View/Events/edit.ctp
2013-06-10 23:00:37 +02:00
iglocska 3c23ac3a86 Change to new distribution
- first stage
2013-06-10 17:33:03 +02:00
Christophe Vandeplas d4d24a3aea peformance 2013-06-08 11:31:22 +02:00
Christophe Vandeplas a4d4964630 UI hide top links when not logged in 2013-06-03 16:37:13 +02:00
Christophe Vandeplas 0fa30912a3 mirated first parts of nice GUI proposed by Alexandru of CERT-EU 2013-05-30 11:14:00 +02:00
Christophe Vandeplas 62a3da46f2 removed useless hop_count 2013-05-22 08:18:34 +02:00
Christophe Vandeplas 73e1053f4e fix rest authentication and further auth clean up 2013-04-29 11:22:46 +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
Andras Iklody 4396cec8ea Integrated ownership, ACL and minor fixes
- Orgs can propose new attributes or changes to existing attributes for
  events that they do not own

- publishing users of the owner organisation can see, accept or discard
  them

- Reworked the access control

- minor fixes
2013-04-25 14:04:08 +02:00
Christophe Vandeplas 8e720f87f2 fix sanitization in AppController #96 2013-04-24 16:01:44 +02:00
Christophe Vandeplas ad6427c225 Merge branch 'develop' of https://github.com/MISP/MISP into develop 2013-04-22 15:27:01 +02:00
Andras Iklody f6dade1e18 Performance tweak
- User/Role not looked up recursively anymore for authorisation checks -
  improves performance significantly. Also, checking perm_add and
  perm_modify instead of doing a lookup in the ACL tables
2013-04-22 14:44:55 +02:00
Christophe Vandeplas bc3921eece new logic to generate correlation, relates to issue #95 . Updated DB
schema !
2013-04-22 10:59:55 +02:00
Andras Iklody 9a1bb61ed5 Small fixes
- Comments about isAdmin vs isSiteAdmin

- Extra config line added to bootstrap.default.php for the built in e-mail
  system
2013-04-16 15:55:33 +02:00
iglocska 32de082c88 New export feature
- To restrict the authentication key from being used by interactive users,
implemented a new export page that uses the uses cake's user
authentication

- the old export features still exist for users with perm_auth enabled
  accounts - renamed to automation

- Exporting the events that found attributes belong to in a search
  attributes result page

- exporting of individual events to file by clicking a link in event view
2013-03-18 11:48:36 +01:00
iglocska aa2340c3f2 Temporary fix for an issue with the ACL 2013-03-15 15:15:10 +01:00
iglocska d5800206e6 Bug fixes
- issues of admin orgs not being able to edit/delete org events

- owner org removed for org admins

- email only visible from own org to org admins
2013-03-13 15:11:49 +01:00
iglocska c86a90dd9f Upgrades to the installation and upgrade process
- Instructions updated

- SQL scripts tidied up of incorrect junk (from export)

- upgrade scripts finish gracefully
2013-03-13 11:42:24 +01:00
iglocska 80967b2ddd Update to generateCount
- generateCount used to just run through all attributes and save them, to
  generate the count. It led to VERY long execution times on larger
  databases (25k+ attributes). With the extra processing that each save()
  does for attributes, this was horribly slow.

- new generateCount just saves the events based on the number of
  associated attributes, only having to save the events (of which there
  are considerably less).
2013-03-12 12:00:49 +01:00
iglocska d9a01197ac More updates to the migration 2013-03-12 11:10:40 +01:00
iglocska 723d87f20d Slight change to generating the ArosAcos
- permission field is not set when roles are read during the ArosAcos
  generation script - needed for generateACL. Fixed.
2013-03-12 10:23:12 +01:00
iglocska eb4283ea9c Highlighting in log searches
- new helper that can be used for highlighting

- highlighting of the search terms in the log search result - index view.
2013-03-11 13:12:48 +01: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 01649046c0 Several things (search, migration)
- Changes to the default setting for non private events after migration

- search attribute update to be able to exclude events
2013-02-27 17:15:09 +01:00
Andras Iklody a735822ca1 Updated the migration script (SQL)
- Script updated based on the issues during testing

- Changed the file upload/downoad mechanism.
2013-02-27 15:24:38 +01:00
Andras Iklody 341814a1d4 Some updates to the migration script
- Getting it up to date
2013-02-22 14:42:22 +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 e976242878 Reworked aros_acos creation
- moved and fixed the aros_acos creation on the new role creation

- new method in appController that sets all the aros_acos from scratch
  (for example for a new instance, or a changed acos / aros table)

- some minor changes, redirects to the terms page on invalid events
  removed, etc.
2013-02-05 17:22:37 +01:00
Andras Iklody 7f6f166838 Fixes to access rights, some sanitization, etc
- Admins cannot manually change anyone's authkey, they need to generate a
  new one via the reset link

- Some pages could be accessed by changing the url - fixed (though needs
  further testing)

- Edited a change in the manual that may have been confusing

- Some changes to the way ACL is set up - still needs more work
2013-02-04 17:55:35 +01:00
Noud de Brouwer 01c0dc0e71 RBAC
org admin and RBAC admin.
2013-01-24 10:35:59 +00:00
Noud de Brouwer a9a1bc91a1 AdminCrud and coding standard
more AdminCrud and coding standard clean up.
2013-01-04 15:48:46 +00:00
Noud de Brouwer 547a80ba7d Sanitize
Sanitize countermeasures.
2012-12-19 15:28:31 +00:00
Noud de Brouwer 534948efad Sanitize
Sanitize countermeasures.
2012-12-19 12:56:42 +00:00
Noud de Brouwer 95158d2ef3 Sanitize
Sanitize countermeasures.
2012-12-19 12:42:38 +00:00
Charlie Root e474b8e189 generateAllFor<FieldName>
conflicts with CAKE/Model/Model::_call() so no findBy<FieldName>.
(and various very minor other things.)
2012-12-19 10:30:10 +00:00
Noud de Brouwer d89ab91dee coding standards
Coding Standards.
2012-12-18 16:44:07 +00:00
Noud de Brouwer 8864ee78f7 generateAllFor<FieldName>
so we can use an URL like:
http://localhost/<TableName>/generateAllFor<FieldName>/newValue/oldValue
for example:
http://localhost/events/generateAllForAnalysis/0/null
http://localhost/users/generateAllForInvitedBy/1/0
http://localhost/users/generateAllForRoleId/1/0
2012-12-18 03:50:52 +00:00
Andras Iklody 1ceadab700 Added features from branch analysis_levels
-Analaysis levels setable for events as per milestone item 94
-Password change forced as per milestone item 109
-Added feedback on entered search terms for search attributes
-fixed the authentication issue
-some minor fixes
2012-12-17 15:51:30 +01:00
noud 26c8ad57ee Role
renamed everything group to role (i.s.o. renaming just the visable).
2012-12-12 16:15:01 +01:00
noud 52a7625a9d Source Code Review
sanitize everything displayed from the db.
(and some small coding standard whitespaces)
2012-12-12 14:01:00 +01:00
noud 8119d26d35 RBAC and Roles
did add Acl Admin and Audit.
2012-12-11 17:40:57 +01:00
noud 75dfba2ae1 sync
have sync option in role.
and only display the Sync Actions when sync option or admin.
(still has to be disabled if role is below manage org events.
2012-12-07 15:00:40 +01:00
noud 1bd14256e0 coding standards
correction conform conding standards.
2012-12-04 09:07:33 +01:00
noud c6bdf794c1 db
spit generatePrivate into attr and event part (given long runtime).
2012-11-29 15:10:18 +01:00
noud d2ab860ff2 distibution
generatePrivate conform new distribution.
2012-11-28 16:34:36 +01:00
noud 889492629e distibution
add generateHop to migratemisp11to2.
(generatePrivate should still be looked at.)
2012-11-28 14:30:29 +01:00
noud 324d58d532 distribution
generate hop count.
2012-11-28 13:19:20 +01:00
noud 80571386ad audit log & terms
do not handle a timed out user log.
and
better check on login and termsaccepted.
2012-11-26 10:50:23 +01:00
noud 7c878af986 terms
slight better formulated AppController::beforeFilter()
2012-11-20 08:42:32 +01:00
noud 7a0068936a terms
slight better formulated AppController::beforeFilter()
2012-11-19 15:40:26 +01:00
noud fdd999ef35 correlation
fixed correlations being double accounted.
2012-11-15 15:53:07 +01:00
noud 4f234d1d46 terms
take 2, for a user must accept terms.
2012-11-15 13:50:20 +01:00
noud 8d2e665ceb terms
reverted just done commit
(Can't use method return value in write context ).
2012-11-15 13:24:34 +01:00
noud 8125c0c938 terms
check for user logged in (if not a server looks total stalled).
2012-11-15 13:23:08 +01:00
noud ea0ab59e4f code standards
corrections toward code standards.
2012-11-14 17:16:36 +01:00
noud 6b06ba7ff6 count & GFI Sandbox
count # attributes in events index.
plus various fixes for distribution in correlation of a GFI Sandbox
upload.
2012-11-14 16:14:04 +01:00
noud c599c2c23e GFI Sandbox
files having size 0 are not md5 summed in CakePHP.
2012-11-14 15:12:19 +01:00
noud 3a84ffb59f terms
user must accept terms.
2012-11-14 10:52:53 +01:00
noud 723ef6c3d1 correlation
respect distribution Org in correlations.
(for this
add correlations.1_private conform MYSQL.correlaton.sql
and
AppController::generateCorrelation() must be run)
2012-11-13 14:13:38 +01:00
noud 4cc6b8055f RBAC
now should be okay on the checkGroup.
(mind, we have a PHP 5.3.10 (dev) and 5.2.10 (f.a.) difference.
for CakePHP should be php > 5.2.8, pear > 1.9.0 and phpunit 3.5.0)
2012-11-08 15:28:21 +01:00
noud c722205ddf RBAC
check if $user exists, if no, not logged in.
2012-11-08 15:12:20 +01:00
noud 91f96427db RBAC
//$user =
ClassRegistry::init('User')->findById($this->Auth->user('id'));
$this->loadModel('User');
$user = $this->User->findById($this->Auth->user('id'));
2012-11-08 14:36:27 +01:00
noud a2bc237bcd RBAC
should now respect Manage, so also edit, own and org events.‏
2012-11-08 14:09:52 +01:00
noud f56cb25bed Merge branch 'master' into develop 2012-10-25 15:23:22 +02:00
noud 05085533de blackhole
full out-commented.
2012-10-25 15:16:19 +02:00
noud fa86316747 blackhole
revert the commit, this screws CSRF
(thanks to Christophe for noticing)
2012-10-24 17:16:12 +02:00
noud eae89d95cd Private.
Add "Pull only" as a sharing state where,
everybody does see an event, is pullable,
but will never be pushed.

Has a generatePrivate for db conversion now.
2012-10-18 11:40:12 +02:00
noud 67e50cb612 Private
Private events are true private and
running a server in 2 modes (private and sync),
so real private (red) or private to server (amber)
or full distributable (green).

Mind this needs a change to tables events, attributes and correlation.
These are in MYSQL.private.sql.
2012-10-17 14:45:26 +02:00
noud bf4e46da8f Merge branch 'master' into develop 2012-10-17 13:26:16 +02:00
noud 899ef6300b blackhole
i have an idea this blackholeCallback seems to overcome a lot of
blackhole situations we got.
Notably during deleting multiple events from the index,
this improved not getting a blackhole a lot.
2012-10-17 13:00:50 +02:00
noud ec0892a6ad Merge branch 'master' into develop
Conflicts:
	app/Config/bootstrap.php
2012-09-25 15:54:25 +02:00
noud 18fb8a7a64 CakePHP
Update from CakePHP to version 2.2.2
as well as needed patch files.
2012-09-25 15:41:58 +02:00
noud 8f3d624c1a Merge branch 'master' into develop
Conflicts:
	app/Controller/AppController.php
	app/Controller/AttributesController.php
	app/Controller/EventsController.php
	app/Controller/ServersController.php
	app/Controller/UsersController.php
	app/Model/Attribute.php
	app/Model/Event.php
	app/Model/Server.php
	app/Model/User.php
	app/View/Attributes/edit.ctp
	app/View/Attributes/index.ctp
	app/View/Elements/actions_menu.ctp
	app/View/Events/add.ctp
	app/View/Events/index.ctp
	app/View/Events/view.ctp
	app/View/Events/xml/view.ctp
	app/View/Servers/index.ctp
	app/View/Users/admin_index.ctp
2012-09-24 16:02:01 +02:00
noud 8179a1a691 Merge and code standards.
Forgot to clean View/Helper/AppHelper.php.
Changed underscore method names to private and protected where
appropriate given phpcs code standards errors.
2012-09-24 09:02:09 +02:00
noud 1d04652476 CakePHP Coding Standards
changed to camel caps format where needed.
2012-09-19 11:05:10 +02:00
noud 94a367c2f5 CakePHP Coding Standards
http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html

Eclipse:
Window->Preferences
	General->Editors->Text Editors
		Displayed tab width:	4
		Insert spaces for tabs	NOT
	PHP->Code Style->Formatter
		Tab policy:	Tabs
File->Convert Line Delimeters To->Unix [default]

http://mark-story.com/posts/view/static-analysis-tools-for-php
for instance:
phpcs --standard=CakePHP app/Model/

Not yet done is all camel caps format.
2012-09-18 15:30:32 +02:00
noud 253d8e1b58 Merge branch 'master' into develop
Conflicts:
	app/Controller/EventsController.php
	app/Model/Attribute.php
	app/View/Events/view.ctp
2012-09-17 13:02:53 +02:00
noud 2dea0e347d Correlation performance gain.
in Config/bootstrap.php add
Configure::write('CyDefSIG.correlation', 'sql');

possible values: 
- default, like it was
- db, correlation in database
- sql, selection on attributes i.s.o. per attribute
  (sql improvement possible if result conform db above)

Network activity, ip-src
30 class-C network ip addresses
(7650 tupels) (time in ms)

          default     db    sql
all         25366  16601  15941
            24839  16604  15611
paginated   16759   8447   6615
            17734   8639   8846

this is used in both:
- events/view/<id>
- attributes/event/<id>
2012-08-03 12:00:16 +02:00
Andrzej Dereszowski 3ff180e898 Merge branch 'develop_0.2.2-0.2.3' into develop
Conflicts:
	app/Config/Schema/schema_0.2.2.php
	app/Config/routes.php
	app/Controller/AppController.php
	app/Controller/UsersController.php
	app/Model/User.php
	app/README.txt
2012-07-24 16:09:48 +02:00
noud 78f629e6dd Redo Event.user_id 2012-07-19 14:52:27 +02:00
deresz 50e3566f3a Some modifications to category/attribute matrix. MISP database is now compatible for sync with CyDefSIG. 2012-07-04 11:28:40 +02:00
noud 66c5312ea6 DataBase migrate, Audit and Access Control granulation. 2012-06-28 17:24:12 +02:00
root b4558887ce Revert "Audit and ACL first cut."
This reverts commit 5818231f48.
2012-06-26 09:40:52 +02:00