def get_le_api_key(auth):
    """
    Get rw_api_key if provided in the configuration, otherwise get ro_api_key

    :param auth: authentication configuration for logentries
    """
    if auth.get('rw_api_key'):
        return auth.get('rw_api_key')
    else:
        return auth.get('ro_api_key')