<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Liferay 7.2 CE GA2: use specific jsonws methods via properties</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119057500" />
  <subtitle>Liferay 7.2 CE GA2: use specific jsonws methods via properties</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119057500</id>
  <updated>2026-04-05T12:07:15Z</updated>
  <dc:date>2026-04-05T12:07:15Z</dc:date>
  <entry>
    <title>RE: Liferay 7.2 CE GA2: use specific jsonws methods via properties</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119069486" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119069486</id>
    <updated>2020-04-29T13:07:54Z</updated>
    <published>2020-04-29T13:07:54Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Thank you Dominik, but what I would like to do is to operate only on jsonws services &lt;strong&gt;disabling them all but the ones I use in my code&lt;/strong&gt;: these jsonws properties fits my use case better.&lt;br&gt;&lt;br&gt;&lt;u&gt;Finally I've found a working pattern!&lt;/u&gt; To disable jsonws completetly, but the subscribe-entry of bookmarks, the correct pattern is the following:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;jsonws.web.service.paths.includes=BookmarksEntry.bookmarksentry/subscribe-entry&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;If you go to /api/jsonws page, you can see that the only method allowed is bookmarksentry.subscribe-entry.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2020-04-29T13:07:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE GA2: use specific jsonws methods via properties</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119066722" />
    <author>
      <name>Dominik Marks</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119066722</id>
    <updated>2020-04-29T08:50:37Z</updated>
    <published>2020-04-29T08:50:37Z</published>
    <summary type="html">In my opinion to have more fine graned control of which services can be called you should have a look at Service Access Policies:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://help.liferay.com/hc/en-us/articles/360028711272-Service-Access-Policies"&gt;https://help.liferay.com/hc/en-us/articles/360028711272-Service-Access-Policies&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;Those will allow you to define the allowed services down to the method names of concrete classes. You can write your custom logic when a specific SAP is applied, e.g. based on IP adresses, secrets in the request or similar.</summary>
    <dc:creator>Dominik Marks</dc:creator>
    <dc:date>2020-04-29T08:50:37Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7.2 CE GA2: use specific jsonws methods via properties</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119057499" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119057499</id>
    <updated>2020-04-28T08:19:20Z</updated>
    <published>2020-04-28T08:19:20Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I'm trying to limit the access to JSON web services only to the ones I use in my code. &lt;br&gt;For example, I use &lt;strong&gt;/bookmarks.bookmarksentry/subscribe-entry,&lt;/strong&gt; and to get it work I used the following properties:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;json.web.service.enabled=true
jsonws.web.service.strict.http.method=false
jsonws.web.service.api.discoverable=true
jsonws.servlet.hosts.allowed=
jsonws.web.service.paths.includes=BookmarksEntry*
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;This way it works, but I would like to be more specific: what have I to write inside the includes property in order to use only &lt;strong&gt;subscribe-entry&lt;/strong&gt; and not, for example, &lt;strong&gt;unsubscribe-entry&lt;/strong&gt;?&lt;br&gt;I didn't find any pattern working with this need and I've tried a lot:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;jsonws.web.service.paths.includes=BookmarksEntry.subscribeEntry,\
  BookmarksEntry.subscribeEntry*,\
  BookmarksEntry*subscribeEntry*,\
  /bookmarks.bookmarksentry/subscribe-entry,\
  /bookmarks.bookmarksentry/subscribe-entry*,\
  /bookmarksentry/subscribe-entry
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;If I try to change &lt;strong&gt;BookmarksEntry*&lt;/strong&gt; with something more specific, I always get the same error:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;ERROR [ajp-nio-8009-exec-8][JSONWebServiceServiceAction:114] No JSON web service action with path /bookmarks.bookmarksentry/subscribe-entry and method null for bookmarks&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;Any suggestions?&lt;br&gt;Thank you.&lt;br&gt;&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2020-04-28T08:19:20Z</dc:date>
  </entry>
</feed>
