nizhikov commented on code in PR #13874:
URL: https://github.com/apache/ignite/pull/13874#discussion_r4712980788


##########
modules/commons/src/main/java/org/apache/ignite/internal/processors/ssl/ReloadableSslFactory.java:
##########
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.ssl;
+
+import java.security.GeneralSecurityException;
+import java.security.KeyStore;
+import java.security.cert.Certificate;
+import java.security.cert.X509Certificate;
+import java.util.Enumeration;
+import javax.cache.configuration.Factory;
+import javax.net.ssl.SSLContext;
+import org.apache.ignite.IgniteException;
+
+/** SSL context factory that the SSL factory registry can reload on request 
and before its certificates expire. */
+public interface ReloadableSslFactory extends Factory<SSLContext> {
+    /**
+     * Loads the keys and trust settings again for new connections. If loading 
fails, new connections keep the previous ones.
+     *
+     * @throws IgniteException If loading fails.
+     */
+    public void init();
+
+    /**
+     * The automatic reload time is the earliest expiry among the certificate 
chains of the private keys that new connections
+     * use, minus the lead time of the factory. A chain expires when any 
certificate in it expires.
+     * Keys without an X.509 certificate chain are ignored, as TLS cannot use 
them. A factory that has lost the keys
+     * of new connections, for example after a failed reload outside the 
registry, gives a time that has already come,
+     * so that the next check reloads it.
+     *
+     * @return Automatic reload time in milliseconds since the epoch, or 
{@code 0} if the factory gives no private key with
+     *     an X.509 certificate chain.
+     * @throws IgniteException If the factory cannot give the certificates 
that new connections use.
+     */
+    public long autoReloadTime();

Review Comment:
   autoReload -> hotReload



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to