Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Odata, client certificate authentication in java client

Posted on 2013-01-09
6
710 Views
Last Modified: 2013-01-17
Dear experts,

I am trying to build an application that gets OData from a OData website. to do this i have to use Client certificate authentication to access the data. I however don't know how to get this done and make a connection to the site. Does someone have an example for me?.

Thanks,

Mark Vrenken
0
Comment
Question by:MarkVrenken
  • 3
  • 3
6 Comments
 
LVL 16

Expert Comment

by:Valeri
ID: 38758376
0
 
LVL 16

Expert Comment

by:Valeri
ID: 38758543
and after that:
ODataConsumer.newBuilder(serviceUri).setClientBehaviors(OClientBehaviors.allowSelfSignedCerts()).build();

I think this is what you are asking about?! You are using odata4j aren't you?
0
 
LVL 1

Author Comment

by:MarkVrenken
ID: 38758558
Hi Valerie,

Thanks for your responces! Yes i am using OData4j. I will try this. Thanks very much, hope it works.

Regards,

Mark Vrenken
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:MarkVrenken
ID: 38758902
Hi Valeri,

Can you please explain me why I have to add this key to the keystore? I have installed the server certificate to my pc, is this enough or is it necessary to also add it to the keystore? because then i have to ask the system admin (cacerts access is denied in cmd)

Cheers,

Mark
0
 
LVL 16

Accepted Solution

by:
Valeri earned 500 total points
ID: 38759701
Actually I have never used this type of authentication. I have used only base authentication. But I think you have to add it, because of this code. It looks like the certificates are loaded from there.

http://code.google.com/p/odata4j/source/browse/odata4j-core/src/main/java/org/odata4j/consumer/behaviors/AllowSelfSignedCertsBehavior.java?name=0.5
0
 
LVL 1

Author Closing Comment

by:MarkVrenken
ID: 38786965
I have not yet got this far because of some issues with connectivity but thanks for your help. I am trying to use the Odata4j package but have to use a proxy and don't know how to do this in combination with the ODataConsumer.

THanks for your help!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question