eclipse-kura / kura

Eclipse Kura™ is a versatile framework to supercharge your edge devices, streamlining the process of configuring your gateway, connecting sensors, and IoT devices to seamlessly collect, process, and send data to the cloud.
https://eclipse.dev/kura/
Eclipse Public License 2.0
506 stars 312 forks source link

feat(rest.security.provider): Rest Security Update #5230

Closed pierantoniomerlino closed 6 months ago

pierantoniomerlino commented 6 months ago

Note: We are using the Conventional Commits convention for our pull request titles. Please take a look at the PR title format document for the supported types and scopes.

This PR adds two methods in the rest.security.provider bundle to upload the security policy. Moreover, two new methods are added to the SecurityService interface to support the new rest calls.

Related Issue: This PR fixes/closes N/A

Description of the solution adopted: The following methods are added:

POST methods Default Production Security Policy load

Description: This method loads the default production security policy
Method: POST
API PATH: services/security/v1/security-policy/load-default-production

Responses

200 OK status
500 Internal Server Error

Security Policy upload

Description: This method allows to upload a security policy
Method: POST
API PATH: services/security/v1/security-policy/load
Body:
       <base64 encoded xml security policy>"

Responses

200 OK status
500 Internal Server Error