jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject unique indexes in InitialContent
Date Thu, 25 Oct 2012 08:56:30 GMT
Hi,

we currently have the following two unique indexes that don't
work well IMO:

            index.child("authorizableId")
                .setProperty("jcr:primaryType", "oak:queryIndexDefinition", Type.NAME)
                .setProperty("propertyNames", "rep:authorizableId")
                .setProperty("unique", true);
            index.child("principalName")
                .setProperty("jcr:primaryType", "oak:queryIndexDefinition", Type.NAME)
                .setProperty("propertyNames", "rep:principalName")
                .setProperty("unique", true);


this limits the use of the two property names. E.g. in Jackrabbit 2.x we
also use rep:principalName in the access control entry nodes. this means
we won't be able to use the same access control content structure in
Oak with the existing indexes defined in InitialContent.

Was this intended or is this rather a limitation of the property index
we should fix? e.g. constrain the index to nodes of a certain type.
on the other hand that would make index selection more complicated.

Hmm, actually thinking a bit more about this, I'd say we have to enhance
the property index. Otherwise it is possible to affect a central part of the
repository (user management) by simply creating an unstructured node
with a rep:principalName property. Alternatively we might limit the use
of those system properties to nodes with an appropriate type in a
validator.

Thoughts?

Regards
 Marcel

Mime
View raw message