Status Report says the following:

Services authentication mechanism has not been enabled for the following endpoints. Requests to these endpoints will always be anonymous.

The reason for this is the db check which says:

db_query('SELECT * FROM {services_endpoint} AS se WHERE se.authentication NOT LIKE :services', array(':services' => '%services%'));

Such that it picks up any entry where the authentication does not have the word services in it.

An empty authentication string looks like:

a:0:{}

where an authenticated endpoint auth string looks like:

a:1:{s:17:"services_testauth";s:17:"services_testauth";}

(yes i know it says services_, i was testing it)

AFAIK, there is no guideline/restriction that says authentication modules must include the word services and there should be a better test for this condition.

Having said that i have no good idea what that check should be :).

Possibly LIKE 'a:0:%' but i'm not sure short of retrieving every endpoint, parsing the object and checking it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kylebrowning’s picture

Status: Active » Closed (won't fix)

This requirement is simply to assure that the services authentication mechanism is turned on, not anything else. The reason for this is because Services requires sesssauth to be enabled or all requests will be anonymous, it does not however require that any authentication module be enabled. Basically, if you write your own authentication method, it should check for this, in its own install.

This requirement is just for services_sessauth.

coderintherye’s picture

Status: Closed (won't fix) » Active

This doesn't make any sense.

You are reporting an error where there is none.

Please explain how allowing all request to a service endpoint is an error. How does it break Drupal? How does it break the functionality of the module?

Is there a valid reason why, if I have setup an endpoint which only allows users to have read access to retrieve and index the endpoint, and that my endpoint is only returning nodes, which on my site are public resources viewable to all, that I should not allow access from all anonymous users?

Please use the right reporting, this is a WARNING status at most, there is absolutely no reason to return an error in the status reporting. This leads to a site reporting that it's completely broken, as in reports back via nagios, when it is fact not broken at all.

kylebrowning’s picture

You are absolutely right, I didnt pick up on this earlier.

Heres a patch that changes it to a warning and not an error.

kylebrowning’s picture

Status: Active » Needs review
coderintherye’s picture

Status: Needs review » Reviewed & tested by the community

Applies cleanly and fixes the issue. Thanks!

kylebrowning’s picture

Status: Reviewed & tested by the community » Fixed
kylebrowning’s picture

Status: Fixed » Closed (fixed)
MustangGB’s picture

Issue summary: View changes

@kylebrowning Could you clarify if this is still valid, I'm using oauth2_server which provides services authentication, but I still have this warning.

MustangGB’s picture

Status: Closed (fixed) » Needs review
FileSize
1.02 KB

So here's a patch then.

kylebrowning’s picture

Status: Needs review » Reviewed & tested by the community
markus_petrux’s picture

Works here as well. Thanks!

markus_petrux’s picture

FileSize
1.04 KB

Patch updated!

tyler.frankenstein’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.