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

Function Documentation

◆ 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