Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FileVault validators which verify that content packages comply with certain namespacing rules.

License

NotificationsYou must be signed in to change notification settings

Netcentric/aem-content-package-namespace-validators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusLicenseMaven CentralSonarCloud Quality Gate StatusSonarCloud Coverage

Overview

Validates that FileVault content packages stick to certain namespacing rules. This is helpful to make sure that separate AEM applications may run in parallel on the same server without stepping on each other toes. This is particularly useful withmultiple teams working on the same AEM environment (also outlined inConsiderations for a multi-team setup).

There are several validators included in this artifact, all relate to namespacing rules for certain aspects of AEM:

  1. FileVault Content Package Filter (root attribute of eachfilter element)
  2. FileVault Content Package ID (bothgroup and optionallyname package properties)
  3. Oak Authorizables (rep:principalName and optionallyrep:authorizableId properties of users/groups)
  4. Oak Query Index Definition (path restrictions forLucene orProperty index definitions)
  5. OSGi Configuration
  6. Sling Resource Type and Resource Super Type (sling:resourceType andsling:resourceSuperType properties)
  7. AEM Client Library (categories property)
  8. Embedded Bundles (theBundle-SymbolicName of embedded bundles, can be validated on bundle side viahttps://github.com/Netcentric/bundle-namespace-validators as well)

Namespacing has been explicitly mentioned inAchim Koch's Blog: Hosting Multiple Tenants on AEM but obviously namespacing is just one of multiple aspects to consider for multi-tenant AEM environments.

There was also a talk about multi-tenancy and this tool in theadaptTo 2025 conference.

For a similar tool for OSGi bundles look athttps://github.com/Netcentric/bundle-namespace-validators.

Implementation

This artifact provides multiple validator implementations for theFileVault Validation Module and can be used for example with thefilevault-package-maven-plugin like outlined below.

Settings

The following options are supported apart from the default settings mentioned inFileVault validation.Leaving the validators with the default options will not emit validation issues at all, i.e. none of the options are mandatory.

Validator IDOptionDescriptionSince
netcentric-filter-namespaceallowedPathPatternsComma-separated list of regular expression patterns. Each package filterroot must match at least one of the given patterns.1.0.0
netcentric-packageid-namespaceallowedGroupPatternsComma-separated list of regular expression patterns. The package's group must match at least one of the given patterns.1.0.0
netcentric-packageid-namespaceallowedNamePatternsComma-separated list of regular expression patterns. The package's name must match at least one of the given patterns.1.0.0
netcentric-authorizable-namespaceallowedPrincipalNamePatternsComma-separated list of regular expression patterns. The authorizable'srep:principalName must match at least one of the given patterns.1.0.0
netcentric-authorizable-namespaceallowedAuthorizableIdPatternsComma-separated list of regular expression patterns. The authorizable'srep:authorizableId or its node name (if the property does not exist( must match at least one of the given patterns.1.0.0
netcentric-authorizable-namespaceallowedAuthorizableIdPatternsComma-separated list of regular expression patterns. The authorizable'srep:authorizableId or its node name (if the property does not exist) must match at least one of the given patterns.1.0.0
netcentric-oakindex-namespaceallowedPathPatternsComma-separated list of regular expression patterns. Each Oak index definition's path restriction (forlucene index types orproperty index types) must match at least one of the given patterns.1.0.0
netcentric-osgiconfig-namespaceallowedPidPatternsComma-separated list of regular expression patterns. Each (non-factory) configuration name given via theOSGi Installer must have a PID matching at least one of the given patterns.1.0.0
netcentric-osgiconfig-namespaceallowedFactoryPidNamesComma-separated list of regular expression patterns. Each factory configuration name given via theOSGi Installer must have a name matching at least one of the given patterns.1.0.0
netcentric-osgiconfig-namespacerestrictFactoryConfigurationsToAllowedPidPatternsBoolean flag,false by default. If set totrue each factory configuration PID given via theOSGi Installer must also matching at least one of the given patterns fromallowedPidPatterns.1.0.0
netcentric-resourcetype-namespaceallowedTypePatternsComma-separated list of regular expression patterns. Eachsling:resourceType property of arbitrary JCR nodes must match at least one of the given patterns.1.0.0
netcentric-resourcetype-namespaceallowedSuperTypePatternsComma-separated list of regular expression patterns. Eachsling:resourceSuperType property of arbitrary JCR nodes must match at least one of the given patterns.1.0.0
netcentric-clientlibrary-namespaceallowedCategoryPatternsComma-separated list of regular expression patterns. Eachclient library'scategories value must match at least one of the given patterns.1.0.0
netcentric-embedded-namespaceallowedBundleSymbolicNamePatternsComma-separated list of regular expression patterns. Eachembedded bundle in the package must have aBundle-SymbolicName in its manifest which matches at least one of the given patterns.1.1.0

Due to the use of comma-separated strings it is not possible to use a comma within the regular expressions. However, as those are matched against names/paths (which don't allow a comma anyhow) using the comma inside the regular expressions shouldn't be necessary anyhow.

Fix Violations

Make the relevant attribute value/name/property value match one of the given patterns.

Usage with Maven

You can use this validator with theFileVault Package Maven Plugin in version 1.4.0 or higher like this

<plugin>  <groupId>org.apache.jackrabbit</groupId>  <artifactId>filevault-package-maven-plugin</artifactId>  <configuration>    <validatorsSettings>      <netcentric-authorizable-namespace>        <options>          <allowedPrincipalNamePatterns>mytenant-.*</allowedPrincipalNamePatterns>          <allowedAuthorizableIdPatterns>mytenant-.*</allowedAuthorizableIdPatterns>        </options>      </netcentric-authorizable-namespace>      <netcentric-clientlibrary-namespace>        <options>          <allowedCategoryPatterns>mytenant-.*</allowedCategoryPatterns>        </options>      </netcentric-clientlibrary-namespace>     <netcentric-filter-namespace>        <options>          <allowedFilterRootPatterns>/apps/mytenant(/.*)?,/conf/mytenant(/.*)?,/home/users/mytenant(/.*)?,/oak:index/mytenant-(.*)</allowedFilterRootPatterns>        </options>      </netcentric-filter-namespace>      <netcentric-oakindex-namespace>        <options>          <allowedPathPatterns>/content/mytenant(/.*)?</allowedPathPatterns>        </options>      </netcentric-oakindex-namespace>      <netcentric-osgiconfig-namespace>        <options>          <allowedPidPatterns>com\.example\.mytenant\..*</allowedPidPatterns>          <allowedFactoryPidNames>name.*</allowedFactoryPidNames>          <restrictFactoryConfigurationsToAllowedPidPatterns>true</restrictFactoryConfigurationsToAllowedPidPatterns>        </options>      </netcentric-osgiconfig-namespace>      <netcentric-packageid-namespace>        <options>          <allowedGroupPatterns>biz\.netcentric\.filevault\.validator\.aem\.namespace\.it</allowedGroupPatterns>          <allowedNamePatterns>.*-package</allowedNamePatterns>        </options>      </netcentric-packageid-namespace>      <netcentric-resourcetype-namespace>        <options>          <allowedSuperTypePatterns>/apps/mytenant2/components/.*</allowedSuperTypePatterns>          <allowedTypePatterns>/apps/mytenant2/components/.*</allowedTypePatterns>        </options>      </netcentric-resourcetype-namespace>      <netcentric-embedded-namespace>        <options>          <allowedBundleSymbolicNamePatterns>mytenant-.*<allowedBundleSymbolicNamePatterns>        </options>      </netcentric-embedded-namespace>    </validatorsSettings>  </configuration>  <dependencies>    <dependency>      <groupId>biz.netcentric.filevault.validators</groupId>      <artifactId>aem-content-package-namespace-validators</artifactId>      <version><latestversion></version>    </dependency>  </dependencies></plugin>

There is also a project skeleton athttps://github.com/Netcentric/aem-multitenant-demo which includes these validators with a simple prefix based tenant namespace approach.

Adobe, and AEM are either registered trademarks or trademarks of Adobe in the United States and/or other countries.

About

FileVault validators which verify that content packages comply with certain namespacing rules.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp