[Issue 4750] New - SubversionSCM postCredential fails

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Issue 4750] New - SubversionSCM postCredential fails

kutsal
https://hudson.dev.java.net/issues/show_bug.cgi?id=4750
                 Issue #|4750
                 Summary|SubversionSCM postCredential fails
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|Linux
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|subversion
             Assigned to|issues@hudson
             Reported by|kutsal






------- Additional comments from [hidden email] Sun Nov  1 19:24:02 +0000 2009 -------
My current SVN setup proves problematic for the subversion plugin because it
doesn't see the authentication challenge when it tries to validate the
credentials I enter.

My SVN server is configured to allow anyone to checkout anything they like
(Apache-speak, I have this: <LimitExcept GET PROPFIND OPTIONS REPORT> and
authenticate users against our corporate Active Directory server for any other
type of request via basic auth).

I believe the following if statement in SubversionSCM.java

    if(!authenticationAttemped[0]) {
        logWriter.println("No authentication was attemped.");
        throw new SVNCancelException();
    }

is unnecessary, at least in my case; i.e. not receiving an auth challenge should
not prevent me from adding SVN credentials for a repository (because the repo is
configured to ask for one when the user tries to *write* to it).

Please see below for the stacktrace.

No authentication was attemped.
FAILED: svn: Operation cancelled

org.tmatesoft.svn.core.SVNCancelException: svn: Operation cancelled
        at hudson.scm.SubversionSCM$DescriptorImpl.postCredential(SubversionSCM.java:1624)
        at
hudson.scm.SubversionSCM$DescriptorImpl.doPostCredential(SubversionSCM.java:1520)
        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:597)
        at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
        at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
        at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
        at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:493)
        at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:180)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:493)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:409)
        at org.kohsuke.stapler.Stapler.service(Stapler.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
        at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
        at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:35)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
        at
hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at
org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at
hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
        at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
        at java.lang.Thread.run(Thread.java:619)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 4750] SubversionSCM postCredential fails

Kohsuke Kawaguchi
Administrator
https://hudson.dev.java.net/issues/show_bug.cgi?id=4750



User kohsuke changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |STARTED
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Tue Nov  3 01:49:55 +0000 2009 -------
Because of the way Subversion authentication works, unless the server actually
sends us the challenge, we can't obtain the information we need to tie a
credential to a repository.

Maybe Hudson could try to execute some relatively harmless operation (like
setting a dummy property on a directory) as a fall back to let the server send
an authentication challenge?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 4750] SubversionSCM postCredential fails

kutsal
In reply to this post by kutsal
https://hudson.dev.java.net/issues/show_bug.cgi?id=4750






------- Additional comments from [hidden email] Tue Nov  3 03:30:15 +0000 2009 -------
Some SVN purists out there might not like that idea (I'm not one of them, but
*shrug*)

I looked at the code and as far as I understand, the only other thing you'd need
is the realm information, right?

If that's the case, how about modifying enterCredential.jelly to add a checkbox
and a textfield with some language like this:

[x] Repository requires auth upon commit only (checkbox expands below textfield)
    Repo Realm: [ enter realm here ]

That way, the user/administrator can enter the repo realm information along with
the credentials if s/he so chooses?


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]