Create an NAE Session
Initializing an NAE Session
Initializing an NAE Session is an optional step. If you want to load the properties file through the environment variable, you need to call the initialize function before creating an NAE session. You can also directly create a session by following the steps mentioned in the Creating an NAE Session section.
The initialization can be done from the sources such as a file or an environment variable.
To initialize a session from a file:
Here, the source
is the file from which the initialization takes place. The path
is the absolute path of the properties file.
To initialize a session from an environment variable:
In the above snippet, the CADP.NetCoreConfig
is the environment variable name.
• While initializing through an environment, change the environment variable and re-open the
Note
Visual Studio.
• After initialization, the library cannot be reinitialized through other sources. To reinitialize, first, you need to unload the library.
Creating an NAE Session
You can create either a global or an authenticated NAE session with the CipherTrust Manager.
Creating a Global NAE Session with CipherTrust Manager
You can connect to the server by creating a session object with arguments. This creates an unauthenticated (global) session, which gives the client application the ability to create and access global keys. Whether your client can use global sessions is determined by the CipherTrust Manager settings. If password authentication is required, then global sessions are effectively disallowed.
OR
Note
If the NAE session is already initialized (as mentioned in the Initializing an NAE Session), the propFilePath
must be passed as null.
Creating an Authenticated NAE Session with CipherTrust Manager
To create an authenticated NAE session, pass username and password to the session object either as string or char array.
If the username and password are valid, the client application gets authenticated and has the ability to:
create keys
access keys owned by the user
access keys available to any groups to which the user belongs to
The username can be specified in the following formats:
username
- A user in the root domain. For example, joe.domain||username
- A user in a specific domain. For example, thales||joe.
Note
The supported characters for password are:
( ) ! & \ ` | ; > $ + , - . / : = [ ] ^ _ { } ~ ' # " ? <