Ticket #29 (closed Defect: Fixed)

Opened 11 months ago

Last modified 10 months ago

Database backend - fetch a document

Reported by: Reinhold Owned by: mircea
Priority: Minor Milestone:
Component: XCAP protocol Version:
Severity: Non-critical Keywords:
Cc:

Description

Hi!

I try to access a document using an ordinary web-browser. OpenXCAP queries the subscriber table for authentication but I cannot see any query for a document nor an error message. I have no clue what I'm doing wrong. Thanks a lot for your help.

Change History

  Changed 11 months ago by ruud

You can see no entry about it in the log? This usually means that the authentication has failed. You could confirm this by somehow inspecting the HTTP response code.

  Changed 10 months ago by Reinhold

Hi,

The authentication seems ok. In the query logs I see the query for the subscriber table but nothing else. I attach my config file and the http log.

config

; ; Configuration file for OpenXCAP ;

[Server]

; IP address and port to listen for requests ; 0.0.0.0 means any address of this host address = 0.0.0.0 port = 8000 ; The XCAP Root URI; must not contain any port number. If it has the 'https' scheme, ; the server will listen for requests in TLS mode. root = http://ps01/ ; The backend to be used for storage and authentication. Current supported ; values are Database and OpenSER. backend = Database ; Validate XCAP documents against XML schemas, default is Yes document_validation = No

[Authentication]

; The HTTP authentication type, this can be either 'basic' or 'digest'. ; If you're using TLS, it's better to choose 'basic' because the data is encrypted anyway. type = basic ; Specify if the passwords are stored as plain text - Yes ; or in a hashed format MD5('username:domain:password') - No cleartext_passwords = Yes ; The default authentication realm default_realm = ibkt.tuwien.ac.at ; A list of trusted peers from where XCAP requests are accepted without HTTP authentication ; e.g. trusted_peers = 10.0.0.0/24, 192.168.0.1 trusted_peers =

[TLS]

; Location of X509 certificate and private key that identify this server. The path is ; relative to /etc/openxcap, or it can be given as an absolute path. ; Server X509 certificate certificate = tls/server.crt ; Server X509 private key private_key = tls/server.key

[Database]

; Configuration settings for Database backend, active if this backend was selected ; in the [Server] section ; The database connection URI for the datase with subscriber accounts authentication_db_uri = mysql://openser:openserrw@localhost/openser ; The database connection URI for the database that stores the XCAP documents storage_db_uri = mysql://openser:openserrw@localhost/xcap_storage ;storage_db_uri = mysql://openser:openserrw@localhost/openser ; Authentication and storage tables subscriber_table = subscriber xcap_table = xcap_xml

[OpenSER]

; Configuration settings for OpenSER backend, active if this backend was selected ; in the [Server] section ; The database connection URI for the datase with subscriber accounts authentication_db_uri = mysql://username:password@db-host/openser ; The database connection URI for the database that stores the XCAP documents storage_db_uri = mysql://username:password@db-host/openser ; Authentication and storage tables subscriber_table = subscriber xcap_table = xcap_xml ; The address and port where the XMLRPC Management Interface of OpenSER is listening xmlrpc_url = http://localhost:8080

HTTP Log

GET /rls-services/users/alice/index HTTP/1.1 Host: ps01:8000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive

HTTP/1.1 401 Unauthorized Date: Wed, 09 Jan 2008 14:30:10 GMT Content-Length: 141 Content-Type: text/html WWW-Authenticate: basic realm="ibkt.tuwien.ac.at" Server: OpenXCAP/0.9.7

<html><head><title>Unauthorized</title></head><body><h1>Unauthorized</h1><p>You are not authorized to access this resource.</p></body></html>

GET /rls-services/users/alice/index HTTP/1.1 Host: ps01:8000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Authorization: Basic YWxpY2U6YWxpY2U=

HTTP/1.1 404 Not Found Date: Wed, 09 Jan 2008 14:30:13 GMT Content-Length: 0 Server: OpenXCAP/0.9.7

follow-ups: ↓ 4 ↓ 5   Changed 10 months ago by ruud

The rls-services application is not supported (yet).

in reply to: ↑ 3   Changed 10 months ago by Reinhold

Replying to ruud:

The rls-services application is not supported (yet).

Thank you! That caused all my troubles. I read over "in development" when I looked at the list of supported XCAP applications. When do you expect to support this application?

in reply to: ↑ 3   Changed 10 months ago by Reinhold

Replying to ruud:

The rls-services application is not supported (yet).

Thank you for your help! But still I didn't manage to fetch a document because I get a TypeError. This topic was already raised on the OpenSER mailing list some time ago but unfortunately no answer was given. I highly appreciate any hint. Thx!

exceptions.TypeError: ('Could not adapt', array('c', '<?xml version="1.0" encoding="UTF-8"?>\r\n<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r\n<list name="oma_buddylist">\r\n<entry uri="sip:alice@ex.org">\r\n<display-name>Alice Andersen</display-name>\r\n</entry>\r\n<entry uri="sip:bob@ex.org">\r\n<display-name>Bob Boss</display-name>\r\n</entry>\r\n</list>\r\n</resource-lists>'), <InterfaceClass twisted.web2.stream.IByteStream>)

  Changed 10 months ago by mircea

  • owner changed from Mircea Amarascu to mircea
  • status changed from new to accepted

Hi,

This issue was addressed in this ticket: http://openxcap.org/ticket/18

  Changed 10 months ago by mircea

  • status changed from accepted to closed
  • resolution changed from To be investigated to Fixed
Note: See TracTickets for help on using tickets.