Difference between revisions of "Carddavmate"

From ArchWiki
Jump to: navigation, search
(add break, but belongs in the section below anyway)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Networking]]
 
[[Category:Networking]]
 +
{{out of date}}
 +
 
[http://www.inf-it.com/ Carddavmate] is a carddav client that runs in a web browser using javascript. It is useful when you have a carddav server and want to access the contacts on this server with only a web browser.
 
[http://www.inf-it.com/ Carddavmate] is a carddav client that runs in a web browser using javascript. It is useful when you have a carddav server and want to access the contacts on this server with only a web browser.
  
Line 6: Line 8:
 
== Installation ==
 
== Installation ==
  
Install {{AUR|carddavmate}} from the [[AUR]]. After that, config.js needs to be configured, as well as httpd-carddavmate.conf. Then, httpd-carddavmate.conf needs to be included in the apache config, and apache needs to be restarted.
+
Install the {{AUR|carddavmate}} package.
 +
 
 +
After that, {{ic|config.js}} needs to be configured, as well as {{ic|httpd-carddavmate.conf}}. Then, {{ic|httpd-carddavmate.conf}} needs to be included in the [[Apache]] configuration, and Apache needs to be restarted.
  
 
== Configuration ==
 
== Configuration ==
Line 12: Line 16:
 
=== Password Protection ===
 
=== Password Protection ===
  
Password protection is implemented using apache's htpasswd facility. The relevant file that includes the authentification credentials is at /srv/http/carddavmate/htpasswd.
+
Password protection is implemented using apache's {{ic|htpasswd}} facility. The relevant file that includes the authentification credentials is at {{ic|/srv/http/carddavmate/htpasswd}}.
  
 
You may delete the file or remove the "test" account by deleting the line from the file.
 
You may delete the file or remove the "test" account by deleting the line from the file.
  
To add your own user, use this:
+
To add your own user, run:
  
$ sudo htpasswd /srv/http/carddavmate/htpasswd
+
# htpasswd /srv/http/carddavmate/htpasswd
  
add "-c" after htpasswd if you deleted the file "htpasswd".
+
add {{ic|-c}} after ''htpasswd'' if you deleted the {{ic|htpasswd}} file.
  
=== configuring the carddav server ===
+
=== Carddav server ===
  
add the carddav server to your config by editing /srv/http/carddavmate/config.js
+
Add the carddav server to your config by editing {{ic|/srv/http/carddavmate/config.js}}, for example:
  
An example is better than a thousand words, so here is an example that works for me:
+
var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/joe/', userAuth: {userName: 'joe', userPassword: 'secret', serverPassword: false}, timeOut: 14000}];
  
var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/joe/', userAuth: {userName: 'joe', userPassword: 'secret', serverPassword: false}, timeOut: 14000}];
+
A better example, without insecure user clear passwords:
  
=== configuring apache ===
+
var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/USER'}];
  
To "serve" the /srv/http/carddavmate directory properly, you need to include /etc/httpd/conf/extra/httpd-carddavmate.conf in your apache configuration. To do this, add the following line to /etc/httpd/conf/httpd.conf
+
=== Apache ===
  
Include conf/extra/httpd-carddavmate.conf
+
To "serve" the {{ic|/srv/http/carddavmate}} directory properly, include {{ic|/etc/httpd/conf/extra/httpd-carddavmate.conf}} in your apache configuration. To do this, add the following line to {{ic|/etc/httpd/conf/httpd.conf}}:
  
Also, you need to edit httpd-carddavmate.conf to reflect the url where carddavmate is installed. An example would be:
+
Include conf/extra/httpd-carddavmate.conf
  
Header always set Access-Control-Allow-Origin "https://carddavmate.example.com"
+
Also, edit {{ic|httpd-carddavmate.conf}} to reflect the url where carddavmate is installed, for example:
  
You can save this file and the restart apache by issuing
+
Header always set Access-Control-Allow-Origin "https://carddavmate.example.com"
  
$ sudo rc.d restart httpd
+
Save this file and [[restart]] Apache with {{ic|httpd.service}}.
  
 
=== Testing ===
 
=== Testing ===
  
To test your installation, browse to https://127.0.0.1/carddavmate and see if your carddav data shows up.
+
To test your installation, browse to {{ic|https://127.0.0.1/carddavmate}} and see if your carddav data shows up.
  
This was tested in chrome and worked fine, ymmv for firefox and others.
+
=== Security ===
  
=== Troubleshooting ===
+
Since the client is a javascript program that runs in your browser, the username/password that is configured in {{ic|config.js}} on the server is also in the browser and can be easily seen. To avoid issues, clear your browser cache to delete the compromising files after you are done.
  
Troubleshooting is best done using chrome's built-in javascript console
+
== Troubleshooting ==
 
+
=== Security ===
+
  
Since the client is a javascript program that runs in your browser, the username/password that is configured in config.js on the server is also in the browser and can be easily seen. To avoid issues, clear your browser cache to delete the compromising files after you are done.
+
Troubleshooting is best done using chrome's built-in javascript console.

Latest revision as of 15:14, 8 December 2015

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Carddavmate#)

Carddavmate is a carddav client that runs in a web browser using javascript. It is useful when you have a carddav server and want to access the contacts on this server with only a web browser.

This guide shows you how to install carddavmate to use with davical

Installation

Install the carddavmateAUR package.

After that, config.js needs to be configured, as well as httpd-carddavmate.conf. Then, httpd-carddavmate.conf needs to be included in the Apache configuration, and Apache needs to be restarted.

Configuration

Password Protection

Password protection is implemented using apache's htpasswd facility. The relevant file that includes the authentification credentials is at /srv/http/carddavmate/htpasswd.

You may delete the file or remove the "test" account by deleting the line from the file.

To add your own user, run:

# htpasswd /srv/http/carddavmate/htpasswd

add -c after htpasswd if you deleted the htpasswd file.

Carddav server

Add the carddav server to your config by editing /srv/http/carddavmate/config.js, for example:

var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/joe/', userAuth: {userName: 'joe', userPassword: 'secret', serverPassword: false}, timeOut: 14000}];

A better example, without insecure user clear passwords:

var globalSettings=[{href: 'https://carddav.example.com:443/caldav.php/USER'}];

Apache

To "serve" the /srv/http/carddavmate directory properly, include /etc/httpd/conf/extra/httpd-carddavmate.conf in your apache configuration. To do this, add the following line to /etc/httpd/conf/httpd.conf:

Include conf/extra/httpd-carddavmate.conf

Also, edit httpd-carddavmate.conf to reflect the url where carddavmate is installed, for example:

Header always set Access-Control-Allow-Origin "https://carddavmate.example.com"

Save this file and restart Apache with httpd.service.

Testing

To test your installation, browse to https://127.0.0.1/carddavmate and see if your carddav data shows up.

Security

Since the client is a javascript program that runs in your browser, the username/password that is configured in config.js on the server is also in the browser and can be easily seen. To avoid issues, clear your browser cache to delete the compromising files after you are done.

Troubleshooting

Troubleshooting is best done using chrome's built-in javascript console.