Jump to content

Enable SSL for JNDI Datasource


dmaheshwarareddy

Recommended Posts

Environment : Jasper Server 6.3

Data Base: PostgresSQL 9.6

Question:   Enable SSL for JNDI Data source

Currently  I am facing issue when i add SSL enable parameter for my JNDI connection URL.

/META-INF/Context.xml

<Resource name="jdbc/XXXX" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="XXXXX" password="XXXXX" driverClassName="org.postgresql.Driver" accessToUnderlyingConnectionAllowed="true" validationQuery="SELECT 1" testOnBorrow="true" url="jdbc:postgresql://localhost:5432/databse1?ssl=true&amp;sslfactory=org.postgresql.ssl.NonValidatingFactory" factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory"/>

Please suggest the way to enable SSL in JNDI data source.

Thanks,

Mahesh

Link to comment
Share on other sites

  • 5 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I was able to get this working by changing :

url="jdbc:postgresql://localhost:5432/databse1?ssl=true&amp;sslfactory=org.postgresql.ssl.NonValidatingFactory" 

to

url="jdbc:postgresql://localhost:5432/databse1?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory" 

 

Here's the connection log from Postgres showing SSL traffic.

2017-08-03 11:26:16 CDT LOG:  connection authorized: user=jasperdb database=jasperserver SSL enabled (protocol=TLSv1.2, cipher=ECDHE-RSA-AES128-GCM-SHA256, compression=off)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...