I am using springboot and I am writing a client application. The header(header name ssl_cert_header) needs to have x509 cert. I am not finding any help on how to set httpheader with x509 cert. Header needs to be set on web server(irule) or should be coded? appreciate if someone can respond.
Asked
Active
Viewed 664 times
1
-
Is this for an Http connection? If so why are you doing the TSL/SSL your self? The app server, front end web server, fire wall, or load balancer will take care of all of that for you and do a much better and safer job of it. It is a bad idea to try to implement this your self. – BrianC Jan 08 '18 at 22:21
-
Thanks @BrianC . yes this is for HTTPS connection. So if everything is done on the server, then whats the purpose of the below code? Check the message from Ruslan Poshuk https://stackoverflow.com/questions/45713593/what-is-the-right-way-to-send-a-client-certificate-with-every-request-made-by-th – rookieDeveloper Jan 08 '18 at 23:27
-
What below code? There is no code in this post. There is no purpose in doing the TLS/SSL your self. The browser will pass the cert(s) to the sever. There is no need to manually do this your self. – BrianC Jan 08 '18 at 23:41
-
The code is in this link- stackoverflow.com/questions/45713593/…. Check the message from Ruslan Poshuk. – confident 5 mins ago – BrianC Jan 08 '18 at 23:46
-
I do not see any need for it there either unless they are doing some sort of custom generated cert because they did not want to buy a publicly signed one. If you need an SSL connection you with RestTemplate you just need to start the URL with HTTPS instead of HTTP and as long as the server you are calling supports TSL/SSL then you are set. – BrianC Jan 08 '18 at 23:50
-
The only reason to do this your self is as mentioned if a manually generated cert is being used, or they have some very odd non-standard encryption setup that is incompatible withTSL/SSL. – BrianC Jan 08 '18 at 23:54
-
Thanks @BrianC. We have a iRule f5. So it can handle the SSL handshake and add the client cert to the http header and all I need is below code. String url = "https://localhost:8443/hello"; ResponseEntity
response = new RestTemplate().exchange(url, HttpMethod.GET, null, String.class); – rookieDeveloper Jan 09 '18 at 02:07 -
I also would like to know how to add header. Appreciate your help. – rookieDeveloper Jan 12 '18 at 00:08