def set_authentication_profile(profile=None, deploy=False):
    '''
    Set the authentication profile of the Palo Alto proxy minion. A commit will be required before this is processed.

    CLI Example:

    Args:
        profile (str): The name of the authentication profile to set.

        deploy (bool): If true then commit the full candidate configuration, if false only set pending change.

    .. code-block:: bash

        salt '*' panos.set_authentication_profile foo
        salt '*' panos.set_authentication_profile foo deploy=True

    '''

    if not profile:
        raise CommandExecutionError("Profile name option must not be none.")

    ret = {}

    query = {'type': 'config',
             'action': 'set',
             'xpath': '/config/devices/entry[@name=\'localhost.localdomain\']/deviceconfig/system/'
                      'authentication-profile',
             'element': '<authentication-profile>{0}</authentication-profile>'.format(profile)}

    ret.update(__proxy__['panos.call'](query))

    if deploy is True:
        ret.update(commit())

    return ret