samvera / ldp

Linked Data Platform.rb client
Other
16 stars 15 forks source link

Ldp::HttpError (STATUS: 401 #36

Closed lasse-aagren closed 8 years ago

lasse-aagren commented 9 years ago

Hello,

We are trying to acces fedora 4.0.0 (stable) using Hydra (tag: v9.0.0.rc2), which uses LDP version 0.2.0. And get the error below.

We are using this fedora deployed to tomcat 7.0.56 with fedoraAdmin defined in tomcat-users.xml:

https://github.com/fcrepo4-labs/fcrepo-webapp-plus/releases/download/fcrepo-webapp-plus-4.0.0/fcrepo-webapp-plus-rbacl-4.0.0.war

Could that be a problem with LDP?

See all version of our gems here:

https://github.com/dtulibrary/missingstuff/blob/master/Gemfile.lock

Error (sorry for the ugly paste):

Ldp::HttpError (STATUS: 401 Apache Tomcat/7.0.56 (Debian) - Error report

HTTP Status 401 -


type Status report

message< /b>

description This request requires HTTP authentication.


Apache Tomcat/7.0.56 (Debian)

... #<Faraday::Response:0x0000000 7df3610 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:get @body="Apache Tomcat/7.0.56 (Debian) - Error report

HTTP Status 401 -

<HR size=\"1\" noshade=\"nosha de\">

type Status report

message

description This request requires HTTP authentication.

<HR size=\"1\" noshade=\"noshade\">

Apache Tomcat/7.0.56 (Debi an)

" @url=#<URI::HTTP:0x00000007d94ca0 URL:http://localhost:8080/fedora/rest> @request=#<Faraday::RequestOptions (empty)> @request_headers={"User-Agent"=>"Faraday v0.9.0", "Prefer"=>"retu rn=representation"} @ssl=#<Faraday::SSLOptions (empty)> @response_headers={"server"=>"Apache-Coyote/1.1", "cache-control"=>"private", "expires"=>"Thu, 01 Jan 1970 01:00:00 CET", "www-authenticate"=>"Basic r ealm=\"fcrepo\"", "content-type"=>"text/html;charset=utf-8", "content-language"=>"en", "content-length"=>"969", "date"=>"Fri, 16 Jan 2015 11:10:56 GMT", "connection"=>"close"} @status=401>>):

lasse-aagren commented 9 years ago

our fedora.yml looks like this:

unstable: user: fedoraAdmin password: xxxxxxxxxxxxx url: http:/localhost:8080/fedora/rest base_path: ""

jcoyne commented 9 years ago

I'm not sure the username and password are supported yet. That may be the problem.

On Fri, Jan 16, 2015 at 5:52 AM, Lasse Aagren notifications@github.com wrote:

our fedora.yml looks like this:

unstable: user: fedoraAdmin password: xxxxxxxxxxxxx url: http:/localhost:8080/fedora/rest base_path: ""

— Reply to this email directly or view it on GitHub https://github.com/cbeer/ldp/issues/36#issuecomment-70243494.

lasse-aagren commented 9 years ago

Ok, so the short term solution for us, could be to deploy fedora without authentication.

And the long term, for us to fix LDP :)

lasse-aagren commented 9 years ago

@jcoyne just to point me in the right direction:

active_fedora uses ldp to connect to fedora4, but ldp doesn't support username/password yet. So changes in ldp are needed. Not active_fedora, right?

jcoyne commented 9 years ago

I don't know. Changes may be required in both places. It makes sense to start with LDP though.

lasse-aagren commented 9 years ago

changes to both were required:

https://github.com/cbeer/ldp/pull/37

no-reply commented 8 years ago

Closing this as resolved by #37.

Feel free to reopen if that's incorrect.