{"record":{"id":"ad1d320b64762fbc","repo":"eclipse-vertx/vert.x","slug":"the-server-must-be-configured-with-a-token-validat","errorCode":null,"errorMessage":"The server must be configured with a token validation key to operate address validation","messagePattern":"The server must be configured with a token validation key to operate address validation","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/net/impl/quic/QuicServerImpl.java","lineNumber":203,"sourceCode":"    QuicSslContextBuilder sslContextBuilder = QuicSslContextBuilder\n      .forServer(SNI_KEYMANAGER, null)\n      .clientAuth(ClientAuth.REQUIRE)\n      .sni(mapping);\n    sslContextBuilder.keylog(keylog);\n    if (sslOptions.getClientAuth() != null) {\n      sslContextBuilder.clientAuth(SslContextManager.mapClientAuth(sslOptions.getClientAuth()));\n    }\n    QuicSslContext sslContext = sslContextBuilder.build();\n    QuicTokenHandler qtc = tokenHandler;\n    if (qtc == null) {\n      switch (config.getClientAddressValidation()) {\n        case BASIC:\n          qtc = InsecureQuicTokenHandler.INSTANCE;\n          break;\n        case CRYPTO:\n          KeyCertOptions tokenValidationKey = config.getClientAddressValidationKey();\n          if (tokenValidationKey == null) {\n            throw new IllegalArgumentException(\"The server must be configured with a token validation key to operate address validation\");\n          }\n          Duration timeWindow = config.getClientAddressValidationTimeWindow();\n          TokenManager tokenManager = new TokenManager(vertx, timeWindow);\n          tokenManager.init(tokenValidationKey);\n          qtc = tokenManager;\n          break;\n      }\n    }\n    QuicServerCodecBuilder builder = new QuicServerCodecBuilder().sslContext(sslContext)\n      .tokenHandler(qtc)\n      .handler(new ChannelInitializer<>() {\n        @Override\n        protected void initChannel(Channel ch) {\n          connectionGroup.add(ch);\n          QuicChannel channel = (QuicChannel) ch;\n          LogConfig logConfig = config.getLogConfig();\n          ByteBufFormat activityLogging = logConfig != null && logConfig.isEnabled() ? logConfig.getDataFormat() : null;\n          Completable<QuicConnection> adapter = (result, failure) -> {","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/net/impl/quic/QuicServerImpl.java#L185-L221","documentation":"QUIC server configuration inconsistency in createCodecBuilder: address validation is enabled (clientAddressValidation != NONE) but no token handler and no token validation key was configured, so the server cannot issue/validate address-validation tokens. The inputs at fault are QuicServerOptions.clientAddressValidation and the missing token key configuration.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/net/impl/quic/QuicServerImpl.java:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the QUIC token validation key on the server options","Provide a custom QuicTokenHandler","Set clientAddressValidation to NONE to disable validation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}