Bug 342762 - cannot add Ampache server
Summary: cannot add Ampache server
Status: RESOLVED NOT A BUG
Alias: None
Product: amarok
Classification: Applications
Component: Services/Ampache (show other bugs)
Version: 2.8.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: 2.9
Assignee: Amarok Developers
URL: https://git.reviewboard.kde.org/r/121...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-12 10:04 UTC by Silver Salonen
Modified: 2015-01-12 19:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silver Salonen 2015-01-12 10:04:25 UTC
Ampache server is version 3.7.0 on openSUSE 13.2. I've set it to use authentication and added some folders as collections. I've also created myself a user that I can login to it fine.

Reproducible: Always

Steps to Reproduce:
1. Add new server under Ampache plugin (with authentication)
2. Click Check Connection

Actual Results:  
Plugin prompts: Unauthorized access attempt to API - ACL Error
In Ampache log the following error appears: (Access Denied) -> Unauthorized access attempt to API

Expected Results:  
Ampache server should be added.
Comment 1 Myriam Schweingruber 2015-01-12 14:08:22 UTC
WIP, there already is a patch in review to get this fixed: https://git.reviewboard.kde.org/r/121962/

Would be nice if you could test current git with this patch.
Comment 2 Luca Beltrame 2015-01-12 14:21:15 UTC
Reporter, you are on openSUSE: if you add Amarok from the KDE:Extra repository, the patch is included (I added it myself). Can you install it from there and see if it works? (It works for me here)
Comment 3 Silver Salonen 2015-01-12 15:20:52 UTC
Installed 2.8.0-24.1 from repositories/KDE:/Extra/openSUSE_13.2/ - I still get the same error.
Comment 4 Luca Beltrame 2015-01-12 15:42:36 UTC
This is another error, now that I look at it, an ACL error. Did you configure your Ampache server to allow access to the XML/RPC API? By default, it is not permitted.

See https://github.com/ampache/ampache/wiki/API for how to do so, then try again.
Comment 5 Luca Beltrame 2015-01-12 15:44:41 UTC
Sorry, I pasted the wrong link. Look at https://github.com/ampache/ampache/wiki/ACL and add an ACL for XMLRPC.
Comment 6 Luca Beltrame 2015-01-12 15:46:44 UTC
Boy, the Ampache documentation surely is confusing.... this is probably the best link: https://github.com/ampache/ampache/wiki/API-RPC
Comment 7 Silver Salonen 2015-01-12 19:07:33 UTC
This is confusing indeed :)

What do I need to add the ACL for then? There's already ACL added for interface and streaming by default:
DEFAULTv4	0.0.0.0	255.255.255.255	All	All	Web Interface
DEFAULTv4	0.0.0.0	255.255.255.255	All	All	Stream Access

API-RPC looks like it's for tying it together with another Ampache server or something? Or what should the entries be for accessing it from any Amarok?
API-RPC %Remote Servername%		Read/Write	%User Account%	API-RPC	"Remote Server Ip"	"Remote Server Ip"
Comment 8 Luca Beltrame 2015-01-12 19:25:18 UTC
In data lunedì 12 gennaio 2015 19:07:33, hai scritto:

> API-RPC looks like it's for tying it together with another Ampache server or
> something? Or what should the entries be for accessing it from any Amarok?

You need to set an ACL for API-RPC at least for read-write from 0.0.0.0 to 
255.255.255.255 (if you want to allow access from anywhere, otherwise set the 
ranges acordingly). It is *required* to be able to use Amarok with Ampache.

This probably needs to be documented, but it is not related to the bug 
mentioned in the RR (which you would have hit after setting the right ACL).
Comment 9 Silver Salonen 2015-01-12 19:42:14 UTC
OK, thanks. Added the following entry and I can now connect OK.

Any	0.0.0.0	255.255.255.255	Read/Write	All	API/RPC
Comment 10 Luca Beltrame 2015-01-12 19:50:49 UTC
In data lunedì 12 gennaio 2015 19:42:14, hai scritto:

> OK, thanks. Added the following entry and I can now connect OK.
> Any    0.0.0.0    255.255.255.255    Read/Write    All    API/RPC

Notice that without the patch (the one on reviewboard ) you have in the 
package you will *not* be able to connect, so bear that in mind.