def is_agent_token_valid(node, token):
    """Validates if a supplied token is valid for the node.

    :param node: Node object
    :token: A token value to validate against the driver_internal_info field
            agent_sercret_token.
    :returns: True if the supplied token matches the token recorded in the
              supplied node object.
    """
    if token is None:
        return False
    known_token = node.driver_internal_info.get('agent_secret_token', None)
    return known_token == token
