{"record":{"id":"976ba00a01d14f63","repo":"apache/cassandra","slug":"connection-with-unset-driver-id-was-detected","errorCode":null,"errorMessage":"Connection with unset driver id was detected.","messagePattern":"Connection with unset driver id was detected\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/db/guardrails/ClientDriverVersionGuardrail.java","lineNumber":80,"sourceCode":"        if (!enabled(state))\n            return;\n\n        Map<String, String> disallowed = disallowVersions.apply(state);\n        Map<String, String> warned = warnVersions.apply(state);\n\n        String sanitizedDriverId = driverName == null ? null : driverName.trim();\n        if (sanitizedDriverId == null || sanitizedDriverId.isBlank())\n        {\n            logger.debug(\"minimum_client_driver_versions guardrail identified empty driver id to check the minimum version of\");\n            if (disallowed != null && disallowed.containsKey(\"unset\"))\n            {\n                fail(\"Connections with unset driver id's are forbidden.\", state);\n                return;\n            }\n\n            if (warned != null && warned.containsKey(\"unset\"))\n            {\n                warn(\"Connection with unset driver id was detected.\");\n            }\n            return;\n        }\n\n        String sanitizedDriverVersion = GuardrailsOptions.sanitizeVersion(driverVersion);\n        if (sanitizedDriverVersion == null)\n        {\n            sanitizedDriverVersion = \"unset\";\n            logger.debug(\"minimum_client_driver_versions guardrail identified empty driver version to check the minimum version of\");\n        }\n        else if (!GuardrailsOptions.isValidVersion(sanitizedDriverVersion))\n        {\n            logger.debug(\"minimum_client_driver_versions guardrail identified driver version which is not compliant semver version\");\n            return;\n        }\n\n        if (disallowed != null && !disallowed.isEmpty())\n        {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/guardrails/ClientDriverVersionGuardrail.java#L62-L98","documentation":"ClientDriverVersionGuardrail.guard emits this warning when a client connects without setting a driver id (driverName/driverVersion unset) and a guardrail warning configuration covers the 'unset' case. Cassandra tracks driver metadata from the connection's OPTIONS; without it the server cannot evaluate driver version policies for that client.","triggerScenarios":"A CQL client library (or an old/uncommon driver) does not send the driver name/version in connection options; custom or hand-rolled clients connecting via native protocol; the guardrail client_driver_version has warn thresholds including 'unset' and warned.containsKey(\"unset\") is true.","commonSituations":"Homegrown clients, old driver versions that don't report identity, monitoring/proxy tools connecting raw CQL, scripts using minimal CQL implementations against a cluster with the driver-version guardrail enabled.","solutions":["Upgrade or configure the client driver to send its identity (most DataStax/java drivers do by default); ensure driver name and version are populated in connection options.","If the client intentionally reports nothing, either upgrade it or acknowledge the warning as expected.","Adjust the guardrail config (cassandra.yaml / ALTER GUARDRAILS) if warning on unset ids is too noisy for your environment.","Identify the offending client via ClientState / nodetool clientlist and map it to its connection source."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// client-side: ensure driver identity is sent\n// java driver: identity is automatic; for raw clients ensure OPTIONS includes DRIVER_NAME/DRIVER_VERSION\nif (driverName == null || driverVersion == null) {\n    configureDriverIdentity(\"my-app-driver\", \"1.2.3\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use mainstream drivers that report name/version by default.","Set explicit driver name/version in custom clients' connection options.","Inventory cluster clients via nodetool clientlist to find un-identified connections.","Tune the client_driver_version guardrail if unset-id warnings are expected noise."],"tags":["cassandra","guardrails","driver","client-compatibility"],"backgroundTag":"missing-required-argument","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}