Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
TlsIndirectKeyStore |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
3 | * The software in this package is published under the terms of the CPAL v1.0 | |
4 | * license, a copy of which has been included with this distribution in the | |
5 | * LICENSE.txt file. | |
6 | */ | |
7 | package org.mule.api.security; | |
8 | ||
9 | import java.io.IOException; | |
10 | ||
11 | /** | |
12 | * Configure indirect key stores. | |
13 | * TLS/SSL connections are made on behalf of an entity, which can be anonymous or identified by a | |
14 | * certificate - this interface specifies how a keystore can be used to provide the certificates | |
15 | * (and associated private keys) necessary for identification. | |
16 | * | |
17 | * <p>The information specified in this interface is used to configure a key store indirectly. | |
18 | * For more information see the documentation for the connector or protocol in question. | |
19 | * The comments in {@link org.mule.api.security.tls.TlsConfiguration} may also be useful.</p> | |
20 | * | |
21 | * <p><em>Programmers:</em> this information, once stored in and retrieved from properties via | |
22 | * {@link org.mule.api.security.tls.TlsPropertiesMapper}, will provide a key manager factory via the {@link TlsDirectKeyStore} | |
23 | * interface implemented by {@link org.mule.api.security.tls.TlsConfiguration}. This can be associated with a socket | |
24 | * factory via {@link org.mule.api.security.tls.TlsPropertiesSocketFactory}.</p> | |
25 | */ | |
26 | public interface TlsIndirectKeyStore | |
27 | { | |
28 | ||
29 | /** | |
30 | * @return The location (resolved relative to the current classpath and file system, if possible) | |
31 | * of the keystore that contains public certificates and private keys for identification. | |
32 | */ | |
33 | String getClientKeyStore(); | |
34 | ||
35 | /** | |
36 | * @param name The location of the keystore that contains public certificates and private keys | |
37 | * for identification. | |
38 | * @throws IOException If the location cannot be resolved via the file system or classpath | |
39 | */ | |
40 | void setClientKeyStore(String name) throws IOException; | |
41 | ||
42 | /** | |
43 | * @return The password used to protect the keystore itself | |
44 | */ | |
45 | String getClientKeyStorePassword(); | |
46 | ||
47 | /** | |
48 | * @param clientKeyStorePassword The password used to protect the keystore itself | |
49 | */ | |
50 | void setClientKeyStorePassword(String clientKeyStorePassword); | |
51 | ||
52 | void setClientKeyStoreType(String clientKeyStoreType); | |
53 | ||
54 | /** | |
55 | * @return The type of keystore used in {@link #setClientKeyStore(String)} | |
56 | */ | |
57 | String getClientKeyStoreType(); | |
58 | ||
59 | } | |
60 | ||
61 |