Solved

Odata, client certificate authentication in java client

Posted on 2013-01-09
6
701 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Timer (static) 9 43
hibernate insert example 13 28
How do I remove an object from a 3 23
login form jsp example 2 24
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now