This is necessary, because the tenant configuration methods are only accessable with specific permissions.
With the SystemSecurityContext methods can be executed as SystemRunner and therefor we can set permissions.
* updated the chaine of condtructors to set the context in the filter class
* added SystemRunner permission to TenantConfigurationManagement
* Autowired the system context to AMQP and HTTP controller
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
* moved classes to new package to seperate it from SystemResource
* updated references
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
- added acceptance test for every possible methode type
- added negative tests for restcalls which leads to bad requests
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
* changed resource path to "rest/v1/system/configs"
* added links to resources, to follow good practice recommendations
* added GET methode for parent resource system/configs
* fade out null values in json
* marked some json properties as mandatory
TMP
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
- removed cache from global getter, because it was overriding the cache of
the tenant specific getter
- changed Type of AuthName key, type of key was not important before the huge
configuration refactoring
- fixed test conditions
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
- created SpringEvalExpression for the right to change tenant configuration
- added this authorization filter to every tenant configuration related method
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
- added GET, DELETE and PUT function on configuration value interfaces
- changed Exception in TenantConfigurationManagement for correct mapping to HTTP Status
- added function to get global configurations from TenantConfigurationManagement, to have
only one class for handling these configuration values
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
* run the validation methodes inside the storing methode, to make sure that only
valid values are written inside the database
* updated TenantConfigurationManagementTest to match the validation
* added new Tests to test all validators
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
* changed error handling from return value to throw exceptions, to give the user a feedback what was wrong
* added ValidationException to ResponseExceptionHandler, to map the correct REST status codes
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
- removed PollConfigurationHelper and coresspending test, because it was replaced by TenantConfigurationManagement
- removed very specific configuration exceptions, because they are not needed anymore
Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>