Skip to content

Credential Management

TomasVrabel edited this page Oct 9, 2017 · 24 revisions

Various Orion processes (discovery, polling) work with credentials that are stored in Orion. This page describes how to manage credentials using Orion SDK.

Verbs

The Orion.Credential entity provides following verbs to create Orion credentials. Parameters are listed in C# syntax.

Create SNMP v1 and v2c credentials

public long CreateSNMPCredentials(
	string name, 
	string community,
	string owner = "Orion")

Parameters:

  • name - credentials name, required
  • community - community string, required
  • owner - credential owner, optional

Verb returns ID of the newly created Orion.Credential instance. Credential name must be unique for given credential type, exception is thrown otherwise.

Supported since: Orion Platform 2017.3 (NPM 12.2)

Example:

# create SNMP credentials with name=custom, community=RO_permanent
# credentialId can be used in discovery plugin configuration
$credentialId = Invoke-SwisVerb $swis Orion.Credential CreateSNMPCredentials @( "custom",  "RO_permanent" )

Create SNMP v3 credentials

public long CreateSNMPv3Credentials(
	string name, 
	string username,
	string context, 
	string authenticationMethod, string authenticationPassword, bool isAuthenticationPasswordKey, 
	string privacyMethod, string privacyPassword, bool isPrivacyPasswordKey,
	string owner = "Orion")

Parameters:

  • name - credentials name, required
  • username - username, required
  • context - context, required
  • authenticationMethod - authentication method (None, MD5, SHA1), required
  • authenticationPassword - authentication password, value can be empty for authentication method None, required
  • authenticationKeyIsPassword - is authentication key password (True, False), required
  • privacyMethod - privacy method (None, DES56, AES128, AES192, AES256), required
  • privacyPassword - privacy password, value can be empty for privacy method None, required
  • privacyKeyIsPassword - is privacy key password (True, False), required
  • owner - credential owner, default value = Orion, optional

Verb returns ID of the newly created Orion.Credential instance. Credential name must be unique for given credential type, exception is thrown otherwise.

Supported since: Orion Platform 2017.3 (NPM 12.2)

Create UserPassword (WMI) credentials

These credentials are applicable for WMI discovery configuration.

public long CreateUsernamePasswordCredentials(
	string name, 
	string username, 
	string password,
	string owner = "Orion")

Parameters:

  • name - credentials name, required
  • username - username, required
  • password - password, required
  • owner - credential owner, default value = Orion, optional

Verb returns ID of the newly created Orion.Credential instance. Credential name must be unique for given credential type, exception is thrown otherwise.

Example:

# create WHMI credentials guest/guest with name=custom
# credentialId can be used in discovery plugin configuration
$credentialId = Invoke-SwisVerb $swis Orion.Credential CreateUsernamePasswordCredentials @( "custom",  "guest", "guest" )
Clone this wiki locally