-
Notifications
You must be signed in to change notification settings - Fork 81
IBX-8599: DAM integration with DXP #2476
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
base: 5.0
Are you sure you want to change the base?
Changes from 3 commits
98e23f0
d73d3a3
7874147
786960b
f5bd0ee
e715d73
7ba2276
a921e94
fb7b4be
0e5e52c
ebc6bc4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,180 @@ | ||
| --- | ||
|
Check warning on line 1 in docs/dam/integration_with_dxp.md
|
||
| description: Integrate DAM with your Ibexa DXP project to use an effective tool for managing marketing assets. | ||
| --- | ||
|
|
||
|
|
||
| # Integrate DAM with DXP | ||
|
|
||
| DAM integration with [[= product_name =]] is dedicated to [[= product_name_base =]] users who also use Actito services. It enables using assets repository stored in the DXP in the Actito platform to build and insert marketing assets into campaign emails. | ||
| For more information, see [Actito documentation](https://cdn3.actito.com/fe/actito-documentation/docs/Using_Assets_from_a_DAM/#connection-to-ibexa). | ||
juskora marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Enable Elasticsearch or Solr | ||
|
|
||
| To ensure proper indexing and search results, DAM requires one of | ||
| the following search engines on your server: | ||
|
|
||
| - [Elasticsearch](install_elastic_search.md) | ||
| - [Solr](install_solr.md) | ||
|
|
||
|
|
||
| ## Enable OAuth Servers | ||
juskora marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Next, enable 0Auth Server authentication. To do it, follow steps up to the [Client section](oauth_server.md). | ||
juskora marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Install DAM package | ||
|
|
||
| Install dedicated DAM `ibexa/dam-user` package into your [[= product_name =]] instance. | ||
|
|
||
| To install, run the following command: | ||
|
|
||
| ```bash | ||
| composer require ibexa/dam-user | ||
| ``` | ||
|
|
||
| Add the `ibexa_dam_oauth2_client_user` table to the database: | ||
|
|
||
| ```bash | ||
| php bin/console ibexa:doctrine:schema:dump-sql vendor/ibexa/dam-user/src/bundle/Resources/config/schema.yaml | mysql -u <username> -p <database_name> | ||
| ``` | ||
|
|
||
| Next, add technical users, required by DAM to your [[= product_name =]] instance. | ||
juskora marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To do it, first, import the migration file: | ||
|
|
||
| ```bash | ||
| php bin/console ibexa:migrations:import vendor/ibexa/dam-user/src/bundle/Resources/migrations/2024_07_11_09_10_dam_technical_users.yaml | ||
| ``` | ||
|
|
||
| Next, run migrations: | ||
|
|
||
| ```bash | ||
| php bin/console ibexa:migrations:migrate | ||
| ``` | ||
|
|
||
| Two new user roles and users should be now visibile in the Back Office. | ||
|
Check warning on line 54 in docs/dam/integration_with_dxp.md
|
||
|
|
||
| Create OAuth2 client for the DXP user: | ||
|
|
||
| ```bash | ||
| php bin/console ibexa:dam:create-oauth2-client <client-name> <user-identifier> | ||
juskora marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## Override admin-ui | ||
|
|
||
| Add the following configuration in the `yaml` file, for example, `ibexa_admin_ui_settings.yaml`: | ||
juskora marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ??? note "`ibexa_admin_ui_settings.yaml`" | ||
|
|
||
| ```yaml | ||
| parameters: | ||
| # Content Tree Module | ||
| ibexa.site_access.config.site_group.content_tree_module.load_more_limit: 30 | ||
| ibexa.site_access.config.site_group.content_tree_module.children_load_max_limit: 200 | ||
| ibexa.site_access.config.site_group.content_tree_module.tree_max_depth: 10 | ||
| ibexa.site_access.config.site_group.content_tree_module.allowed_content_types: [] | ||
| ibexa.site_access.config.site_group.content_tree_module.ignored_content_types: [] | ||
| ibexa.site_access.config.site_group.content_tree_module.tree_root_location_id: ~ | ||
|
|
||
| # Pagination limits | ||
| ibexa.site_access.config.site_group.pagination.search_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.trash_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.section_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.language_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.role_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.content_type_group_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.content_type_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.role_assignment_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.policy_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.version_draft_limit: 5 | ||
| ibexa.site_access.config.site_group.pagination.reverse_relation_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.content_system_url_limit: 5 | ||
| ibexa.site_access.config.site_group.pagination.content_custom_url_limit: 5 | ||
| ibexa.site_access.config.site_group.pagination.content_role_limit: 5 | ||
| ibexa.site_access.config.site_group.pagination.content_policy_limit: 5 | ||
| ibexa.site_access.config.site_group.pagination.bookmark_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.notification_limit: 5 | ||
| ibexa.site_access.config.site_group.pagination.user_settings_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.content_draft_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.location_limit: 10 | ||
| ibexa.site_access.config.site_group.pagination.url_wildcards: 10 | ||
|
|
||
| # Security | ||
| ibexa.site_access.config.site_group.security.token_interval_spec: PT1H | ||
|
|
||
| # User identifier | ||
| ibexa.site_access.config.site_group.user_content_type_identifier: ['user'] | ||
|
|
||
| # User Group identifier | ||
| ibexa.site_access.config.site_group.user_group_content_type_identifier: ['user_group'] | ||
|
|
||
| # Subtree Operations | ||
| ibexa.site_access.config.site_group.subtree_operations.copy_subtree.limit: 100 | ||
|
|
||
| # Notifications | ||
| ibexa.site_access.config.site_group.notifications.error.timeout: 0 | ||
| ibexa.site_access.config.site_group.notifications.warning.timeout: 0 | ||
| ibexa.site_access.config.site_group.notifications.success.timeout: 5000 | ||
| ibexa.site_access.config.site_group.notifications.info.timeout: 0 | ||
| ``` | ||
|
|
||
| ## Add CROSS-ORIGIN config | ||
|
|
||
| To integrate DAM you need to add in the `config/packages/nelmio_cors.yaml` following configuration: | ||
|
|
||
| ```yaml | ||
| nelmio_cors: | ||
| defaults: | ||
| origin_regex: true | ||
| allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] | ||
| allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE', 'PUBLISH', 'COPY'] | ||
| allow_headers: ['Content-Type', 'Authorization', 'X-HTTP-Method-Override'] | ||
| expose_headers: ['Link'] | ||
| max_age: 3600 | ||
| paths: | ||
| '^/api/ibexa/v2/': | ||
| allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE', 'PUBLISH', 'COPY'] | ||
| allow_headers: ['Content-Type', 'Authorization', 'X-HTTP-Method-Override'] | ||
| ``` | ||
|
|
||
| Next, in the `.env` file provide path with a regular expression: | ||
|
|
||
| `CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1|(.+\.acme\.(com|eu)))?(:[0-9]+)?$'` | ||
juskora marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| ### Override `nelmio` settings | ||
|
|
||
| config/services.yaml | ||
|
|
||
| ```yaml | ||
| nelmio_cors.options_provider.config: | ||
| class: '%nelmio_cors.options_provider.config.class%' | ||
| arguments: | ||
| $paths: '%nelmio_cors.map%' | ||
| $defaults: '%nelmio_cors.defaults%' | ||
| tags: | ||
| - | ||
| name: nelmio_cors.options_provider | ||
| priority: 255 | ||
| ``` | ||
|
|
||
| Set the `location ID` to `51`. | ||
| ```yaml | ||
| parameters: | ||
| ibexa.dam_app.image.root_location_id: 51 | ||
| ``` | ||
|
|
||
| Add DAM `ConfigProvider`: | ||
|
|
||
| ```yaml | ||
| app.config.provider.dam_app: | ||
| class: Ibexa\AdminUi\UI\Config\Provider\Value | ||
| arguments: | ||
| $value: | ||
| imageRootLocationId: '%ibexa.dam_app.image.root_location_id%' | ||
| tags: | ||
| - { name: ibexa.admin_ui.config.provider, key: 'damApp' } | ||
| ``` | ||
|
|
||
| !!! caution | ||
|
|
||
|
Check warning on line 179 in docs/dam/integration_with_dxp.md
|
||
| Location ID must be set to 51, if you provide different location ID, your asset library won't be accessible from DAM. | ||
Uh oh!
There was an error while loading. Please reload this page.