Skip to content

ARIES-2197 Add TLS/MTLS support to TCP Provider#60

Open
amichair wants to merge 7 commits intoapache:masterfrom
amichair:ARIES-2197
Open

ARIES-2197 Add TLS/MTLS support to TCP Provider#60
amichair wants to merge 7 commits intoapache:masterfrom
amichair:ARIES-2197

Conversation

@amichair
Copy link
Copy Markdown
Contributor

@amichair amichair commented Mar 9, 2026

Implemented TLS+MTLS+tests.

This PR sits on top of the ARIES-2121 PR, so that PR needs to be merged first.

static final int DEFAULT_NUM_THREADS = 10;

private final Map<String, Object> props;
private final String uuid = UUID.randomUUID().toString(); // fallback id
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of uuid we can call the fieldfallbackId

RemoteConstants.REMOTE_CONFIGS_SUPPORTED + "=" + TcpProvider.TCP_CONFIG_TYPE //
})
},
configurationPid="org.apache.aries.rsa.provider.tcp")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make a const for this property also?

}
} catch (NoSuchAlgorithmException | KeyManagementException | UnrecoverableKeyException | IOException |
KeyStoreException | CertificateException e) {
throw new RuntimeException("Error initializing SSL Context", e);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we throw some better exception? I mean our exception

private Endpoint ep;
private ImportedService importedService;

public void test(Map<String, Object> providerProps) throws IOException {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be private? I thought first that we are using some old test framework, not Junit 4

Map<String, Object> props = new HashMap<>();
EndpointHelper.addObjectClass(props, exportedInterfaces);
int port = getFreePort();
props.put("aries.rsa.hostname", "localhost");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the defined consts?

public class TcpProviderTLSTest {

private static String
KEYSTORE = TcpProviderTest.class.getResource("/keystore.p12").getPath(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can provide here the commands you used to create the files - just in case we want to add more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants