grails-plugins / grails-rest-client-builder

REST client plugin that uses Spring's RestTemplate
http://grails.org/plugin/rest-client-builder
Apache License 2.0
65 stars 32 forks source link

HTTPS SSL certificate issue #53

Open saqib-ahmed opened 6 years ago

saqib-ahmed commented 6 years ago

I am calling a simple get request with https protocol and getting a certificate validation exception. Is there any shortcut to disable the SSL certification validation for HTTPS. The exception is as follows:

ERROR org.grails.web.errors.GrailsExceptionResolver - CertificateException occurred when processing request: [GET] /team/index
No subject alternative names present. Stacktrace follows:
java.lang.reflect.InvocationTargetException: null
    at org.grails.core.DefaultGrailsControllerClass$ReflectionInvoker.invoke(DefaultGrailsControllerClass.java:210)
    at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:187)
    at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:230)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:202)
    at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
    at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://192.168.1.100/adminapi/team/": java.security.cert.CertificateException: No subject alternative names present; nested exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
Chiranjeevi-Vudutha commented 5 years ago

Is it still open ? do we need to go for other plugin if I need to use https urls ?

saqib-ahmed commented 5 years ago

I had to use HTTP Builder for HTTPS connections.

I don't think this project is being maintained anymore. Not in this repo at least.