public class JNISecurity
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JNISecurity.MutableErr |
| Constructor and Description |
|---|
JNISecurity() |
| Modifier and Type | Method and Description |
|---|---|
static void |
BlacklistAndCloseConnections(int[] uids,
long[] blacklistTimes,
boolean reinitList) |
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 byte[] |
EncodeDataForWritingToKeyFile(byte[] serializedProtobuf,
JNISecurity.MutableErr err) |
static byte[] |
Encrypt(byte[] key,
byte[] inBuf,
JNISecurity.MutableErr err) |
static void |
GenerateRandomBlock(byte[] buf) |
static long |
GenerateRandomNumber() |
static byte[] |
GenerateTicketAndKeyInternal(int keyType,
java.lang.String userName,
int uid,
int[] gids,
long expiryTime,
long maxRenewalTimeSec,
boolean isExternal,
boolean canUserImpersonate,
int[] ips,
JNISecurity.MutableErr err) |
static byte[] |
GenerateTicketAndKeyUsingServerKeyInternal(int keyType,
byte[] key,
java.lang.String userName,
int uid,
int[] gids,
long expiryTime,
long maxRenewalTimeSec,
boolean isExternal,
JNISecurity.MutableErr err) |
static int |
GetCldbHttpsPort(java.lang.String clusterName) |
static java.lang.String |
GetCldbPrincipal(java.lang.String clusterName) |
static java.lang.String |
GetClusterOption(java.lang.String clusterName,
java.lang.String key) |
static int |
GetDecryptedSize(int cipherTextSize) |
static int |
GetEncryptedSize(int plainTextSize) |
static byte[] |
GetHash(int hashType,
byte[] buf) |
static byte[] |
GetKeyInternal(int keyType,
JNISecurity.MutableErr err) |
static byte[] |
GetTicketAndKeyForClusterInternal(int keyType,
java.lang.String clusterName,
JNISecurity.MutableErr err) |
static java.lang.String |
GetUserTicketAndKeyFileLocation() |
static int |
Initialize() |
static boolean |
IsKerberosEnabled(java.lang.String clusterName) |
static boolean |
IsParsingDone() |
static boolean |
IsReplayDetectionDisabled(java.lang.String clusterName) |
static boolean |
IsSecurityEnabled(java.lang.String clusterName) |
static int |
PopulateServerKeyAndTicket(long[] bindings,
java.lang.String clusterName) |
static void |
RemoveFromBlacklist(int[] uids) |
static byte[] |
RenewTicketAndKeyInternal(int keyType,
byte[] ticketAndKey,
long expiryTime,
JNISecurity.MutableErr err) |
static int |
SetClusterOption(java.lang.String clusterName,
java.lang.String key,
java.lang.String value) |
static int |
SetKeyFileInternal(int keyType,
java.lang.String path) |
static int |
SetKeyInternal(int keyType,
byte[] key) |
static void |
SetParsingDone() |
static int |
SetTicketAndKeyFileInternal(java.lang.String path) |
static int |
SetTicketAndKeyInternal(int keyType,
java.lang.String clusterName,
byte[] ticketAndKey) |
static int |
UseClusterTicketAsServerTicketInternal() |
public static int GetEncryptedSize(int plainTextSize)
public static byte[] Encrypt(byte[] key,
byte[] inBuf,
JNISecurity.MutableErr err)
public static int GetDecryptedSize(int cipherTextSize)
public static byte[] Decrypt(byte[] key,
byte[] inBuf,
JNISecurity.MutableErr err)
public static int SetKeyFileInternal(int keyType,
java.lang.String path)
public static byte[] GetKeyInternal(int keyType,
JNISecurity.MutableErr err)
public static byte[] GenerateTicketAndKeyInternal(int keyType,
java.lang.String userName,
int uid,
int[] gids,
long expiryTime,
long maxRenewalTimeSec,
boolean isExternal,
boolean canUserImpersonate,
int[] ips,
JNISecurity.MutableErr err)
public static byte[] GenerateTicketAndKeyUsingServerKeyInternal(int keyType,
byte[] key,
java.lang.String userName,
int uid,
int[] gids,
long expiryTime,
long maxRenewalTimeSec,
boolean isExternal,
JNISecurity.MutableErr err)
public static byte[] RenewTicketAndKeyInternal(int keyType,
byte[] ticketAndKey,
long expiryTime,
JNISecurity.MutableErr err)
public static byte[] DecryptTicketInternal(byte[] encryptedTicket,
JNISecurity.MutableErr err)
public static byte[] DecryptTicketInternal2(byte[] encryptedTicket,
JNISecurity.MutableErr err,
int clientIp)
public static int SetTicketAndKeyInternal(int keyType,
java.lang.String clusterName,
byte[] ticketAndKey)
public static int SetTicketAndKeyFileInternal(java.lang.String path)
public static int UseClusterTicketAsServerTicketInternal()
public static int SetKeyInternal(int keyType,
byte[] key)
public static byte[] GetTicketAndKeyForClusterInternal(int keyType,
java.lang.String clusterName,
JNISecurity.MutableErr err)
public static int Initialize()
public static boolean IsSecurityEnabled(java.lang.String clusterName)
public static long GenerateRandomNumber()
public static void GenerateRandomBlock(byte[] buf)
public static byte[] EncodeDataForWritingToKeyFile(byte[] serializedProtobuf,
JNISecurity.MutableErr err)
public static byte[] DecodeDataFromKeyFile(byte[] encodedData,
JNISecurity.MutableErr err)
public static byte[] GetHash(int hashType,
byte[] buf)
public static java.lang.String GetUserTicketAndKeyFileLocation()
public static boolean IsKerberosEnabled(java.lang.String clusterName)
public static boolean IsReplayDetectionDisabled(java.lang.String clusterName)
public static int GetCldbHttpsPort(java.lang.String clusterName)
public static java.lang.String GetCldbPrincipal(java.lang.String clusterName)
public static boolean IsParsingDone()
public static void SetParsingDone()
public static int SetClusterOption(java.lang.String clusterName,
java.lang.String key,
java.lang.String value)
public static java.lang.String GetClusterOption(java.lang.String clusterName,
java.lang.String key)
public static int PopulateServerKeyAndTicket(long[] bindings,
java.lang.String clusterName)
public static void BlacklistAndCloseConnections(int[] uids,
long[] blacklistTimes,
boolean reinitList)
public static void RemoveFromBlacklist(int[] uids)