|
| 1 | +# Evaluation with FredBet! |
| 2 | +This guide details analysing the **[FredBet](https://github.com/fred4jupiter/fredbet)** project version 2.2.1 by AuthCheck. |
| 3 | + |
| 4 | +In the folder *XYZ*, there is a main configuration and an input model file, developed for each of the 22 controller's analysis, present in the **FredBet** project. Although, there is no need for having separate files for each of the controller, but they help in analyzing, evaluating and experimenting with each controller separately. However, the configurations and input model files could be merged easily, if it is desired. |
| 5 | + |
| 6 | +The input model files list all the method which mapped onto some path, with or without authorization restrictions in the controllers. |
| 7 | + |
| 8 | +## Controllers and their permissions |
| 9 | + |
| 10 | +Following is the list of the 22 controllers and their permissions in the project, in lexicographical order. |
| 11 | +| Controller | Groups | Permissions | |
| 12 | +|----------------|-------------------------------|-----------------------------| |
| 13 | +|AdminController|ROLE_ADMIN|PERM_ADMINISTRATION, PERM_SHOW_ACTIVE_USERS, PERM_SHOW_LAST_LOGINS | |
| 14 | +|BetController||| |
| 15 | +|ConfigurationController|ROLE_ADMIN|PERM_ADMINISTRATION| |
| 16 | +|CreateEditMatchController|ROLE_ADMIN |PERM_CREATE_MATCH,<br> PERM_EDIT_MATCH,<br> PERM_DELETE_MATCH| |
| 17 | +|DatabaseBackupController|ROLE_ADMIN|PERM_ADMINISTRATION| |
| 18 | +|ExcelExportController|ROLE_ADMIN|PERM_ADMINISTRATION| |
| 19 | +|ExcelImportController|ROLE_ADMIN|PERM_ADMINISTRATION| |
| 20 | +|ExtraBetController||| |
| 21 | +|HomeController||| |
| 22 | +|ImageCroppingController||| |
| 23 | +|ImageGalleryController||| |
| 24 | +|ImageGroupController|ROLE_ADMIN|PERM_EDIT_IMAGE_GROUP| |
| 25 | +|ImageUploadController||| |
| 26 | +|InfoController|*Ambigious*|PERM_EDIT_INFOS_RULES| |
| 27 | +|MatchController||| |
| 28 | +|MatchResultController|*Ambigious*|PERM_EDIT_MATCH_RESULT| |
| 29 | +|PointsFrequencyController||| |
| 30 | +|RankingController||| |
| 31 | +|RuntimeConfigurationController|ROLE_ADMIN |PERM_ADMINISTRATION| |
| 32 | +|SystemInfoController|ROLE_ADMIN |PERM_ADMINISTRATION| |
| 33 | +|UserController|*Ambigious*|PERM_EDIT_USER,<br> PERM_DELETE_USER,<br> PERM_CREATE_USER, <br>PERM_PASSWORD_RESET| |
| 34 | +|UserProfileController||| |
| 35 | + |
| 36 | +, and after them the schema of groups and permission is listed. |
| 37 | + |
| 38 | +## Group/Permission schema |
| 39 | + |
| 40 | +Following is the Group/Permission schema in the **FredBet** project. |
| 41 | +| Group | Permissions | |
| 42 | +|----------------|----------------------------| |
| 43 | +|ROLE_USER|| |
| 44 | +|ROLE_USER_ENTER_RESULTS|PERM_EDIT_MATCH_RESULT| |
| 45 | +|ROLE_SUB_ADMIN|PERM_EDIT_MATCH,<br> PERM_EDIT_MATCH_RESULT,<br> PERM_CREATE_USER,<br> PERM_USER_ADMINISTRATION,<br> PERM_PASSWORD_RESET,<br> PERM_EDIT_USER,<br> PERM_EDIT_INFOS_RULES,<br> PERM_EDIT_INFOS_PRICES | |
| 46 | +|ROLE_ADMIN|PERM_CREATE_MATCH,<br> PERM_EDIT_MATCH,<br> PERM_EDIT_MATCH_RESULT,<br> PERM_DELETE_MATCH,<br> PERM_CREATE_USER,<br> PERM_EDIT_USER,<br> PERM_DELETE_USER,<br> PERM_PASSWORD_RESET,<br> PERM_USER_ADMINISTRATION,<br> PERM_SYSTEM_INFO,<br> PERM_ADMINISTRATION,<br> PERM_CHANGE_USER_ROLE,<br> PERM_EDIT_INFOS_RULES,<br> PERM_EDIT_INFOS_PRICES,<br> PERM_SHOW_ACTIVE_USERS,<br> PERM_SHOW_LAST_LOGINS,<br> PERM_EDIT_IMAGE_GROUP,<br> PERM_DOWNLOAD_IMAGES,<br> PERM_DELETE_ALL_IMAGES |
| 47 | + | |
| 48 | + |
| 49 | +## Input models introducing CWEs |
| 50 | + |
| 51 | +There is also *ZYX* folder which contains the configuration files and inaccurate input models for introducing CWE 862 and CWE 863, each in two controllers. They as aforementioned, do not need to be separate files and can be merged easily into two files, if it is desired. The CWEs and their controllers are listed below. |
| 52 | + |
| 53 | +| CWE Type | Controller | |
| 54 | +|----------------|----------------------------| |
| 55 | +|CWE 862|PointsFrequencyController,<br> UserProfileContoller| |
| 56 | +|CWE 863|AdminController,<br> ImageGroupController| |
| 57 | + |
| 58 | +The changes made in the input models of the controllers (peresent in XYZ) for each CWE are: |
| 59 | + |
| 60 | +- CWE 862: |
| 61 | + + PointsFrequencyController: Added an "authorizationExpression" : "hasAuthority('PERM_ADMINISTRATION')" on its show(...) method in its input model. |
| 62 | + + UserProfileContoller: Added an "authorizationExpression" : "hasAuthority('PERM_ADMINISTRATION')" on its changePassword(...) and changeUsername(...) methods in its input model. |
| 63 | + |
| 64 | +- CWE 863: |
| 65 | + + AdminController: Changed the "authorizationExpression" : "hasAuthority('PERM_SHOW_LAST_LOGINS')" to "hasAuthority('PERM_ADMINISTRATION')" of showLastLogins(...) method in its input model. |
| 66 | + + ImageGroupController: Changed the "authorizationExpression" : "hasAuthority('PERM_EDIT_IMAGE_GROUP')" to "hasAuthority('PERM_ADMINISTRATION')" of show() and deleteImage() methods in its input model. |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
0 commit comments