ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error in WS invocation with HTTP Request Node for https url

Post new topic  Reply to topic
 Error in WS invocation with HTTP Request Node for https url « View previous topic :: View next topic » 
Author Message
Bichu
PostPosted: Thu Oct 13, 2016 5:57 am    Post subject: Error in WS invocation with HTTP Request Node for https url Reply with quote

Centurion

Joined: 16 Oct 2011
Posts: 124
Location: London

Guys,

I am trying to call a WS using HTTP Request node and the url starts with https. Hence I am implementing SSL in IIB. I have downloaded the .CER file using Chrome from their website and add it to keystore cacerts file using the below command.

keytool -import -alias mykey -file D:\test\test.cer -keystore "C:\Program Files (x86)\IBM\IntegrationToolkit90\jdk\jre\lib\security\cacerts" -storepass changeit

But I got connection timed out error and I run the below commands too.

mqsichangeproperties BROKER1 -b httplistener -o HTTPListener -n enableSSLConnector -v true
mqsichangeproperties BROKER1 -b httplistener -o HTTPSConnector -n keystoreFile -v D:\test\test.cer
mqsichangeproperties BROKER1 -b httplistener -o HTTPSConnector -n keystorePass -v changeit
mqsichangeproperties BROKER1 -b httplistener -o HTTPSConnector -n port -v 7083
mqsichangeproperties BROKER1 -b httplistener -o HTTPConnector -n port -v 7080
mqsichangeproperties BROKER1 -b httplistener -o HTTPSListener -n startListener -v true

But now I am getting invalid keystore fomat error.

What needs to be added more?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 13, 2016 6:00 am    Post subject: Re: Error in WS invocation with HTTP Request Node for https Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bichu wrote:
What needs to be added more?


Nothing more, but you need to do something right.

Bichu wrote:
mqsichangeproperties BROKER1 -b httplistener -o HTTPSConnector -n keystoreFile -v D:\test\test.cer


That's the certificate file, not the key store file. That's why the -n parameter says "keystore" and why the error message says "invalid keystore format". A certificate has a different format to a key store.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 13, 2016 6:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

On a more general level, I don't think adding their public cert to your cacerts list is going to get you very far. I'd expect that you'd need to give broker a personal cert to present and trust their signer.

Which is the more standard way of implementing SSL in IIB, and the one documented in the KC
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Bichu
PostPosted: Thu Oct 13, 2016 8:26 am    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2011
Posts: 124
Location: London

Thanks Vitor.

But cant we import a .CER format certificate using keytool and then tell broker to authenticate using that.

The below link tells to upload .DER file and I have only .cer file exported from browser
http://www.ibm.com/developerworks/websphere/library/techarticles/1205_bhat/1205_bhat.html

I dont see options to convert .cer to .der using openssl too...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 13, 2016 8:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Bichu wrote:
Thanks Vitor.

But cant we import a .CER format certificate using keytool and then tell broker to authenticate using that.

The below link tells to upload .DER file and I have only .cer file exported from browser
http://www.ibm.com/developerworks/websphere/library/techarticles/1205_bhat/1205_bhat.html

I don't see options to convert .cer to .der using openssl too...

Er... I am getting more confused by the minute here.
You are talking about .cer and .der formats which represent the certificate.
The tools provide you with means of loading either type of cert into a keystore/truststore...
As Vitor already told you you need to focus on KEYSTORE and TRUSTSTORE.
the formats for those should be .jks...
So which part are you not understanding??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Bichu
PostPosted: Thu Oct 13, 2016 8:58 am    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2011
Posts: 124
Location: London

I have added truststore and keystore to the broker...but still I am getting connection timed out error.

Code:

C:\Program Files\IBM\MQSI\9.0.0.0>mqsireportproperties BROKER1 -b httplistener -
o HTTPSConnector -a

HTTPSConnector
  uuid='HTTPSConnector'
  algorithm='Platform Default'
  clientAuth='Platform Default'
  keystoreFile='C:\Program Files\IBM\MQSI\9.0.0.0\BROKER1.jks'
  keystorePass='********'
  keystoreType='Platform Default'
  truststoreFile='C:\Program Files\IBM\MQSI\9.0.0.0\BROKER1.jks'
  truststorePass='********'
  truststoreType='Platform Default'
  sslProtocol='Platform Default'
  ciphers='Platform Default'
  keyAlias=''
  keypass='********'
  keyAlias='Platform Default'
  crlFile='Platform Default'
  propagateClientCert='Platform Default'
  address=''
  port='7083'
  maxPostSize=''
  acceptCount=''
  compressableMimeTypes=''
  compression=''
  connectionLinger=''
  connectionTimeout=''
  maxHttpHeaderSize=''
  maxKeepAliveRequests=''
  maxThreads=''
  minSpareThreads=''
  noCompressionUserAgents=''
  restrictedUserAgents=''
  socketBuffer=''
  tcpNoDelay=''
  enableLookups='false'


In the steps to do this, they have mentioned to upload a .der file(a signed certificate) to the keystore, but since I have only .cer file, I used the same to the keystore.

I am still not sure where I am missing...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 13, 2016 9:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

A signed certificate (X509) can have multiple formats.
The most common is ASCII (.cer).
The next most common is a binary format and uses the .der extension.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Oct 13, 2016 9:17 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bichu wrote:
I am still not sure where I am missing...


The right steps.

The certificate you've downloaded is their certificate from their website.

So you're trying to connect to the endpoint and claim you're them. This claim is probably viewed with some skepticism.

You need to give broker it's own certificate so it can connect as itself.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Oct 13, 2016 10:15 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Vitor wrote:
Bichu wrote:
I am still not sure where I am missing...


The right steps.

The certificate you've downloaded is their certificate from their website.

So you're trying to connect to the endpoint and claim you're them. This claim is probably viewed with some skepticism.

You need to give broker it's own certificate so it can connect as itself.

Even worse here. The downloaded cert is a public cert. i.e. it is very unlikely the broker has the corresponding private key. So there is no way of impersonating them...
Without your own private key all you can achieve is a one way SSL connection.
So you will know they are who they say they are... They won't know you are who you say you are...

Hope this helps
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Oct 13, 2016 11:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

fjb_saper wrote:

Even worse here. The downloaded cert is a public cert. i.e. it is very unlikely the broker has the corresponding private key. So there is no way of impersonating them...


Doh!


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error in WS invocation with HTTP Request Node for https url
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.