Solved

Odata, client certificate authentication in java client

Posted on 2013-01-09
6
742 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
[X]
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
  • 3
  • 3
6 Comments
 
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

623 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