Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
170 views
in Technique[技术] by (71.8m points)

Teiid 2-way SSL- connection successful even without the Truststore

I have a teiid embedded server and I am trying to connect to a vds on that server through 2-way SSL from my remote client by passing the teiid SSL properties in SystemProperties as per the teiid documentation at: http://teiid.github.io/teiid-documents/12.3.x/content/client-dev/SSL_Client_Connections.html

The connection is successful even without the truststore which is a mandatory property.

Code snippet to replicate this issue:

  Properties properties = new Properties();
  properties.put("user", "admin");
  properties.put("password", "admin");

  System.setProperty("org.teiid.ssl.keyStore", "C:/truststore.p12");
  System.setProperty("org.teiid.ssl.keyStorePassword", "testssl");
  System.setProperty("org.teiid.ssl.trustAll", "false");

  DriverManager.registerDriver(new TeiidDriver());
  Connection connection1 = DriverManager.getConnection("jdbc:teiid:testvds@mms://localhost:32750", properties);
  if (connection.isValid(1000))
  {
    System.out.println("Connection success");
  }

In this case it should have failed. Can you please let me know if this is an issue or I am missing something on my end.

Thanks, Megha

question from:https://stackoverflow.com/questions/65557880/teiid-2-way-ssl-connection-successful-even-without-the-truststore

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Can you elaborate on the server side settings? As the other user is getting at, if the server key is already trusted by the default java trust store you don't need additional client settings.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...