Client SDK Version 2.0.0
Ionic Security client SDK for Python users
|
Agent is the client-side library class for all Ionic.com API endpoint communication.
Agent provides a default implementation of AgentKeyServices interface. It is possible for a user to override that interface and provide their own backend solution for key services (for example Offline Key Vault), that can be used by the ciphers for encryption and decryption.
Please see the AgentKeyServices Implementors Overview.
Before you can begin using an Agent object, it must first be initialized. The initialization process performs device profile loading and other non-trivial internal resource initialization to prepare it for secure communication with Ionic API servers.
Initializing an Agent object can be done a few different ways. If all configuration defaults are ok (which is typical) then you can simply create an Agent instance, Agent().
Simplest Example:
If you need to provide some custom configuration, then you can create a configuration object and pass it to the Agent constructor.
Custom Configuration Example:
If you need to provide a custom device profile persistor to load device profiles using a custom implementation, then you can create it and pass it to the Agent constructor.
Custom Configuration with Custom Device Profile Persistor:
The KNS features allow users to query information about a particular keyspace. Using the ionicsdk.agent.Agent.getkeyspace function users can get the tenant ID, the fully qualified domain name, the API URL and finally the enrollment URL. SDK clients (like the Machina CLI) can use this query during enrollment to get the enrollment URL. While enrollment will set up the initial API URL, a user can still use the KNS query to make sure the keyspace API URL hasn't moved. Finally, SDK includes a convenience function for updating a particular device profile, ionicsdk.agent.Agent.updateprofile.
In order to protect sensitive data, keys must be requested from Agent using ionicsdk.agent.Agent.createkey or ionicsdk.agent.Agent.createkeys along with optional MetadataMap and AttributesMap objects to hold information about the application and data being secured.
Example of creating a single key:
Example of creating multiple keys:
You acknowledge your access, review and use of the documentation on this page is subject to the Ionic Security Inc. Documentation Use Rights.
© 2016-2020 Ionic Security Inc. All rights reserved. -
Generated on Thu Jul 2 2020 12:40:00 for Client SDK Version 2.0.0 by
1.8.18