Giter Club home page Giter Club logo

netcentric / aem-cloud-validator Goto Github PK

View Code? Open in Web Editor NEW
4.0 7.0 2.0 102 KB

Jackrabbit FileVault validator which verifies that a package complies with the AEM as a Cloud Service deployment restrictions outlined at https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-as-a-cloud-service/build-and-deployment.html

License: Eclipse Public License 1.0

Java 89.75% Groovy 10.25%
filevault jackrabbit jackrabbit-oak aem aemaacs

aem-cloud-validator's Issues

Also detect external install hooks

Currently only internal install hooks are detected and prevented in mutable content packages. External hooks should be detected as well.

Add rule to check for nodes below /libs

Packages containing nodes below /libs are not allowed to be deployed in Cloud Manager.
A rule enforcing this should be added.
It needs to be configurable though, to be also usable e.g. for Core WCM Components which is part of the product (i.e. is allowed in /libs).

You must not make changes in the /libs branch
Any changes you do make may be lost, because this branch is liable to changes whenever upgrades are applied to your instance.

(https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/full-stack/overlays.html?lang=en#developing)

Add rule for preventing install hooks in mutable content packages

Mutable content packages are deployed to publish via replication from author in AEMaaCS.
In case they contain an install hook the replication fails, as the replication-receiver system user does neither have admin privileges and nor is configured as allowed user for install hooks (compare with https://issues.apache.org/jira/browse/JCRVLT-427). This limitation is currently not documented at https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-as-a-cloud-service/build-and-deployment.html?lang=en#debugging but having a mutable package with an install hook leads to a failed deployment.

the allowReadOnlyMutablePaths option does not work

The option allowReadOnlyMutablePaths does not work since the validator emits the error disregarding its value when the package is not an author-only package.
A small change in the condition is needed for this option to work correctly.

to reproduce:
set the option allowReadOnlyMutablePaths in a project that contains content in a mutable path (e.g. /var). the validator will still fail because of the mutable path.

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

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

Extend rule what may be included in mutable content packages

According to Adobe-Consulting-Services/acs-aem-commons#2523 (comment) the system user which is installing packages on the publish has very limited privileges.

Currently this is

"# GRANITE-23007 - [RTC] Configure service user mapping for Pipeline replication",
    "create service user sling-distribution-importer with path system/cq:services/internal",
    "set principal ACL for sling-distribution-importer",
    "  allow jcr:modifyAccessControl,jcr:readAccessControl on /content",
    "  allow jcr:modifyAccessControl,jcr:readAccessControl on /conf",
    "  allow jcr:modifyAccessControl,jcr:readAccessControl on /etc",
    "  allow jcr:nodeTypeDefinitionManagement,rep:privilegeManagement on :repository ",
    "end",

(https://repo1.maven.org/maven2/com/adobe/aem/aem-sdk-api/2021.1.4830.20210128T075814Z-210128/aem-sdk-api-2021.1.4830.20210128T075814Z-210128-aem-publish-sdk.slingosgifeature)

It is unclear though why authorizables and ACLs below /home don't lead to exception on publish....

Make sure that "mixed" packages don't contain mutable content

Content packages of type "mixed" are only installed during the Cloud Manager "Build Images" step. That means, that all mutable content being installed through these packages is lost, as those packages are never reinstalled once the kubernetes pod is started with the live content!

Currently this doesn't lead to any error in Cloud Manager despite what is stated in https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/deploying/overview.html?lang=en#deploying-content-packages-via-cloud-manager-and-package-manager

Content packages written for AEM as a Cloud Service applications must have a clean separation between immutable and > mutable content and Cloud Manager will enforce it by failing the build, outputting a message like:

Generated content-package <PACKAGE_ID> located in file is of MIXED type

Add integration test

Next to the Unit test we should have a proper IT. Probably using maven-invoker-plugin is the easiest way to check in the context of a Maven build with filevault-package-maven-plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.