Loading...
Searching...
No Matches
BinaryNinja::Enterprise Namespace Reference

Detailed Description

API for interacting with Enterprise features, such as communicating with the Enterprise server.

These methods will only do anything on Enterprise editions of Binary Ninja.

Classes

struct  EnterpriseException
 Custom exception class for all Enterprise functions that can throw exceptions. More...
 
class  LicenseCheckout
 RAII object for holding an Enterprise floating license in a scope. More...
 

Functions

bool IsInitialized ()
 Determine if the Enterprise Client has been initialized yet.
 
bool Initialize ()
 Initialize the Enterprise Client.
 
bool AuthenticateWithCredentials (const std::string &username, const std::string &password, bool remember)
 Authenticate to the Enterprise server with username and password.
 
bool AuthenticateWithMethod (const std::string &method, bool remember)
 Authenticate to the Enterprise server with an external provider.
 
std::vector< std::pair< std::string, std::string > > GetAuthenticationMethods ()
 Get a list of accepted methods for authentication.
 
bool Deauthenticate ()
 Forget saved credentials.
 
void CancelAuthentication ()
 Cancel a currently running authentication task.
 
bool Connect ()
 Perform initial connect to the server, pulling signing key and time limit.
 
bool UpdateLicense (uint64_t timeout)
 Acquire or refresh a floating license.
 
bool ReleaseLicense ()
 Release the current hold on a license.
 
bool IsConnected ()
 Check if the server is connected.
 
bool IsAuthenticated ()
 Check if the user has authenticated with the server.
 
std::string GetUsername ()
 Get currently connected username.
 
std::string GetToken ()
 Get token for current login session.
 
std::string GetServerName ()
 Get the display name of the currently connected server.
 
std::string GetServerUrl ()
 Get the url of the currently connected server, or the server that will be connected to if a connection has not yet been made.
 
std::string GetServerId ()
 Get the internal id of the currently connected server.
 
uint64_t GetServerVersion ()
 Get the version number of the currently connected server.
 
std::string GetServerBuildId ()
 Get the build id string of the currently connected server.
 
uint64_t GetLicenseExpirationTime ()
 Get the expiry time for the current license.
 
uint64_t GetLicenseDuration ()
 Get the total length of the current license.
 
bool IsFloatingLicense ()
 Determine if a floating license is currently active.
 
uint64_t GetReservationTimeLimit ()
 Get the maximum time limit for reservations.
 
bool IsLicenseStillActivated ()
 Check if the user's license is still activated.
 
std::string GetLastError ()
 Get the last recorded error.
 
void RegisterNotification (BNEnterpriseServerCallbacks *notify)
 Register an object to receive callbacks when enterprise server events happen.
 
void UnregisterNotification (BNEnterpriseServerCallbacks *notify)
 Un-register a previously registered notification handler object.
 

Function Documentation

◆ IsInitialized()

bool BinaryNinja::Enterprise::IsInitialized ( )

Determine if the Enterprise Client has been initialized yet.

Returns
True if Initialize() has been called successfully

◆ Initialize()

bool BinaryNinja::Enterprise::Initialize ( )

Initialize the Enterprise Client.

Returns
True if successful

◆ AuthenticateWithCredentials()

bool BinaryNinja::Enterprise::AuthenticateWithCredentials ( const std::string & username,
const std::string & password,
bool remember )

Authenticate to the Enterprise server with username and password.

Parameters
usernameUsername to authenticate with
passwordPassword to authenticate with
rememberRemember token in keychain
Returns
True if successful

◆ AuthenticateWithMethod()

bool BinaryNinja::Enterprise::AuthenticateWithMethod ( const std::string & method,
bool remember )

Authenticate to the Enterprise server with an external provider.

Parameters
methodProvider method
rememberRemember token in keychain
Returns
True if successful

◆ GetAuthenticationMethods()

std::vector< std::pair< std::string, std::string > > BinaryNinja::Enterprise::GetAuthenticationMethods ( )

Get a list of accepted methods for authentication.

Returns
List of (method, name) pairs

◆ Deauthenticate()

bool BinaryNinja::Enterprise::Deauthenticate ( )

Forget saved credentials.

Returns
True if successful

◆ CancelAuthentication()

void BinaryNinja::Enterprise::CancelAuthentication ( )

Cancel a currently running authentication task.

◆ Connect()

bool BinaryNinja::Enterprise::Connect ( )

Perform initial connect to the server, pulling signing key and time limit.

Returns
True if successful

◆ UpdateLicense()

bool BinaryNinja::Enterprise::UpdateLicense ( uint64_t timeout)

Acquire or refresh a floating license.

Parameters
timeoutTime (in minutes)
Returns
True if successful

◆ ReleaseLicense()

bool BinaryNinja::Enterprise::ReleaseLicense ( )

Release the current hold on a license.

Returns
True if successful

◆ IsConnected()

bool BinaryNinja::Enterprise::IsConnected ( )

Check if the server is connected.

Returns
True if connected

◆ IsAuthenticated()

bool BinaryNinja::Enterprise::IsAuthenticated ( )

Check if the user has authenticated with the server.

Returns
True if authenticated

◆ GetUsername()

std::string BinaryNinja::Enterprise::GetUsername ( )

Get currently connected username.

Returns
Username of currently connected user

◆ GetToken()

std::string BinaryNinja::Enterprise::GetToken ( )

Get token for current login session.

Returns
Token for currently connected user

◆ GetServerName()

std::string BinaryNinja::Enterprise::GetServerName ( )

Get the display name of the currently connected server.

Returns
Display name of the currently connected server

◆ GetServerUrl()

std::string BinaryNinja::Enterprise::GetServerUrl ( )

Get the url of the currently connected server, or the server that will be connected to if a connection has not yet been made.

Returns
Url of server

◆ GetServerId()

std::string BinaryNinja::Enterprise::GetServerId ( )

Get the internal id of the currently connected server.

Returns
Id of the currently connected server

◆ GetServerVersion()

uint64_t BinaryNinja::Enterprise::GetServerVersion ( )

Get the version number of the currently connected server.

Returns
Version of the currently connected server

◆ GetServerBuildId()

std::string BinaryNinja::Enterprise::GetServerBuildId ( )

Get the build id string of the currently connected server.

Returns
Build id of the currently connected server

◆ GetLicenseExpirationTime()

uint64_t BinaryNinja::Enterprise::GetLicenseExpirationTime ( )

Get the expiry time for the current license.

Returns
Expiry time, in seconds from the epoch

◆ GetLicenseDuration()

uint64_t BinaryNinja::Enterprise::GetLicenseDuration ( )

Get the total length of the current license.

Returns
Total time, in seconds

◆ IsFloatingLicense()

bool BinaryNinja::Enterprise::IsFloatingLicense ( )

Determine if a floating license is currently active.

Returns
True if a floating license is active

◆ GetReservationTimeLimit()

uint64_t BinaryNinja::Enterprise::GetReservationTimeLimit ( )

Get the maximum time limit for reservations.

Returns
Maximum reservation time, in seconds

◆ IsLicenseStillActivated()

bool BinaryNinja::Enterprise::IsLicenseStillActivated ( )

Check if the user's license is still activated.

Returns
True if still activated

◆ GetLastError()

std::string BinaryNinja::Enterprise::GetLastError ( )

Get the last recorded error.

Returns
Error text

◆ RegisterNotification()

void BinaryNinja::Enterprise::RegisterNotification ( BNEnterpriseServerCallbacks * notify)

Register an object to receive callbacks when enterprise server events happen.

Parameters
notifyObject to receive callbacks

◆ UnregisterNotification()

void BinaryNinja::Enterprise::UnregisterNotification ( BNEnterpriseServerCallbacks * notify)

Un-register a previously registered notification handler object.

Parameters
notifyObject to un-register