-
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
Open
juskora
wants to merge
11
commits into
5.0
Choose a base branch
from
dam-integration-with-dxp
base: 5.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
98e23f0
PHP API Ref enhancement (June 2nd batch) (#2403)
adriendupuis d73d3a3
Merge branch 'master' into dam-integration-with-dxp
juskora 7874147
Apply suggestions from code review
juskora 786960b
Update docs/dam/integration_with_dxp.md
juskora f5bd0ee
Added fixes after review
juskora e715d73
Updated intro
juskora 7ba2276
Added platform.sh
juskora a921e94
Apply suggestions from code review
juskora fb7b4be
Fixes
juskora 0e5e52c
Merge branch 'dam-integration-with-dxp' of github.com:ibexa/documenta…
juskora ebc6bc4
Update docs/dam/integration_with_dxp.md
juskora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,180 @@ | ||
| --- | ||
| 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 | ||
juskora marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| Next, run migrations: | ||
|
|
||
| ```bash | ||
| php bin/console ibexa:migrations:migrate | ||
| ``` | ||
|
|
||
| Two new user roles and users should be now visibile in the Back Office. | ||
|
|
||
| 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 | ||
|
|
||
| Location ID must be set to 51, if you provide different location ID, your asset library won't be accessible from DAM. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.