Vertx-rx-javaでVertex v3.4.1を使用してサーバーを実行しています。私は証明書ベースの認証(相互認証)を有効にしなければならないため、サーバー側で証明書失効チェックを処理しようとしています。VertexとJavaのCRLによる証明書失効処理
私はaddCrlPath method of HttpServerOptionsを使用しようとしています。ただし、既にロードされたCRLが期限切れになった後でも、指定された 'path'または証明書のCRL配布ポイント(CDP)からCRLを再ロードしないようです。 Vertexを使ってプログラムでどのように達成できるのか、API /ドキュメントが見つかりません。
getTrustMgrFactory method in SSLHelper classの実装を見てきましたが、サーバーの起動時にのみ提供されるCRLを選択する気がします。
だから、私のクエリは、次のとおりです。
- 私は、現在ロードされているCRLの有効期限が切れた後、自動的にCDPからダウンロードされた最新のCRLを確保し、いくつかの設定をしないのですか?
addCrlPath
の方法で提供されている同じパスからCRLをリロードできるその他の設定をCDPから自動的にダウンロードしない場合は、- #1と#2のためにVertxに内蔵サポートがない場合、そのようなサポートを提供する他のAPIが内蔵されていますか?
これ以外の場合は、私の唯一の選択肢はこれらを自分で処理することです。以下は
が、私はこのクエリを書いている時点で私のサーバーimport io.vertx.core.http.ClientAuth;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.net.PfxOptions;
import io.vertx.rxjava.core.Vertx;
import io.vertx.rxjava.ext.web.Router;
import io.vertx.rxjava.ext.web.RoutingContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class VertxServer {
private static final Logger LOGGER = LoggerFactory.getLogger(VertxServer.class);
private Vertx vertx;
public VertxServer(final Vertx v) {
this.vertx = v;
}
public void init() {
vertx.createHttpServer(getHttpServerOptions())
// getRouter() method handles router configuration.
.requestHandler(req -> getRouter().accept(req))
.rxListen()
.doOnSuccess(server -> LOGGER.info("Started listening to server..."))
.doOnError(e -> LOGGER.error("Unable to listen. Server launch failed", e))
.subscribe(
server -> LOGGER.info("Server launched successfully. {}", server),
e -> LOGGER.error("Server launch failed", e))
;
}
private HttpServerOptions getHttpServerOptions() {
HttpServerOptions options = new HttpServerOptions()
.setHost("127.0.0.1")
.setPort(8085);
.setSsl(true)
.setPfxKeyCertOptions(
new PfxOptions()
.setPath("E:\\temp\\certs\\server.pfx")
.setPassword("servercertpass".toCharArray())
)
setTrustStoreOptions(options);
return options;
}
private void setTrustStoreOptions(final HttpServerOptions options) {
PfxOptions pfxOptions = new PfxOptions()
.setPath("E:\\temp\\certs\\client-cert-root.p12")
.setPassword("clientcertrootpass".toCharArray());
options.setPfxTrustOptions(pfxOptions)
.addCrlPath("E:\\temp\\certs\\crls\\client-certs.crl")
.setClientAuth(ClientAuth.REQUEST);
}
// Other methods here, which are not relevant for this question.
}