Class JNISecurity

java.lang.Object
com.mapr.security.JNISecurity

public class JNISecurity extends Object
  • Constructor Details

    • JNISecurity

      public JNISecurity()
  • Method Details

    • GetEncryptedSize

      public static int GetEncryptedSize(int plainTextSize)
    • Encrypt

      public static byte[] Encrypt(byte[] key, byte[] inBuf, JNISecurity.MutableErr err)
    • GetDecryptedSize

      public static int GetDecryptedSize(int cipherTextSize)
    • Decrypt

      public static byte[] Decrypt(byte[] key, byte[] inBuf, JNISecurity.MutableErr err)
    • SetKeyFileInternal

      public static int SetKeyFileInternal(int keyType, String path)
    • GetKeyInternal

      public static byte[] GetKeyInternal(int keyType, JNISecurity.MutableErr err)
    • 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

      public static byte[] DecryptTicketInternal(byte[] encryptedTicket, JNISecurity.MutableErr err)
    • DecryptTicketInternal2

      public static byte[] DecryptTicketInternal2(byte[] encryptedTicket, JNISecurity.MutableErr err, int clientIp)
    • SetTicketAndKeyInternal

      public static int SetTicketAndKeyInternal(int keyType, String clusterName, byte[] ticketAndKey)
    • SetTicketAndKeyFileInternal

      public static int SetTicketAndKeyFileInternal(String path)
    • 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

      public static boolean IsSecurityEnabled(String clusterName)
    • GenerateRandomNumber

      public static long GenerateRandomNumber()
    • GenerateRandomBlock

      public static void GenerateRandomBlock(byte[] buf)
    • EncodeDataForWritingToKeyFile

      public static byte[] EncodeDataForWritingToKeyFile(byte[] serializedProtobuf, JNISecurity.MutableErr err)
    • DecodeDataFromKeyFile

      public static byte[] DecodeDataFromKeyFile(byte[] encodedData, JNISecurity.MutableErr err)
    • GetHash

      public static byte[] GetHash(int hashType, byte[] buf)
    • GetUserTicketAndKeyFileLocation

      public static String GetUserTicketAndKeyFileLocation()
    • IsKerberosEnabled

      public static boolean IsKerberosEnabled(String clusterName)
    • IsReplayDetectionDisabled

      public static boolean IsReplayDetectionDisabled(String clusterName)
    • GetCldbHttpsPort

      public static int GetCldbHttpsPort(String clusterName)
    • GetCldbPrincipal

      public static String GetCldbPrincipal(String clusterName)
    • IsParsingDone

      public static boolean IsParsingDone()
    • SetParsingDone

      public static void SetParsingDone()
    • SetClusterOption

      public static int SetClusterOption(String clusterName, String key, String value)
    • GetClusterOption

      public static String GetClusterOption(String clusterName, String key)
    • PopulateServerKeyAndTicket

      public static int PopulateServerKeyAndTicket(long[] bindings, String clusterName)
    • 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

      public static byte[] GetKeyFromHSMInternal(boolean isDare, JNISecurity.MutableErr err)