Infoblox::LDAP::Server - An LDAP Server object.


NAME

Infoblox::LDAP::Server - An LDAP Server object.


DESCRIPTION

The LDAP Server is used for authentication.


CONSTRUCTOR

 my $server = Infoblox::LDAP::Server->new(
     address             => $address_or_fqdn,                # Required
     base_dn             => $string,                         # Required
     bind_user_dn        => $string,                         # Required if authentication_type is 'AUTHENTICATED'
     bind_password       => $string,                         # Required if authentication_type is 'AUTHENTICATED', write-only
     port                => $uint,                           # Optional, Default is 636
     version             => 'V2' | 'V3',                     # Optional, Default is 'V3'
     comment             => $string,                         # Optional
     authentication_type => 'ANONYMOUS' | 'AUTHENTICATED',   # Optional, Default is 'ANONYMOUS'
     encryption          => 'NONE' | 'SSL',                  # Optional, Default is 'SSL'
     use_mgmt_port       => 'true' | 'false',                # Optional, Default is 'false'
     disable             => 'true' | 'false',                # Optional, Default is 'false'
 );


SESSION METHODS

The LDAP Server object does not support any session methods.


METHODS

This section describes all the methods that you can use to configure and retrieve the attribute values of an LDAP server object.

address( )

Use this method to set or retrieve an IP address or FQDN of an LDAP server.

Parameter

An IP address or FQDN of an LDAP server in string format.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->address();
 #Modify attribute value
 $server->address('10.0.0.1');

authentication_type( )

Use this method to set or retrieve an authentication type.

Parameter

Valid values are 'ANONYMOUS' and 'AUTHENTICATED'. The default value is 'ANONYMOUS'.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->authentication_type();
 #Modify attribute value
 $server->authentication_type('AUTHENTICATED');

base_dn( )

Use this method to set or retrieve a base DN for the LDAP server.

Parameter

A base DN in string format.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->base_dn();
 #Modify attribute value
 $server->base_dn('dc=infoblox,dc=com');

bind_password( )

Use this method to set a user password for authentication. This attribute is required if authentication_type attribute value is 'AUTHENTICATED'. This is a write-only attribute.

Parameter

An user password in string format.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

Example
 #Modify attribute value
 $server->bind_password('password');

bind_user_dn( )

Use this method to set or retrieve an user DN for authentication. This attribute is required if authentication_type attribute value is 'AUTHENTICATED'.

Parameter

An user DN in string format.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->bind_user_dn();
 #Modify attribute value
 $server->bind_user_dn('cn=user,dc=infoblox,dc=com');

comment( )

Use this method to set or retrieve a descriptive comment.

Parameter

A desired comment in string format with a maximum of 256 bytes.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->comment();
 #Modify attribute value
 $server->comment('LDAP object');

encryption( )

Use this method to set or retrieve an encryption type.

Parameter

Valid values are 'NONE' and 'SSL'. The default value is 'SSL'.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->encryption();
 #Modify attribute value
 $server->encryption('SSL');

disable( )

Use this method to enable or disable an LDAP server.

Parameter

Specify "true" to disable an LDAP server or "false" to enable it. The default value is 'false'.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->disable();
 #Modify attribute value
 $server->disable('true');

port( )

Use this method to set or retrieve a port number.

Parameter

A port number. The default value is 636.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->port();
 #Modify attribute value
 $server->port(389);

use_mgmt_port( )

Use this method to set or retrieve the flag that allows connections through the management interface.

Parameter

Specify "true" to allow or "false" to deny it. The default value is 'false'.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->use_mgmt_port();
 #Modify attribute value
 $server->use_mgmt_port('true');

version( )

Use this method to set or retrieve an LDAP server version.

Parameter

Valid values are 'V2' and 'V3'. The default value is 'V3'.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get attribute value
 my $value = $server->version();
 #Modify attribute value
 $server->version('V2');


AUTHOR

Infoblox Inc. http://www.infoblox.com/


SEE ALSO

Infoblox::LDAP::AuthService


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.