Machina Client SDK Version 2.1.2
Ionic Security Machina Client SDK for Python users
Public Member Functions | List of all members
ionicsdk.services.AgentKeyServicesBase Class Reference

AgentKeyServicesBase class performs all key related services (create and get) for higher level objects like chunk cipher and file cryto. More...

Inheritance diagram for ionicsdk.services.AgentKeyServicesBase:
ionicsdk.agent.Agent

Public Member Functions

def hasactiveprofile (self)
 Determine if any device profile is active. More...
 
def getactiveprofile (self)
 Get the current device profile of the agent. More...
 
def createkey (self, attributesdict=None, metadatadict=None, mutableAttributesdict=None)
 Creates a single protection key with attributes This method must be overridden in a subclass Otherwise, root class version will raise an exception. More...
 
def createkeys (self, keycount, attributesdict=None, metadatadict=None, mutableAttributesdict=None)
 Creates protection keys. More...
 
def getkey (self, keyidstring, metadatadict=None)
 Gets a single protection key. More...
 
def getkeys (self, keyidstringlist, metadatadict=None)
 Gets protection keys. More...
 
def updatekey (self, keydata, metadatadict=None)
 Updates the Mutable Attributes of a single protection key. More...
 
def updatekeys (self, keydatalist, metadatadict=None)
 Updates the Mutable Attributes of protection keys. More...
 

Detailed Description

AgentKeyServicesBase class performs all key related services (create and get) for higher level objects like chunk cipher and file cryto.

A user may sub class this base class to create their own local key storage services, or the user could use agent.Agent, which uses the Ionic web server to store and create keys.

See also a usage example here: AgentKeyServices Implementors Overview

Member Function Documentation

◆ createkey()

def ionicsdk.services.AgentKeyServicesBase.createkey (   self,
  attributesdict = None,
  metadatadict = None,
  mutableAttributesdict = None 
)

Creates a single protection key with attributes This method must be overridden in a subclass Otherwise, root class version will raise an exception.

Parameters
attributesdict(KeyAttributesDict, optional): The protection key attributes to use for creating the protection key.
metadatadict(MetadataDict, optional): The metadata properties to send along with the request.
mutableAttributesdict(KeyAttributesDict, optional): The protection key mutable attributes to use for creating the protection key.
Returns
A KeyData object with the newly created protection key.

Reimplemented in ionicsdk.agent.Agent.

◆ createkeys()

def ionicsdk.services.AgentKeyServicesBase.createkeys (   self,
  keycount,
  attributesdict = None,
  metadatadict = None,
  mutableAttributesdict = None 
)

Creates protection keys.

This method must be overridden in a subclass Otherwise, root class version will raise an exception.

Parameters
keycount(int): The number of keys to create.
attributesdict(KeyAttributesDict, optional): The protection key attributes to use for creating the protection keys.
metadatadict(MetadataDict, optional): The metadata properties to send along with the HTTP request.
mutableAttributesdict(KeyAttributesDict, optional): The protection key mutable attributes to use for creating the protection key.
Returns
The KeyDataList of newly created protection keys.

Reimplemented in ionicsdk.agent.Agent.

◆ getactiveprofile()

def ionicsdk.services.AgentKeyServicesBase.getactiveprofile (   self)

Get the current device profile of the agent.

Returns
Returns the active device profile object. If no active profile is set, then None will be returned. You can also call Agent.hasactiveprofile() to determine if there is an active profile. This root class always returns None

Reimplemented in ionicsdk.agent.Agent.

◆ getkey()

def ionicsdk.services.AgentKeyServicesBase.getkey (   self,
  keyidstring,
  metadatadict = None 
)

Gets a single protection key.

This method must be overridden in a subclass. Otherwise, root class version will raise an exception.

Parameters
keyidstring(string): The protection key ID to fetch.
metadatadict(MetadataDict, optional): The metadata properties to send along with the HTTP request.
Returns
A KeyData object containing the requested key.

Reimplemented in ionicsdk.agent.Agent.

◆ getkeys()

def ionicsdk.services.AgentKeyServicesBase.getkeys (   self,
  keyidstringlist,
  metadatadict = None 
)

Gets protection keys.

This method must be overridden in a subclass Otherwise, root class version will raise an exception.

Parameters
keyidstringlist(string): The list of protection key IDs to fetch.
metadatadict(MetadataDict, optional): The metadata properties to send along with the HTTP request.
Returns
A list of keys that were successfully retrieved. It is important to note that even if the function succeeds, it does NOT mean that any or all of the requested keys were provided. The caller can iterate through the response object and determine which keys were returned by looking at the key ID property (KeyData.id).

Reimplemented in ionicsdk.agent.Agent.

◆ hasactiveprofile()

def ionicsdk.services.AgentKeyServicesBase.hasactiveprofile (   self)

Determine if any device profile is active.

Returns
True if an active profile is loaded and active, False otherwise. This root class always returns False

Reimplemented in ionicsdk.agent.Agent.

◆ updatekey()

def ionicsdk.services.AgentKeyServicesBase.updatekey (   self,
  keydata,
  metadatadict = None 
)

Updates the Mutable Attributes of a single protection key.

This method must be overridden in a subclass. Otherwise, root class version will raise an exception.

Parameters
keydata(KeyData): The protection key data with modified Mutable Attributes to update.
metadatadict(MetadataDict, optional): The metadata properties to send along with the HTTP request.
Returns
A KeyData object containing the updated key.

Reimplemented in ionicsdk.agent.Agent.

◆ updatekeys()

def ionicsdk.services.AgentKeyServicesBase.updatekeys (   self,
  keydatalist,
  metadatadict = None 
)

Updates the Mutable Attributes of protection keys.

This method must be overridden in a subclass Otherwise, root class version will raise an exception.

Parameters
keydatalist(KeyDataList): The list of protection keys with modified Mutable Attributes to update.
metadatadict(MetadataDict, optional): The metadata properties to send along with the HTTP request.
Returns
A list of keys that were successfully updated. It is important to note that even if the function succeeds, it does NOT mean that any or all of the requested keys were provided. The caller can iterate through the response object and determine which keys were returned by looking at the key ID property (KeyData.id).

Reimplemented in ionicsdk.agent.Agent.


The documentation for this class was generated from the following file: