def complete_openbis_config(config, resolver, local_only=True):
    """Add default values for empty entries in the config."""
    config_dict = resolver.config.config_dict(local_only)
    if config.get('url') is None:
        config['url'] = config_dict['openbis_url']
    if config.get('verify_certificates') is None:
        config['verify_certificates'] = config_dict['verify_certificates']
    if config.get('token') is None:
        config['token'] = None
    if config.get(
        'allow_http_but_do_not_use_this_in_production_and_only_within_safe_networks'
        ) is None:
        config[
            'allow_http_but_do_not_use_this_in_production_and_only_within_safe_networks'
            ] = not config_dict['allow_only_https']
