Flatten callhome-provider
[netconf.git] / apps / callhome-provider / src / main / java / org / opendaylight / netconf / topology / callhome / CallHomeSshAuthProvider.java
1 /*
2  * Copyright (c) 2023 PANTHEON.tech s.r.o. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netconf.topology.callhome;
9
10 import java.net.SocketAddress;
11 import java.security.PublicKey;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.eclipse.jdt.annotation.Nullable;
14
15 /**
16  * Provider responsible for resolving Call-Home SSH authorization.
17  */
18 public interface CallHomeSshAuthProvider {
19     /**
20      * Provides auth parameters for incoming call-home connection.
21      *
22      * @param remoteAddress Remote socket address of incoming connection
23      * @param serverKey     SSH key provided by SSH server on incoming connection
24      * @return {@link CallHomeSshAuthSettings} instance if there are settings associated with incoming connection,
25      *     {@code null} otherwise.
26      */
27     @Nullable CallHomeSshAuthSettings provideAuth(@NonNull SocketAddress remoteAddress, @NonNull PublicKey serverKey);
28 }