def create_guac_connection(workout_id, config):
    """
    Creates a guacamole connection ready for inserting into the student entry server configuration.
    @param workout_id: ID of the workout being created
    @type workout_id: string
    @param config: Specification string for a student guacamole connection
    @type config: dict
    @return: The specification with the workout ID included
    @rtype: dict
    """
    student_entry_username = config['username'] if 'username' in config else None
    rdp_domain = config['domain'] if 'domain' in config else None
    security_mode = config['security-mode'] if 'security-mode' in config else 'nla'
    connection = {
        'workout_id': workout_id,
        'entry_type': config['type'],
        'ip': config['ip'],
        'username': student_entry_username,
        'password': config['password'],
        'domain': rdp_domain,
        'security-mode': security_mode
    }
    return connection