bigip_device_auth – Manage system authentication on a BIG-IP

New in version 2.7.

Synopsis

  • Manage the system authentication configuration. This module can assist in configuring a number of different system authentication types. Note that this module can not be used to configure APM authentication types.

Parameters

Parameter Choices/Defaults Comments
authentication
string
    Choices:
  • use-first-server
  • use-all-servers
Specifies the process the system employs when sending authentication requests.
When use-first-server, specifies that the system sends authentication attempts to only the first server in the list.
When use-all-servers, specifies that the system sends an authentication request to each server until authentication succeeds, or until the system has sent a request to all servers in the list.
This parameter is supported by the tacacs type.
protocol_name
string
    Choices:
  • lcp
  • ip
  • ipx
  • atalk
  • vines
  • lat
  • xremote
  • tn3270
  • telnet
  • rlogin
  • pad
  • vpdn
  • ftp
  • http
  • deccp
  • osicp
  • unknown
Specifies the protocol associated with the value specified in service_name, which is a subset of the associated service being used for client authorization or system accounting.
Note that the majority of TACACS+ implementations are of protocol type ip, so try that first.
provider
dictionary
added in 2.5
A dict object containing connection details.
auth_provider
string
Configures the auth provider for to obtain authentication tokens from the remote device.
This option is really used when working with BIG-IQ devices.
password
string / required
The password for the user account used to connect to the BIG-IP.
You may omit this option by setting the environment variable F5_PASSWORD.

aliases: pass, pwd
server
string / required
The BIG-IP host.
You may omit this option by setting the environment variable F5_SERVER.
server_port
integer
Default:
443
The BIG-IP server port.
You may omit this option by setting the environment variable F5_SERVER_PORT.
ssh_keyfile
path
Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for cli transports.
You may omit this option by setting the environment variable ANSIBLE_NET_SSH_KEYFILE.
timeout
integer
Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error.
transport
string
    Choices:
  • cli
  • rest ←
Configures the transport connection to use when connecting to the remote device.
user
string / required
The username to connect to the BIG-IP with. This user must have administrative privileges on the device.
You may omit this option by setting the environment variable F5_USER.
validate_certs
boolean
    Choices:
  • no
  • yes ←
If no, SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates.
You may omit this option by setting the environment variable F5_VALIDATE_CERTS.
secret
string
Secret key used to encrypt and decrypt packets sent or received from the server.
Do not use the pound/hash sign in the secret for TACACS+ servers.
When configuring TACACS+ auth for the first time, this value is required.
servers
raw
Specifies a list of the IPv4 addresses for servers using the Terminal Access Controller Access System (TACACS)+ protocol with which the system communicates to obtain authorization data.
For each address, an alternate TCP port number may be optionally specified by specifying the port key.
If no port number is specified, the default port 49163 is used.
This parameter is supported by the tacacs type.
address
-
The IP address of the server.
This field is required, unless you are specifying a simple list of servers. In that case, the simple list can specify server IPs. See examples for more clarification.
port
-
Default:
49163
The port of the server.
service_name
string
    Choices:
  • slip
  • ppp
  • arap
  • shell
  • tty-daemon
  • connection
  • system
  • firewall
Specifies the name of the service that the user is requesting to be authorized to use.
Identifying what the user is asking to be authorized for, enables the TACACS+ server to behave differently for different types of authorization requests.
When configuring this form of system authentication, this setting is required.
Note that the majority of TACACS+ implementations are of service type ppp, so try that first.
state
string
    Choices:
  • absent
  • present ←
The state of the authentication configuration on the system.
When present, guarantees that the system is configured for the specified type.
When absent, sets the system auth source back to local.
type
string
    Choices:
  • tacacs
  • local
The authentication type to manage with this module.
Take special note that the parameters supported by this module will vary depending on the type that you are configuring.
This module only supports a subset, at this time, of the total available auth types.
update_secret
string
    Choices:
  • always ←
  • on_create
always will allow to update secrets if the user chooses to do so.
on_create will only set the secret when a use_auth_source is yes and TACACS+ is not currently the auth source.
use_for_auth
boolean
    Choices:
  • no
  • yes
Specifies whether or not this auth source is put in use on the system.

Notes

Note

  • For more information on using Ansible to manage F5 Networks devices see https://www.ansible.com/integrations/networks/f5.
  • Requires BIG-IP software version >= 12.
  • The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP specific configuration persists to disk, be sure to include at least one task that uses the bigip_config module to save the running configuration. Refer to the module’s documentation for the correct usage of the module to save your running configuration.

Examples

- name: Set the system auth to TACACS+, default server port
  bigip_device_auth:
    type: tacacs
    authentication: use-all-servers
    protocol_name: ip
    secret: secret
    servers:
      - 10.10.10.10
      - 10.10.10.11
    service_name: ppp
    state: present
    use_for_auth: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Set the system auth to TACACS+, override server port
  bigip_device_auth:
    type: tacacs
    authentication: use-all-servers
    protocol_name: ip
    secret: secret
    servers:
      - address: 10.10.10.10
        port: 1234
      - 10.10.10.11
    service_name: ppp
    use_for_auth: yes
    state: present
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
authentication
string
changed
Process the system uses to serve authentication requests when using TACACS.

Sample:
use-all-servers
protocol_name
string
changed
Name of the protocol associated with service_name used for client authentication.

Sample:
ip
servers
list
changed
List of servers used in TACACS authentication.

Sample:
['1.2.2.1', '4.5.5.4']
service_name
string
changed
Name of the service the user is requesting to be authorized to use.

Sample:
ppp


Status

Authors

  • Tim Rupp (@caphrim007)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.