abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Berry <chriswbe...@gmail.com>
Subject SSL redirects
Date Fri, 24 Aug 2007 23:44:47 GMT
Greetings,

I am using the Abdera CommonsClient in JUnits to my Abdera-based  
GData-style Atom store.
I have this store secured using HTTP BASIC Auth and SSL (using Acegi  
to wire it all up)
It works fine if I access it through https://

But when I use http:// and redirect it to https:// (in my Server),  
the Client does not appear to be sending along the Auth Header.
Is there anything I can do to enable this behavior in CommonsClient??
Any help will be much appreciated.

Thanks;
-- Chris 

Here is the output (Note that the Auth Header is not in the  
redirected call)


2007-08-24 18:39:55.076::INFO:  Started SocketConnector @ 0.0.0.0:50080
2007-08-24 18:39:55.078::INFO:  Started SslSocketConnector @  
0.0.0.0:50443
DEBUG - JettyWebAppTestCase        - !!!!!!!!!!!! Connector Name =  
nonSecure
DEBUG - DefaultHttpParams          - Set parameter http.useragent =  
Abdera/v0.3.0-incubating-SNAPSHOT
DEBUG - DefaultHttpParams          - Set parameter  
http.protocol.expect-continue = true
DEBUG - DefaultHttpParams          - Set parameter  
http.protocol.cookie-policy = compatibility
DEBUG - DefaultHttpParams          - Set parameter http.auth.scheme- 
priority = [ntlm, digest, basic]
DEBUG - JettyWebAppTestCase        - urlPath, uname, psswd:: http:// 
localhost:50080/hcdata/v1/rentals/trips/2797.en.xml marissa koala
DEBUG - DefaultHttpParams          - Set parameter  
http.authentication.preemptive = true
DEBUG - JettyWebAppTestCase        - Calling Abdera Client using GET  
on [http://localhost:50080/hcdata/v1/rentals/trips/2797.en.xml]
DEBUG - eadedHttpConnectionManager -  
HttpConnectionManager.getConnection:  config = HostConfiguration 
[host=http://localhost:50080], timeout = 0
DEBUG - eadedHttpConnectionManager - Allocating new connection,  
hostConfig=HostConfiguration[host=http://localhost:50080]
DEBUG - HttpMethodDirector         - Preemptively sending default  
basic credentials
DEBUG - HttpMethodDirector         - Authenticating with BASIC <any  
realm>@localhost:50080
DEBUG - HttpMethodParams           - Credential charset not  
configured, using HTTP element charset
DEBUG - HttpConnection             - Open connection to localhost:50080
DEBUG - header                     - >> "GET /hcdata/v1/rentals/trips/ 
2797.en.xml HTTP/1.1[\r][\n]"
DEBUG - HttpMethodBase             - Adding Host request header
DEBUG - header                     - >> "Connection: close[\r][\n]"
DEBUG - header                     - >> "Accept-Encoding: gzip,  
deflate[\r][\n]"
DEBUG - header                     - >> "Accept-Charset: utf-8,  
*;q=0.5[\r][\n]"
DEBUG - header                     - >> "Accept: application/atom 
+xml;type=entry, application/atom+xml;type=feed, application/atom 
+xml, application/atomsvc+xml, application/atomcat+xml, application/ 
xml, text/xml, */*[\r][\n]"
DEBUG - header                     - >> "Authorization: Basic  
bWFyaXNzYTprb2FsYQ==[\r][\n]"
DEBUG - header                     - >> "User-Agent: Abdera/v0.3.0- 
incubating-SNAPSHOT[\r][\n]"
DEBUG - header                     - >> "Host: localhost:50080[\r][\n]"
DEBUG - header                     - >> "[\r][\n]"
DEBUG - terInvocationDefinitionMap - Converted URL to lowercase,  
from: '/v1/rentals/trips/2797.en.xml'; to: '/v1/rentals/trips/ 
2797.en.xml'
DEBUG - terInvocationDefinitionMap - Candidate is: '/v1/rentals/trips/ 
2797.en.xml'; pattern is /**; matched=true
DEBUG - FilterChainProxy           - /v1/rentals/trips/2797.en.xml at  
position 1 of 5 in additional filter chain; firing Filter:  
'org.acegisecurity.securechannel.ChannelProcessingFilter@44311c'
DEBUG - terInvocationDefinitionMap - Converted URL to lowercase,  
from: '/v1/rentals/trips/2797.en.xml'; to: '/v1/rentals/trips/ 
2797.en.xml'
DEBUG - terInvocationDefinitionMap - Candidate is: '/v1/rentals/trips/ 
2797.en.xml'; pattern is /**; matched=true
DEBUG - ChannelProcessingFilter    - Request: FilterInvocation: URL: / 
v1/rentals/trips/2797.en.xml; ConfigAttributes:  
[REQUIRES_SECURE_CHANNEL]
DEBUG - RetryWithHttpsEntryPoint   - Redirecting to: https:// 
localhost:50443/hcdata/v1/rentals/trips/2797.en.xml
DEBUG - header                     - << "HTTP/1.1 302 Found[\r][\n]"
DEBUG - header                     - << "Location: https://localhost: 
50443/hcdata/v1/rentals/trips/2797.en.xml[\r][\n]"
DEBUG - header                     - << "Connection: close[\r][\n]"
DEBUG - header                     - << "Server: Jetty(6.1.1)[\r][\n]"
DEBUG - HttpMethodDirector         - Redirect required
DEBUG - HttpMethodDirector         - Redirect requested to location  
'https://localhost:50443/hcdata/v1/rentals/trips/2797.en.xml'
DEBUG - HttpMethodDirector         - Redirecting from 'http:// 
localhost:50080/hcdata/v1/rentals/trips/2797.en.xml' to 'https:// 
localhost:50443/hcdata/v1/rentals/trips/2797.en.xml
DEBUG - HttpMethodDirector         - Execute redirect 1 of 100
DEBUG - HttpMethodBase             - Should close connection in  
response to directive: close
DEBUG - HttpConnection             - Releasing connection back to  
connection manager.
DEBUG - eadedHttpConnectionManager - Freeing connection,  
hostConfig=HostConfiguration[host=http://localhost:50080]
DEBUG - IdleConnectionHandler      - Adding connection at: 1187998795091
DEBUG - eadedHttpConnectionManager - Notifying no-one, there are no  
waiting threads
DEBUG - eadedHttpConnectionManager -  
HttpConnectionManager.getConnection:  config = HostConfiguration 
[host=https://localhost:50443], timeout = 0
DEBUG - eadedHttpConnectionManager - Allocating new connection,  
hostConfig=HostConfiguration[host=https://localhost:50443]
DEBUG - HttpMethodDirector         - Preemptively sending default  
basic credentials
DEBUG - HttpMethodDirector         - Authenticating with BASIC <any  
realm>@localhost:50443
WARN  - HttpMethodDirector         - Required credentials not  
available for BASIC <any realm>@localhost:50443
WARN  - HttpMethodDirector         - Preemptive authentication  
requested but no default credentials available
DEBUG - HttpConnection             - Open connection to localhost:50443
DEBUG - header                     - >> "GET /hcdata/v1/rentals/trips/ 
2797.en.xml HTTP/1.1[\r][\n]"
DEBUG - HttpMethodBase             - Adding Host request header
DEBUG - header                     - >> "Connection: close[\r][\n]"
DEBUG - header                     - >> "Accept-Encoding: gzip,  
deflate[\r][\n]"
DEBUG - header                     - >> "Accept-Charset: utf-8,  
*;q=0.5[\r][\n]"
DEBUG - header                     - >> "Accept: application/atom 
+xml;type=entry, application/atom+xml;type=feed, application/atom 
+xml, application/atomsvc+xml, application/atomcat+xml, application/ 
xml, text/xml, */*[\r][\n]"
DEBUG - header                     - >> "User-Agent: Abdera/v0.3.0- 
incubating-SNAPSHOT[\r][\n]"
DEBUG - header                     - >> "Host: localhost:50443[\r][\n]"
DEBUG - header                     - >> "[\r][\n]"
DEBUG - terInvocationDefinitionMap - Converted URL to lowercase,  
from: '/v1/rentals/trips/2797.en.xml'; to: '/v1/rentals/trips/ 
2797.en.xml'
DEBUG - terInvocationDefinitionMap - Candidate is: '/v1/rentals/trips/ 
2797.en.xml'; pattern is /**; matched=true
DEBUG - FilterChainProxy           - /v1/rentals/trips/2797.en.xml at  
position 1 of 5 in additional filter chain; firing Filter:  
'org.acegisecurity.securechannel.ChannelProcessingFilter@44311c'
DEBUG - terInvocationDefinitionMap - Converted URL to lowercase,  
from: '/v1/rentals/trips/2797.en.xml'; to: '/v1/rentals/trips/ 
2797.en.xml'
DEBUG - terInvocationDefinitionMap - Candidate is: '/v1/rentals/trips/ 
2797.en.xml'; pattern is /**; matched=true
DEBUG - ChannelProcessingFilter    - Request: FilterInvocation: URL: / 
v1/rentals/trips/2797.en.xml; ConfigAttributes:  
[REQUIRES_SECURE_CHANNEL]
DEBUG - FilterChainProxy           - /v1/rentals/trips/2797.en.xml at  
position 2 of 5 in additional filter chain; firing Filter:  
'org.acegisecurity.context.HttpSessionContextIntegrationFilter@a26520'
DEBUG - onContextIntegrationFilter - No HttpSession currently exists  
- new SecurityContext instance associated with SecurityContextHolder
DEBUG - FilterChainProxy           - /v1/rentals/trips/2797.en.xml at  
position 3 of 5 in additional filter chain; firing Filter:  
'org.acegisecurity.ui.basicauth.BasicProcessingFilter@9d1dd7'
DEBUG - BasicProcessingFilter      - Authorization header: null
DEBUG - FilterChainProxy           - /v1/rentals/trips/2797.en.xml at  
position 4 of 5 in additional filter chain; firing Filter:  
'org.acegisecurity.ui.ExceptionTranslationFilter@43b5da'
DEBUG - FilterChainProxy           - /v1/rentals/trips/2797.en.xml at  
position 5 of 5 in additional filter chain; firing Filter:  
'org.acegisecurity.intercept.web.FilterSecurityInterceptor@5821d0'
DEBUG - terInvocationDefinitionMap - Converted URL to lowercase,  
from: '/v1/rentals/trips/2797.en.xml'; to: '/v1/rentals/trips/ 
2797.en.xml'  and httpMethod= GET
DEBUG - terInvocationDefinitionMap - ~~~~~~~~~~ antPath= /**  
methodList= [Ljava.lang.String;@57e182
DEBUG - terInvocationDefinitionMap - method[0]: GET
DEBUG - terInvocationDefinitionMap - Candidate is: '/v1/rentals/trips/ 
2797.en.xml'; antPath is /**; matchedPath=true; matchedMethods=true
DEBUG - bstractSecurityInterceptor - Secure object: FilterInvocation:  
URL: /v1/rentals/trips/2797.en.xml; ConfigAttributes: [ROLE_SUPERVISOR]
DEBUG - ExceptionTranslationFilter - Authentication exception  
occurred; redirecting to authentication entry point
org.acegisecurity.AuthenticationCredentialsNotFoundException: An  
Authentication object was not found in the SecurityContext
         at  
org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFo 
und(AbstractSecurityInterceptor.java:339)
         at  
org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation 
(AbstractSecurityInterceptor.java:254)
         at  
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke 
(FilterSecurityInterceptor.java:104)
         at  
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter 
(FilterSecurityInterceptor.java:72)
         at org.acegisecurity.util.FilterChainProxy 
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
         at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter 
(ExceptionTranslationFilter.java:110)
         at org.acegisecurity.util.FilterChainProxy 
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
         at  
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter 
(BasicProcessingFilter.java:178)
         at org.acegisecurity.util.FilterChainProxy 
$VirtualFilterChain.doFilter(FilterChainProxy.java:274)






S'all good  ---   chriswberry@gmail.com




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message