You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HISTORY
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
actool 1.6 - August 14, 2015
2
2
-------------------------
3
-
Fixed #23: AEM 6.1 Compatibility
4
-
Fixed #22: SQL2 Queries and new oakindexpackage that can be installed directly or taken as reference to avoid traversal fallback with queries for [rep:ACL]
5
-
Fixed #25: better error handling (also renamed method for clarity)
3
+
- AEM 6.1 Compatibility
4
+
- Better query performance and new accesscontroltool-oakindex-package (containing an index for [rep:ACL])
5
+
- Ability to add users in a user_config section (in the same format as group_config). Users additionally support property isSystemUser for AEM 6.1
@@ -68,6 +69,17 @@ If the isMemberOf property of a group contains a group which is not yet installe
68
69
69
70
The members property contains a list of groups where this group is added as isMemberOf.
70
71
72
+
## Configuration of users
73
+
74
+
In general it is best practice to not generate regular users by the AC Tool but use other mechanism (e.g. LDAP) to create users. However, it can be useful to create system users (e.g. for replication agents or OSGi service authentiation) or test users on staging environments.
75
+
76
+
Users can be configured in the same way as groups in the **user_config** section. There are two differences to groups:
77
+
78
+
* the attribute "members" cannot be used (for obvious reasons)
79
+
* the attribute "password" can be used for preset passwords
80
+
* the boolean attribute isSystemUser is used to create system users in AEM 6.1
81
+
82
+
71
83
## Configuration of ACEs
72
84
73
85
The configurations are done per principal followed by indented informations which comprise of config data which represents the settings per ACE. This data includes
@@ -230,28 +242,24 @@ Example showing 3 separate project-specific configuration sub-nodes each contain
230
242
231
243
<imgsrc="docs/images/crx-storage.png">
232
244
233
-
The projectspecific configuration files get stored in CRX under a node which can be set in the OSGi configuration of the AcService (system/console/configMgr). Each child node contains the project specific configuration file(s). Everytime a new installation gets executed, the newest configuration file gets used. The folder structure gets created by deployment or manually in CRX. Each time a new configuration file gets uploaded in CRX (e.g. deployment) or the content of a file gets changed a node listener can trigger a new installation of the configurations. This behaviour can be enabled/disabled in UploadListenerService OSGi config.
245
+
The project specific configuration files are stored in CRX under a node which can be set in the OSGi configuration of the AcService (system/console/configMgr). Each folder underneath this location may contain `*.yaml` files that contain AC configuration. The folder structure gets created by deployment or manually in CRX.
246
+
247
+
In general the parent node may specify required Sling run modes being separated by a dot (```.```). Folder names can contain runmodes in the same way as OSGi configurations ([installation of OSGi bundles through JCR packages in Sling](http://sling.apache.org/documentation/bundles/jcr-installer-provider.html)) using a `.` (e.g. `myproject.author` will only become active on author). Additionally, multiple runmodes combinations can be given separated by comma to avoid duplication of configuration (e.g. `myproject.author.test,author.dev` will be active on authors of dev and test environment only). Each time a new configuration file gets uploaded in CRX (e.g. deployment) or the content of a file gets changed a node listener can trigger a new installation of the configurations. This behaviour can be enabled/disabled in UploadListenerService OSGi config.
234
248
235
249
## Installation process
236
250
237
251
During the installation all groups defined in the groups section of the configuration file get created in the system. In a next step all ACEs configured in the ACE section get installed in CRX. Any old ACEs regarding these groups not contained anymore in the config but in the repository gets automatically purged thus no old or obsolete ACEs stay in the system and any manual change of ACEs regarding these groups get reverted thus ensuring a defined state again. ACEs not belongig to those groups in the configuration files remain untouched. So after the installation took place all groups and the corresponding ACEs exactly as defined in the configuration(s) are installed on the system.
238
252
239
-
If at any point during the installation an ecxeption occurs, no changes get persisted in the system. This prevents ending up having a undefined state in the repository.
253
+
If at any point during the installation an exception occurs, no changes get persisted in the system. This prevents ending up having a undefined state in the repository.
240
254
241
-
During the installation a history containing the most important events gets ceated and persisted in CRX for later examination.
242
-
Merging of ACEs
255
+
During the installation a history containing the most important events gets created and persisted in CRX for later examination.
243
256
244
-
To achieve the aforementioned requirements every new installation comprises the following steps:
257
+
The following steps are performed:
258
+
259
+
1. All AC entries are removed from the repository which refer to an authorizable being mentioned in the YAML configuration file (no matter to which path those entries refer).
260
+
1. All authorizables being mentioned in the YAML configuration get created (if necessary, i.e. if they do no exist yet).
261
+
1. All AC entries generated from the YAML configuration get persisted in the repository. If there are already existing entries for one path (and referring to another authorizable) those are not touched. New AC entries are added at the end of the list. All new AC entries are sorted, so that the Deny entries are listed above the Allow entries. Since the AC entry nodes are evaluated bottom-to-top this sorting order leads to less restrictions (e.g. for a user which is member of two groups where one group sets a Deny and the other one sets an Allow, this order ensures that the allow has a higher priority).
245
262
246
-
* The group based ACE configuration from configuration file gets transformed into a node based configuration
247
-
* A dump in the same format gets fetched from the repository
248
-
* On each node contained in this file the following steps get performed:
249
-
* The ACL from dump and from the configuration gets compared
250
-
* If there are already ACEs in the repository regarding a group from the configuration, these ACEs get removed
251
-
* The other ACEs not contained in the respective ACL from config get merged into the ACL from the config and get ordered (deny ACEs followed by allow ACEs)
252
-
* The ACL from in repo gets replaced by the merged one from config
253
-
* In case there is a node in repository dump that is not covered in the config the following step gets performed
254
-
* if the ACL of that node has one or several ACEs belonging to one or several groups from config, these ACEs get deleted
255
263
256
264
### Installation Hook
257
265
@@ -270,11 +278,7 @@ To enable that on a package being created with Maven through the content-package
270
278
</plugin>
271
279
```
272
280
273
-
Now it depends on where those ```*.yaml``` are located in the package, because not in all cases they are being installed.
274
-
In general the parent node may specify required Sling run modes being separated by a dot (```.```). They specify the minimum required Sling run modes to be set in order for the YAML children files to be installed. This mechanism works similar as the [installation of OSGi bundles through JCR packages in Sling](http://sling.apache.org/documentation/bundles/jcr-installer-provider.html).
275
-
276
-
E.g. the parent node name ```somename.publish``` will require at least the ```publish``` run mode to be set in order for the YAML children to be installed by the Installation Hook mechanism. The parent node name may also specify multiple required run modes.
277
-
If the parent node name does not contain a dot it will always be installed up (independent of any run modes). Except for those parent name limitations it does not matter at all where those ```*.yaml``` are located within the package (they will always be found by the install hook).
281
+
The ```*.yaml``` files are installed directly from the package content and respect the same runmode semantics as described above.
278
282
279
283
Although it is not necessary that the YAML files are covered by the filter rules of the ```filter.xml```, this is recommended practice. That way you can see afterwards in the repository which YAML files have been processed. However if you would not let the ```filter.xml``` cover your YAML files, those files would still be processed by the installation hook.
0 commit comments