Search code examples
liferayliferay-7liferay-dxp

Disabling Liferay Webservice(s) using portal properties or Control Panel


I am using Liferay DXP for my portal application. I want to do following implementation using Control Panel or Portal Properties

  1. Disable unused default/custom webservices.
  2. Disable the access of API page (api/jsonws)

Whether above is possible using Portal Properties or control panel?

Any Reference/help would be greatly appreciated.


Solution

  • #
    # The property "jsonws.web.service.paths.excludes" denotes patterns for JSON
    # web service action paths that are not allowed even if they match one of
    # the patterns set in "jsonws.web.service.paths.includes".
    #
    # Env: LIFERAY_JSONWS_PERIOD_WEB_PERIOD_SERVICE_PERIOD_PATHS_PERIOD_EXCLUDES
    #
    jsonws.web.service.paths.excludes=\
        /user/update-password
    
    
    #
    # Set this property to true if JSON web services are discoverable through
    # the API page.
    #
    # Env: LIFERAY_JSONWS_PERIOD_WEB_PERIOD_SERVICE_PERIOD_API_PERIOD_DISCOVERABLE
    #
    jsonws.web.service.api.discoverable=true
    

    You can try above properties in portal-ext.properties.

    For Reference visit. https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal.properties