As of Oak 1.0 the node type definition ofrep:Authorizabledefines a new propertyrep:authorizableIdwhich is intended to store the ID of a user or group.
This property is protected and system maintained and cannot be changed after creation through user management API calls.
The default implementation comes with a dedicated property index forrep:authorizableIdwhich asserts the uniqueness of that ID.
For backwards compatibility with Jackrabbit 2.x the ID specified during creation is also reflected in thejcr:uuid(protected and mandatory), which is used for the lookup.
Authorizable#getIDreturns the string value contained inrep:authorizableIDand for backwards compatibility falls back on the node name in case therep:authorizableIdproperty is missing.
The name of the authorizable node is generated based on a configurable implementation of theAuthorizableNodeNameinterface (see configuration section below). By default it uses the ID as name hint and includes a conversion to a valid JCR node name.
Please note the difference betweenAuthorizableandPrincipal: AnAuthorizableis repository object that is neither associated with nor depending from a particularSessionand thus independent of the login mechanisms creatingSessions.
On the other handPrincipals are representations of user identities. In other words: eachPrincipalwithin the set associated with the Session's Subject upon login represents an identity for that user. An the set ofPrincipals may differ between different login mechanisms.
Consequently an one-to-many relationship exists between Authorizable and Principal (see alsogetPrincipal().