Class RandomAuthorizableNodeName
- java.lang.Object
-
- org.apache.jackrabbit.oak.security.user.RandomAuthorizableNodeName
-
- All Implemented Interfaces:
AuthorizableNodeName
public class RandomAuthorizableNodeName extends Object implements AuthorizableNodeName
Implementation of theAuthorizableNodeName
that generates a random node name that doesn't reveal the ID of the authorizable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.security.user.AuthorizableNodeName
AuthorizableNodeName.Default
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_LENGTH
21 characters, each character with 6 bit of entropy (64 possible characters), results in 126 bits of entropy.-
Fields inherited from interface org.apache.jackrabbit.oak.spi.security.user.AuthorizableNodeName
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description RandomAuthorizableNodeName()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
generateNodeName(@NotNull String authorizableId)
Generates a node name from the specifiedauthorizableId
.
-
-
-
Field Detail
-
DEFAULT_LENGTH
public static final int DEFAULT_LENGTH
21 characters, each character with 6 bit of entropy (64 possible characters), results in 126 bits of entropy. With regards to probability of duplicates, this is even better than standard UUIDs, which have 122 bits of entropy and are 36 characters long.- See Also:
- Constant Field Values
-
-
Method Detail
-
generateNodeName
@NotNull public @NotNull String generateNodeName(@NotNull @NotNull String authorizableId)
Description copied from interface:AuthorizableNodeName
Generates a node name from the specifiedauthorizableId
.- Specified by:
generateNodeName
in interfaceAuthorizableNodeName
- Parameters:
authorizableId
- The ID of the authorizable to be created.- Returns:
- A valid node name.
-
-