-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rest.service.listing.provider): Added REST Api for Service Listing #4857
feat(rest.service.listing.provider): Added REST Api for Service Listing #4857
Conversation
be81877
to
8a17ffd
Compare
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
547bcc9
to
360e044
Compare
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
name="RequestHandlerRegistry" | ||
policy="dynamic"/> | ||
|
||
<reference interface="org.osgi.service.useradmin.UserAdmin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the specific kura.permission.rest.serviceListing
role and allow access to this rest API to any authenticated user. If this is done this reference is not required.
|
||
public class InterfacesIdsDTO { | ||
|
||
private final List<String> interfacesIds; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try changing this to Set, in this way duplicates are removed from request automatically.
private static final String REQUEST_DEBUG_MESSAGE = "Received request from: '{}'"; | ||
|
||
private static final String APP_ID_MQTT = "SERLIST-V1"; | ||
private static final String REST_ROLE = "kura.permission.rest.serviceListing"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the specific kura.permission.rest.serviceListing
role and allow access to this rest API to any authenticated user. If this is done this constant is not required.
} | ||
} | ||
|
||
public void bindUserAdmin(UserAdmin userAdmin) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer needed if we are removing the role
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
Signed-off-by: SimoneFiorani <[email protected]>
…ng (#4857) * Added temporary bundle Signed-off-by: SimoneFiorani <[email protected]> * General bundle for both SSL and Keystore services Signed-off-by: SimoneFiorani <[email protected]> * GET works correctly, POST needs filter implementation Signed-off-by: SimoneFiorani <[email protected]> * Added POST api Signed-off-by: SimoneFiorani <[email protected]> * Turned apis into general ones: get and post working correctly Signed-off-by: SimoneFiorani <[email protected]> * Updated bundle name and structure. Only tests missing Signed-off-by: SimoneFiorani <[email protected]> * Added tests. General improvements Signed-off-by: SimoneFiorani <[email protected]> * Changed test response on full list test Signed-off-by: SimoneFiorani <[email protected]> * Updated test Signed-off-by: SimoneFiorani <[email protected]> * Updated tests Signed-off-by: SimoneFiorani <[email protected]> * Added MQTT test, fixed wrong POST body, renamed various files and bundle Signed-off-by: SimoneFiorani <[email protected]> * Updated provider Signed-off-by: SimoneFiorani <[email protected]> * Trying to resolve build failures Signed-off-by: SimoneFiorani <[email protected]> * Added principal check. Tests updated Signed-off-by: SimoneFiorani <[email protected]> * Generale clean up Signed-off-by: SimoneFiorani <[email protected]> * Update ServiceListingEndpointsTest.java * Missing headers added Signed-off-by: SimoneFiorani <[email protected]> * Removed <sorted> word from service --------- Signed-off-by: SimoneFiorani <[email protected]>
…ng (eclipse-kura#4857) * Added temporary bundle Signed-off-by: SimoneFiorani <[email protected]> * General bundle for both SSL and Keystore services Signed-off-by: SimoneFiorani <[email protected]> * GET works correctly, POST needs filter implementation Signed-off-by: SimoneFiorani <[email protected]> * Added POST api Signed-off-by: SimoneFiorani <[email protected]> * Turned apis into general ones: get and post working correctly Signed-off-by: SimoneFiorani <[email protected]> * Updated bundle name and structure. Only tests missing Signed-off-by: SimoneFiorani <[email protected]> * Added tests. General improvements Signed-off-by: SimoneFiorani <[email protected]> * Changed test response on full list test Signed-off-by: SimoneFiorani <[email protected]> * Updated test Signed-off-by: SimoneFiorani <[email protected]> * Updated tests Signed-off-by: SimoneFiorani <[email protected]> * Added MQTT test, fixed wrong POST body, renamed various files and bundle Signed-off-by: SimoneFiorani <[email protected]> * Updated provider Signed-off-by: SimoneFiorani <[email protected]> * Trying to resolve build failures Signed-off-by: SimoneFiorani <[email protected]> * Added principal check. Tests updated Signed-off-by: SimoneFiorani <[email protected]> * Generale clean up Signed-off-by: SimoneFiorani <[email protected]> * Update ServiceListingEndpointsTest.java * Missing headers added Signed-off-by: SimoneFiorani <[email protected]> * Removed <sorted> word from service --------- Signed-off-by: SimoneFiorani <[email protected]>
This PR introduces a new REST API that can retrieve the list of
kura.service.pid
of services running on Kura, or the same list but filtered through the interfaces that the services must implement.Methods added:
GET method -->
serviceListing/v1/list
--> get all servicesPOST method -->
serviceListing/v1/list/byAllInterfaces
--> get filtered services"interfacesIds" body example:
Related Issue:
Description of the solution adopted:
Screenshots:
Manual Tests:
Any side note on the changes made: