Skip to content
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

Add option to allow mutable install hooks for local AEM SDK development #31

Closed
royteeuwen opened this issue May 8, 2023 · 5 comments · Fixed by #32
Closed

Add option to allow mutable install hooks for local AEM SDK development #31

royteeuwen opened this issue May 8, 2023 · 5 comments · Fixed by #32
Milestone

Comments

@royteeuwen
Copy link

When developing with the AEM SDK, a common approach is to use InstallHook's to trigger actions when a mutable content package is installed. This is for example done by the Netcentric accesscontroltool. To make it possible to leverage this capability, there should be an option to disable the error for install hooks in mutable content for local development

@royteeuwen
Copy link
Author

is resolved by #30

@kwin
Copy link
Member

kwin commented May 8, 2023

@royteeuwen Thanks for the PR. Do you know if install hooks in mutable packages work meanwhile in Cloud Manager as well? Adobe recently updated FileVault to a newer version so potentially they have fixed this...

@kwin
Copy link
Member

kwin commented May 8, 2023

I just checked the OSGi configuration of an AEM Cloud instance version 2023.4.11873.20230421T153841Z and it still doesn't contain the necessary OSGi config for PID org.apache.jackrabbit.vault.packaging.impl.PackagingImpl to grant the sling-distribution-importer the rights to execute install hooks, unfortunately.

But as the configuration PID org.apache.jackrabbit.vault.packaging.impl.PackagingImpl is not listed as protected (https://github.com/apache/sling-org-apache-sling-feature-extension-apiregions/blob/master/docs/api-regions.md#configurations) in https://repo1.maven.org/maven2/com/adobe/aem/aem-sdk-api/2023.4.11873.20230421T153841Z-230200/aem-sdk-api-2023.4.11873.20230421T153841Z-230200-aem-publish-sdk.slingosgifeature it is possible to allow hooks with a custom OSGi configuration extending the default one:

"org.apache.jackrabbit.vault.packaging.impl.PackagingImpl":    {
    "overwritePrimaryTypesOfFolders":"false",
    "isStrict":"false",
    "defaultIdConflictPolicy":"LEGACY"
  },

with the following option

"org.apache.jackrabbit.vault.packaging.impl.PackagingImpl":    {
   "authIdsForHookExecution":[
     "sling-distribution-importer"
   ]
},

@royteeuwen
Copy link
Author

@kwin ok, good to know! Nowadays we just use the startuphooks for cloud, dont know if it covers all cases though.

what do you recommend for this PR? I can update the readme with the osgi conf you show, or we can create support cases to request the osgi conf ;)?

@kwin
Copy link
Member

kwin commented May 8, 2023

I will take care of both :-) and go ahead with your PR as is first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants