{"record":{"id":"6fb3143f915167d2","repo":"apache/cassandra","slug":"detected-unknown-driver-id-s","errorCode":null,"errorMessage":"Detected unknown driver id: %s","messagePattern":"Detected unknown driver id: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/db/guardrails/ClientDriverVersionGuardrail.java","lineNumber":128,"sourceCode":"            {\n                fail(String.format(\"Detected unknown driver id: %s.\", sanitizedDriverId), state);\n                return;\n            }\n        }\n\n        if (warned != null && !warned.isEmpty())\n        {\n            String minimumVersionWarn = warned.get(sanitizedDriverId);\n            if (minimumVersionWarn != null && (sanitizedDriverVersion.equals(\"unset\") || isBelowMinimum(sanitizedDriverVersion, minimumVersionWarn)))\n            {\n                warn(String.format(\"Client driver %s, version %s is below recommended minimum version %s\",\n                                   sanitizedDriverId,\n                                   sanitizedDriverVersion,\n                                   minimumVersionWarn));\n            }\n            else if (minimumVersionWarn == null && warned.containsKey(\"unknown\"))\n            {\n                warn(String.format(\"Detected unknown driver id: %s\", sanitizedDriverId));\n            }\n        }\n    }\n\n    /**\n     * This method should not be used in normal circumstances as {@link #guard(String, String, ClientState)}\n     * should be called directly instead.\n     *\n     * @param rawDriverId the value to check, driver name and version delimited by a colon.\n     * @param state       client state\n     */\n    @Override\n    public void guard(String rawDriverId, @Nullable ClientState state)\n    {\n        if (rawDriverId == null)\n        {\n            guard(null, null, state);\n        }","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/guardrails/ClientDriverVersionGuardrail.java#L110-L146","documentation":"ClientDriverVersionGuardrail.guard warns when the client's driver id is not one the server recognizes (no per-driver minimum configured) while the guardrail has an 'unknown' warn entry. The server cannot make any compatibility judgment about an unrecognized driver, so it flags it for operator awareness.","triggerScenarios":"A client reports a driverName that is not in the server's known-driver table (custom driver, niche language driver, misconfigured driver name string) and warned.containsKey(\"unknown\") is true with no minimumVersionWarn for that id.","commonSituations":"In-house or experimental drivers setting a custom driver name in connection options; new driver versions ahead of the server's known list; spoofed/incorrect driver name configuration.","solutions":["Check what the client sends as driver name — if it's a custom driver, register awareness of it in your guardrail config or set an explicit threshold for it.","Upgrade the client to a mainstream driver the server recognizes if the custom one is unintentional.","Add the unknown driver id to the guardrail's warn/fail map if you want tailored thresholds for it.","Silence by adjusting the 'unknown' warn entry if this traffic is expected and safe."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// ensure the client reports a recognized driver name\nif (!KNOWN_DRIVER_IDS.contains(driverId)) {\n    logger.warn(\"Driver id '{}' is not recognized by the server guardrail\", driverId);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer supported mainstream drivers whose ids the server recognizes.","For custom drivers, configure their id in the guardrail thresholds deliberately.","Audit connection metadata to catch spoofed/misconfigured driver names.","Update guardrail config when adding new client stacks to the fleet."],"tags":["cassandra","guardrails","driver","client-compatibility"],"backgroundTag":"invalid-enum-value","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"}