Class SIDUtils
java.lang.Object
com.atlassian.crowd.directory.ldap.mapper.attribute.SIDUtils
Convert back and forth between the binary and the String representation of SIDs.
- Since:
- v2.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetLastRidFromSid(String sid) In AD, users have a primaryGroupId attribute that contains the RID (relative identifier) of their primary group.static StringsubstituteLastRidInSid(String baseSid, String rid) Replaces the last subauthority of a SID with a new RID.
-
Constructor Details
-
SIDUtils
public SIDUtils()
-
-
Method Details
-
getPrimaryGroupSidOfUser
In AD, users have a primaryGroupId attribute that contains the RID (relative identifier) of their primary group. The SID of the primary group is obtained by resolving the RID with respect to the SID of the user.- Parameters:
user- the use whose primary group's SID will be resolved- Returns:
- an Optional containing the String representation of the user's primary group SID if present
-
substituteLastRidInSid
Replaces the last subauthority of a SID with a new RID.- Parameters:
baseSid- a SID in its String format (i.e., not a binary SID)rid- a RID- Returns:
- a SID that has the last subauthority replaced with the new RID.
-
getLastRidFromSid
- Parameters:
sid- a SID in its String format (i.e, not a binary SID)- Returns:
- the RID of the last subauthority of the SID
-