-
1. Re: SVN portlet - secure access?
aron.gombas Oct 14, 2005 2:25 AM (in response to dhartford)Hi,
At the moment, the credentials info is not passed when connecting to an SVN instance. The reason is simply that I never had the time to play with it, but I agree it's a very fundamental feature.
However, the code is already "prepared" for this (see SvnServiceImpl), and ideally it shouldn't take longer then half an hour to implement it:// get repository info SVNURL svnUrl = SVNURL.parseURIEncoded(url); SVNRepository repo = SVNRepositoryFactory.create(svnUrl); // TODO repository.setCredentialsProvider(new SVNSimpleCredentialsProvider("anonymous", "anonymous"));//TODO should be param
Plus at the same time, we have to:
- add the login/passwd as params to the portlet.xml
- parse it from there
- pass it from the portlet to the service
- pass it to SVN when connecting
Anyway, it's not a big deal, so needs some testing.
If you want to do it, your contribution is welcome.
If not, please add this as request to Kosmos JIRA and I'll do it in the near future.
Bye,
Aron -
2. Re: SVN portlet - secure access?
aron.gombas Oct 17, 2005 6:52 AM (in response to dhartford)BTW is there any interest to implement single sign-on for the SVN portlet? (A big limitation that it'd require using the same login/password for all the SVN repos, it seems.)
-
3. Re: SVN portlet - secure access?
aron.gombas Oct 18, 2005 4:11 AM (in response to dhartford)"dhartford" wrote:
Just curious if the portlet can support non-anonymous SVN access to get the information?
FYI I've added the authentication feature as request to our JIRA: http://jira.jboss.com/jira/browse/KOSMOS-23 -
4. Re: SVN portlet - secure access?
agfisher Oct 28, 2005 4:59 PM (in response to dhartford)Do you know when this might become completed. Ran into the need today, love your software, but have secure repos. Thanks for your time,
Adam -
5. Re: SVN portlet - secure access?
aron.gombas Oct 29, 2005 9:47 AM (in response to dhartford)"agfisher" wrote:
Do you know when this might become completed.
Thanks for your interest.
This is high on the top of my todo-list, but at the moment I'm simply overwhelmed by my dayjob. The next weekend might be a bit more relaxed, so if I'm lucky you'll have it in the CVS version by Nov 7! Please follow the blog on the project page (accessible also via RSS).
Bye, -
6. Re: SVN portlet - secure access?
aron.gombas Nov 1, 2005 7:07 AM (in response to dhartford)Today I had a relatively relaxed day as my ISP stopped working... :/
The good news is that the security feature is added to the SVN portlet. All you have to do is adding the username and password to the secure URL to monitor. So the secure and public URL can be expressed in the formats:http://myusername:mypassword@www.myorganization.com/svn/securerepo http://www.myorganization.com/svn/publicrepo
It's avaible only in the SVN version now, but will be released in a couple of weeks.
Please let me know if you have any problems with this. -
7. Re: SVN portlet - secure access?
johanmoreau Nov 7, 2005 7:30 AM (in response to dhartford)Here, it is ok :
[SvnServiceImpl] Analyzing log of "http://***:***@dev-srv:8080/svn/..." repository...
[SvnServiceImpl] 25 log-entries received.
[SvnServiceImpl] Analyzing content of "http://***:***@dev-srv:8080/svn/..." repository...
[SvnServiceImpl] 107 repo-entries processed.
But after, i get that :
[SvnServiceImpl] Unable to process the SVN repo
java.lang.NullPointerException
at java.lang.String.(String.java:173)
at org.apache.commons.httpclient.HttpURL.setRawUser(HttpURL.java:553)
at org.apache.commons.httpclient.HttpURL.setUser(HttpURL.java:585)
at hu.midori.kosmos.server.AbstractKosmosService.saveCachedFile(AbstractKosmosService.java:118)
at hu.midori.kosmos.server.svn.SvnServiceImpl.access$400(SvnServiceImpl.java:56)
It's the same case with no auth :
13:07:21,382 INFO [SvnServiceImpl] Analyzing log of "http://anonsvn.labs.jboss.com/trunk/labs/jbossprofiler" repository...
13:07:22,284 INFO [SvnServiceImpl] 1 log-entries received.
13:07:22,284 INFO [SvnServiceImpl] Analyzing content of "http://anonsvn.labs.jboss.com/trunk/labs/jbossprofiler" repository...
13:07:22,834 INFO [SvnServiceImpl] 1 repo-entries processed.
13:07:22,894 ERROR [SvnServiceImpl] Unable to process the SVN repo
java.lang.NullPointerException
Have you an idea ?
thanks -
8. Re: SVN portlet - secure access?
aron.gombas Nov 7, 2005 11:00 AM (in response to dhartford)"johanmoreau" wrote:
Here, it is ok :
From you log, I can see that accessing the secured SVN repo is OK. The problem is in accessing the WebDAV store where the cached files (the chart images in this case) got saved.
Is your WebDAV URL, user, password correctly set in the Kosmos server web.xml? -
9. Re: SVN portlet - secure access?
johanmoreau Nov 7, 2005 1:05 PM (in response to dhartford)I fixed user and pass in web.xml
but it's always breaking :
19:02:15,927 INFO [SvnServiceImpl] Analyzing content of "http://anonsvn.labs.jboss.com/trunk/labs/jbossprofiler" repository...
19:02:16,478 INFO [SvnServiceImpl] 1 repo-entries processed.
19:02:16,548 INFO [WebdavUtils] URL: http://dev-srv:8080/dav/, path: /dav/, 1 children
19:02:16,548 INFO [WebdavUtils] 0: kosmos-cache
19:02:16,568 INFO [HttpMethodBase] Redirect requested but followRedirects is disabled
19:02:16,568 ERROR [SvnServiceImpl] Unable to process the SVN repo
org.apache.commons.httpclient.HttpException
at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3185)
at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3145)
"Read and write" is ok on my webdav server.
Kosmas is able to create kosmos-cache folder but it's all.
Thanks. -
10. Re: SVN portlet - secure access?
aron.gombas Nov 7, 2005 3:11 PM (in response to dhartford)"johanmoreau" wrote:
I fixed user and pass in web.xml
but it's always breaking :
Hmmm...
1. Can you give me the full stack trace? (I can't see here what line in Kosmos causes the exception.) Are you using the current SVN version of Kosmos?
2. What WebDAV server are you using?
Thanks. -
11. Re: SVN portlet - secure access?
johanmoreau Nov 8, 2005 2:35 AM (in response to dhartford)The full trace is :
19:07:15,809 INFO [SvnServiceImpl] Analyzing content of "http://anonsvn.labs.jboss.com/trunk/labs/jbossprofiler" repository...
19:07:16,360 INFO [SvnServiceImpl] 1 repo-entries processed.
19:07:16,450 INFO [WebdavUtils] URL: http://dev-srv:8080/dav/, path: /dav/, 1 children
19:07:16,450 INFO [WebdavUtils] 0: kosmos-cache
19:07:16,460 INFO [HttpMethodBase] Redirect requested but followRedirects is disabled
19:07:16,460 ERROR [SvnServiceImpl] Unable to process the SVN repo
org.apache.commons.httpclient.HttpException
at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3185)
at org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3145)
at org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:879)
at org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResource.java:824)
at org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1746)
at org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1769)
at org.apache.webdav.lib.WebdavResource.getChildResources(WebdavResource.java:1921)
at hu.midori.kosmos.server.AbstractKosmosService.saveCachedFile(AbstractKosmosService.java:151)
at hu.midori.kosmos.server.svn.SvnServiceImpl.access$400(SvnServiceImpl.java:56)
at hu.midori.kosmos.server.svn.SvnServiceImpl$SvnDataHandler.generateCharts(SvnServiceImpl.java:365)
at hu.midori.kosmos.server.svn.SvnServiceImpl$SvnDataHandler.reloadData(SvnServiceImpl.java:109)
at hu.midori.kosmos.server.AbstractKosmosService.getFromCache(AbstractKosmosService.java:87)
at hu.midori.kosmos.server.svn.SvnServiceImpl.getRepositories(SvnServiceImpl.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy77.getRepositories(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157)
at org.springframework.remoting.caucho.HessianServiceExporter.handleRequest(HessianServiceExporter.java:87)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
I use JBoss AS + JBoss Portal and the Kosmos CVS source on Win 2k.
SVN is enable in portlet.xml.
SVN server run on apache2 on Debian (work with other env)
Webdav run on apache2 (dab_fs module) on Debian (work with other env)
Thanks. -
12. Re: SVN portlet - secure access?
aron.gombas Nov 8, 2005 3:11 AM (in response to dhartford)"johanmoreau" wrote:
The full trace is :
Hmmm, this is strange.
What happens here is:
- connecting to the WebDAV root => OK
- listing its children and looking for the "kosmos-cache" dir => OK
- listing the children of "kosmos-cache" => exception?!
I've added some more diagnostic messages to the code, which should help in tracking down the problem.
Could you take the latest source, rerun it and post the new log here?
This can be a problem in Slide or in HttpClient, but first I'd like to make sure that the URLs themselves are correct.
Thanks,
Aron -
13. Re: SVN portlet - secure access?
aron.gombas Nov 8, 2005 3:14 AM (in response to dhartford)2 other things that you can test easily:
a - if you manually delete the "kosmos-cache" from your WebDAV, will that get recreated by Kosmos without any problem?
b - you can try to upgrade to the latest jakarta-slide-webdavlib-XYZ.jar (in /WEB-INF/lib of the Kosmos server component). That might help, but can cause other problems (that's why we don't use it, but an older [2.0] version) -
14. Re: SVN portlet - secure access?
aron.gombas Nov 8, 2005 3:16 AM (in response to dhartford)+ if it's possible, you can make a try with Slide as WebDAV server (not SVN)...
That's what I'm using for development purposes here. I'm not sure if it's an option for you, but it might worth a try.