def validate_config(config, required_fields):
    """ Check that the config contains all the required fields.

    :param config: A config dictionary to check.
     :type config: dict(str: str)

    :param required_fields: A list of required fields.
     :type required_fields: list(str)

    :return: Whether the config is valid.
     :rtype: bool
    """
    for field in required_fields:
        if not field in config:
            return False
    return True