You are here

README.txt in Entity Share 8.3

Same filename in this branch
  1. 8.3 README.txt
  2. 8.3 tests/fixtures/files/README.txt
Same filename and directory in other branches
  1. 8 README.txt
  2. 8.2 README.txt
  3. 7 README.txt
CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Field types
 * Requirements
 * Recommended modules
 * Similar modules
 * Installation
 * Configuration
 * Maintainers


INTRODUCTION
------------

This module allows to share entities using the JSON:API. It provides an UI to
use the endpoints provided by the JSON:API module.

You can define one website as a "server" and another website as a "client". A
website can be both "client" and "server".

Currently you can only, on the client website, get content exposed from the
server website. You can't push content from the client website to the server
website.

When pulling content, referenced entities are also pulled recursively. If you
reselect a content it will be updated and referenced entities will also be
updated recursively.

The entities you want to share must have the same structure (machine name, field
machine name and storage) across the different websites.

Note about links and embed entities in RTE:

To ensure the share of links referencing entities (most of the time content) and
entities that are embedded in RTE, we recommend to use the following modules, as
they use UUID to operate:
 * Linkit (https://www.drupal.org/project/linkit)
 * Entity Embed (https://www.drupal.org/project/entity_embed)

This module does nothing to ensure the embed entities are shared automatically,
you must share the entities by yourself.

Note about path and Pathauto:

To expose the information if a content entity has its path managed by Pathauto,
Entity Share provides a field enhancer plugin to enable on the server website.

Note about multilingual content:

When pulling translatable content, the default langcode is dropped to avoid to
have to pull the content in its original language and because the original
language may be not enabled on the client website.

Referenced entities will be imported in the same language as the referencing
entity if possible. If a referenced entity is not available in the same
language, Drupal will display the entity in the first language available
depending of the languages weight.

Note about CRON usage:

If you want to synchronize entities automatically using CRON:
 * the Entity Share Cron (https://www.drupal.org/project/entity_share_cron)
   module provides an UI to import channels using Cron.

Note about Entity Share Client module:

As the Entity Share Client sub-module has a dependency on the JSON:API module,
on your client website, content and configuration will be exposed in JSON:API
endpoints, by default on /jsonapi. As the JSON:API use the Drupal access API to
check access to entities, if you have used the access API and permission system
correctly, users will not have access to content they should not access. But for
example, they will be able to access fields not displayed in view modes.

So to add a new security layer, it is advised to block requests on JSON:API
endpoints on your client website (and also if needed or possible on your server
website). This configuration can be done in your webserver configuration to
block external requests and only authorized requests coming from internal
networks or trusted IPs.

This configuration will differ based on the webserver you are using (Apache,
Nginx, Microsoft IIS, etc.) and also based on your network structure, for
example if you have a cache server (Varnish or other) or load balancer (Nginx,
HAProxy, etc.).

Note about full pager feature:

On the pull form, you can get a full pagination if on the server side, the
JSON:API Extras module is enabled and if the configuration "Include count in
collection queries" is enabled on JSON:API Extras settings form.

Limitation:

Currently we do not handle config entities and user entities to avoid side
effects.

FIELD TYPES
-----------

See the documentation page
https://www.drupal.org/docs/contributed-modules/entity-share/supported-field-types.


REQUIREMENTS
------------

This module requires the following modules:
 * JSON:API (https://www.drupal.org/project/jsonapi)


RECOMMENDED MODULES
-------------------

 * JSON:API Extras (https://www.drupal.org/project/jsonapi_extras):
   To allow to customize the JSON:API endpoints and to enable full pager
   feature. See the documentation page
   https://www.drupal.org/docs/contributed-modules/entity-share/supported-field-types.


SIMILAR MODULES
---------------

 * Entity pilot (https://www.drupal.org/project/entity_pilot): Entity Share does
   not require any subscription to a service.


INSTALLATION
------------

 * Install and enable the Entity Share Server on the site you want to get
   content from.
 * Install and enable the Entity Share Client on the site you want to put
   content on.


CONFIGURATION
-------------

On the server website:
 * Enable the Entity Share Server module.
 * Optional: Prepare an user with the permission "Access channels list" if you
   do not want to use the admin user.
 * Go to the configuration page, Configuration > Web services > Entity Share >
   Channels (admin/config/services/entity_share/channel) and add at least one
   channel.

On the client website:
 * Enable the Entity Share Client module.
 * Go to the configuration page, Configuration > Web services > Entity Share >
   Remote websites (admin/config/services/entity_share/remote) and create a
   remote website corresponding to your server website with the user name and
   password configured on the server website.
 * Go to the pull form, Content > Entity Share > Pull entities
   (admin/content/entity_share/pull), and select your remote website, the
   available channels will be listed and when selecting a channel, the entities
   exposed on this channel will be available to synchronize.
 * Optional Key module integration
   - https://www.drupal.org/project/key
   - https://www.drupal.org/docs/8/modules/key/concepts-and-terminology
   Credentials used to authorize pulling from remotes may be more securely
   stored using the Key module. Additional optional modules allow the storage in
   an external key/value storage service. With only the Key module, credentials
   may be stored in JSON format in files outside the web root.
   1. Configure Keys: Key types for Entity Share are listed in Key config form
   (/admin/config/system/keys). Instructions for each type are shown in the
   form.
   2. Create a remote and select Key module as the credential provider, then
   select the appropriate key.


MAINTAINERS
-----------

Current maintainers:
 * Thomas Bernard (ithom) - https://www.drupal.org/user/3175403
 * Florent Torregrosa (Grimreaper) - https://www.drupal.org/user/2388214
 * Ivan Vujović (ivan.vujovic) - https://www.drupal.org/user/382945
 * Yarik Lutsiuk (yarik.lutsiuk) - https://www.drupal.org/user/3212333

This project has been sponsored by:
 * Smile - https://www.drupal.org/smile
   Sponsored initial development, evolutions, maintenance and support.
 * Lullabot - https://www.drupal.org/lullabot
   Sponsored development of new features in association with
   https://www.drupal.org/carnegie-mellon-university

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Field types
  5. * Requirements
  6. * Recommended modules
  7. * Similar modules
  8. * Installation
  9. * Configuration
  10. * Maintainers
  11. INTRODUCTION
  12. ------------
  13. This module allows to share entities using the JSON:API. It provides an UI to
  14. use the endpoints provided by the JSON:API module.
  15. You can define one website as a "server" and another website as a "client". A
  16. website can be both "client" and "server".
  17. Currently you can only, on the client website, get content exposed from the
  18. server website. You can't push content from the client website to the server
  19. website.
  20. When pulling content, referenced entities are also pulled recursively. If you
  21. reselect a content it will be updated and referenced entities will also be
  22. updated recursively.
  23. The entities you want to share must have the same structure (machine name, field
  24. machine name and storage) across the different websites.
  25. Note about links and embed entities in RTE:
  26. To ensure the share of links referencing entities (most of the time content) and
  27. entities that are embedded in RTE, we recommend to use the following modules, as
  28. they use UUID to operate:
  29. * Linkit (https://www.drupal.org/project/linkit)
  30. * Entity Embed (https://www.drupal.org/project/entity_embed)
  31. This module does nothing to ensure the embed entities are shared automatically,
  32. you must share the entities by yourself.
  33. Note about path and Pathauto:
  34. To expose the information if a content entity has its path managed by Pathauto,
  35. Entity Share provides a field enhancer plugin to enable on the server website.
  36. Note about multilingual content:
  37. When pulling translatable content, the default langcode is dropped to avoid to
  38. have to pull the content in its original language and because the original
  39. language may be not enabled on the client website.
  40. Referenced entities will be imported in the same language as the referencing
  41. entity if possible. If a referenced entity is not available in the same
  42. language, Drupal will display the entity in the first language available
  43. depending of the languages weight.
  44. Note about CRON usage:
  45. If you want to synchronize entities automatically using CRON:
  46. * the Entity Share Cron (https://www.drupal.org/project/entity_share_cron)
  47. module provides an UI to import channels using Cron.
  48. Note about Entity Share Client module:
  49. As the Entity Share Client sub-module has a dependency on the JSON:API module,
  50. on your client website, content and configuration will be exposed in JSON:API
  51. endpoints, by default on /jsonapi. As the JSON:API use the Drupal access API to
  52. check access to entities, if you have used the access API and permission system
  53. correctly, users will not have access to content they should not access. But for
  54. example, they will be able to access fields not displayed in view modes.
  55. So to add a new security layer, it is advised to block requests on JSON:API
  56. endpoints on your client website (and also if needed or possible on your server
  57. website). This configuration can be done in your webserver configuration to
  58. block external requests and only authorized requests coming from internal
  59. networks or trusted IPs.
  60. This configuration will differ based on the webserver you are using (Apache,
  61. Nginx, Microsoft IIS, etc.) and also based on your network structure, for
  62. example if you have a cache server (Varnish or other) or load balancer (Nginx,
  63. HAProxy, etc.).
  64. Note about full pager feature:
  65. On the pull form, you can get a full pagination if on the server side, the
  66. JSON:API Extras module is enabled and if the configuration "Include count in
  67. collection queries" is enabled on JSON:API Extras settings form.
  68. Limitation:
  69. Currently we do not handle config entities and user entities to avoid side
  70. effects.
  71. FIELD TYPES
  72. -----------
  73. See the documentation page
  74. https://www.drupal.org/docs/contributed-modules/entity-share/supported-field-types.
  75. REQUIREMENTS
  76. ------------
  77. This module requires the following modules:
  78. * JSON:API (https://www.drupal.org/project/jsonapi)
  79. RECOMMENDED MODULES
  80. -------------------
  81. * JSON:API Extras (https://www.drupal.org/project/jsonapi_extras):
  82. To allow to customize the JSON:API endpoints and to enable full pager
  83. feature. See the documentation page
  84. https://www.drupal.org/docs/contributed-modules/entity-share/supported-field-types.
  85. SIMILAR MODULES
  86. ---------------
  87. * Entity pilot (https://www.drupal.org/project/entity_pilot): Entity Share does
  88. not require any subscription to a service.
  89. INSTALLATION
  90. ------------
  91. * Install and enable the Entity Share Server on the site you want to get
  92. content from.
  93. * Install and enable the Entity Share Client on the site you want to put
  94. content on.
  95. CONFIGURATION
  96. -------------
  97. On the server website:
  98. * Enable the Entity Share Server module.
  99. * Optional: Prepare an user with the permission "Access channels list" if you
  100. do not want to use the admin user.
  101. * Go to the configuration page, Configuration > Web services > Entity Share >
  102. Channels (admin/config/services/entity_share/channel) and add at least one
  103. channel.
  104. On the client website:
  105. * Enable the Entity Share Client module.
  106. * Go to the configuration page, Configuration > Web services > Entity Share >
  107. Remote websites (admin/config/services/entity_share/remote) and create a
  108. remote website corresponding to your server website with the user name and
  109. password configured on the server website.
  110. * Go to the pull form, Content > Entity Share > Pull entities
  111. (admin/content/entity_share/pull), and select your remote website, the
  112. available channels will be listed and when selecting a channel, the entities
  113. exposed on this channel will be available to synchronize.
  114. * Optional Key module integration
  115. - https://www.drupal.org/project/key
  116. - https://www.drupal.org/docs/8/modules/key/concepts-and-terminology
  117. Credentials used to authorize pulling from remotes may be more securely
  118. stored using the Key module. Additional optional modules allow the storage in
  119. an external key/value storage service. With only the Key module, credentials
  120. may be stored in JSON format in files outside the web root.
  121. 1. Configure Keys: Key types for Entity Share are listed in Key config form
  122. (/admin/config/system/keys). Instructions for each type are shown in the
  123. form.
  124. 2. Create a remote and select Key module as the credential provider, then
  125. select the appropriate key.
  126. MAINTAINERS
  127. -----------
  128. Current maintainers:
  129. * Thomas Bernard (ithom) - https://www.drupal.org/user/3175403
  130. * Florent Torregrosa (Grimreaper) - https://www.drupal.org/user/2388214
  131. * Ivan Vujović (ivan.vujovic) - https://www.drupal.org/user/382945
  132. * Yarik Lutsiuk (yarik.lutsiuk) - https://www.drupal.org/user/3212333
  133. This project has been sponsored by:
  134. * Smile - https://www.drupal.org/smile
  135. Sponsored initial development, evolutions, maintenance and support.
  136. * Lullabot - https://www.drupal.org/lullabot
  137. Sponsored development of new features in association with
  138. https://www.drupal.org/carnegie-mellon-university