Package com.mapr.security
Class JNISecurity
java.lang.Object
com.mapr.security.JNISecurity
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidBlacklistAndCloseConnections(int[] uids, long[] blacklistTimes, boolean reinitList) static byte[]CloneAndGenerateTicket(int keyType, byte[] ticketAndKey, long expiryTime, long maxRenewalTimeSec, boolean isExternal, MutableInt err) static byte[]DecodeDataFromKeyFile(byte[] encodedData, JNISecurity.MutableErr err) static byte[]Decrypt(byte[] key, byte[] inBuf, JNISecurity.MutableErr err) static byte[]DecryptTicketInternal(byte[] encryptedTicket, JNISecurity.MutableErr err) static byte[]DecryptTicketInternal2(byte[] encryptedTicket, JNISecurity.MutableErr err, int clientIp) static booleanstatic byte[]EncodeDataForWritingToKeyFile(byte[] serializedProtobuf, JNISecurity.MutableErr err) static byte[]Encrypt(byte[] key, byte[] inBuf, JNISecurity.MutableErr err) static voidGenerateRandomBlock(byte[] buf) static longstatic byte[]GenerateTicketAndKeyInternal(int keyType, String userName, int uid, int[] gids, int[] rids, long expiryTime, long maxRenewalTimeSec, boolean isExternal, boolean canUserImpersonate, boolean canUserGenerateTicket, boolean isTenant, byte[][] ips, int[] impersonatedUids, int[] impersonatedGids, boolean isTempTicket, long clusterOpsMask, JNISecurity.MutableErr err) static byte[]GenerateTicketAndKeyUsingServerKeyInternal(int keyType, byte[] key, String userName, int uid, int[] gids, long expiryTime, long maxRenewalTimeSec, boolean isExternal, long clusterOpsMask, JNISecurity.MutableErr err) static intGetCldbHttpsPort(String clusterName) static StringGetCldbPrincipal(String clusterName) static StringGetClusterOption(String clusterName, String key) static intGetDecryptedSize(int cipherTextSize) static intGetEncryptedSize(int plainTextSize) static byte[]GetHash(int hashType, byte[] buf) static byte[]GetKeyFromHSMInternal(boolean isDare, JNISecurity.MutableErr err) static byte[]GetKeyInternal(int keyType, JNISecurity.MutableErr err) static byte[]GetTicketAndKeyForClusterInternal(int keyType, String clusterName, JNISecurity.MutableErr err) static Stringstatic intstatic booleanstatic booleanIsKerberosEnabled(String clusterName) static booleanstatic booleanIsReplayDetectionDisabled(String clusterName) static booleanIsSecurityEnabled(String clusterName) static intPopulateServerKeyAndTicket(long[] bindings, String clusterName) static voidRemoveFromBlacklist(int[] uids) static byte[]RenewTicketAndKeyInternal(int keyType, byte[] ticketAndKey, int[] gids, long expiryTime, JNISecurity.MutableErr err) static intSetClusterOption(String clusterName, String key, String value) static intSetKeyFileInternal(int keyType, String path) static intSetKeyInternal(int keyType, byte[] key) static voidstatic intstatic intSetTicketAndKeyInternal(int keyType, String clusterName, byte[] ticketAndKey) static int
-
Constructor Details
-
JNISecurity
public JNISecurity()
-
-
Method Details
-
GetEncryptedSize
public static int GetEncryptedSize(int plainTextSize) -
Encrypt
-
GetDecryptedSize
public static int GetDecryptedSize(int cipherTextSize) -
Decrypt
-
SetKeyFileInternal
-
GetKeyInternal
-
GenerateTicketAndKeyInternal
public static byte[] GenerateTicketAndKeyInternal(int keyType, String userName, int uid, int[] gids, int[] rids, long expiryTime, long maxRenewalTimeSec, boolean isExternal, boolean canUserImpersonate, boolean canUserGenerateTicket, boolean isTenant, byte[][] ips, int[] impersonatedUids, int[] impersonatedGids, boolean isTempTicket, long clusterOpsMask, JNISecurity.MutableErr err) -
GenerateTicketAndKeyUsingServerKeyInternal
public static byte[] GenerateTicketAndKeyUsingServerKeyInternal(int keyType, byte[] key, String userName, int uid, int[] gids, long expiryTime, long maxRenewalTimeSec, boolean isExternal, long clusterOpsMask, JNISecurity.MutableErr err) -
CloneAndGenerateTicket
public static byte[] CloneAndGenerateTicket(int keyType, byte[] ticketAndKey, long expiryTime, long maxRenewalTimeSec, boolean isExternal, MutableInt err) -
RenewTicketAndKeyInternal
public static byte[] RenewTicketAndKeyInternal(int keyType, byte[] ticketAndKey, int[] gids, long expiryTime, JNISecurity.MutableErr err) -
DecryptTicketInternal
-
DecryptTicketInternal2
public static byte[] DecryptTicketInternal2(byte[] encryptedTicket, JNISecurity.MutableErr err, int clientIp) -
SetTicketAndKeyInternal
-
SetTicketAndKeyFileInternal
-
UseClusterTicketAsServerTicketInternal
public static int UseClusterTicketAsServerTicketInternal() -
SetKeyInternal
public static int SetKeyInternal(int keyType, byte[] key) -
GetTicketAndKeyForClusterInternal
public static byte[] GetTicketAndKeyForClusterInternal(int keyType, String clusterName, JNISecurity.MutableErr err) -
Initialize
public static int Initialize() -
IsSecurityEnabled
-
GenerateRandomNumber
public static long GenerateRandomNumber() -
GenerateRandomBlock
public static void GenerateRandomBlock(byte[] buf) -
EncodeDataForWritingToKeyFile
public static byte[] EncodeDataForWritingToKeyFile(byte[] serializedProtobuf, JNISecurity.MutableErr err) -
DecodeDataFromKeyFile
-
GetHash
public static byte[] GetHash(int hashType, byte[] buf) -
GetUserTicketAndKeyFileLocation
-
IsKerberosEnabled
-
IsReplayDetectionDisabled
-
GetCldbHttpsPort
-
GetCldbPrincipal
-
IsParsingDone
public static boolean IsParsingDone() -
SetParsingDone
public static void SetParsingDone() -
SetClusterOption
-
GetClusterOption
-
PopulateServerKeyAndTicket
-
BlacklistAndCloseConnections
public static void BlacklistAndCloseConnections(int[] uids, long[] blacklistTimes, boolean reinitList) -
RemoveFromBlacklist
public static void RemoveFromBlacklist(int[] uids) -
IsHSMFeatureEnabled
public static boolean IsHSMFeatureEnabled() -
DoesDareKeyExist
public static boolean DoesDareKeyExist() -
GetKeyFromHSMInternal
-