Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

credentials for sesame remote_store_endpoint? #64

Closed
kgeographer opened this issue May 31, 2014 · 3 comments
Closed

credentials for sesame remote_store_endpoint? #64

kgeographer opened this issue May 31, 2014 · 3 comments
Labels

Comments

@kgeographer
Copy link

I have a Sesame 2.7.11 store I can access fine with Workbench and the Win2 client. The Win2 client respects permissions set in web.xml, so I can secure it. Can't run queries with arc2 though if any security is set. arc2 does work if I leave the store wide open.

How can I send BASIC authentication credentials? I see in ARC2_Reader.php an arc_reader_credentials array() and tried un-commenting and supplying a 'host' => 'user:pass' for the endpoint but I get 500 errors in the browser. Tried hard and failed to locate any other documentation.

any suggestions appreciated, thanks

@bnowack
Copy link
Collaborator

bnowack commented Jun 2, 2014

Hm, this should work... You could try accessing the endpoint with the reader directly in order to debug the authentication:

header("Content-type: text/plain; charset=utf-8");
$config = array(
    'http_accept_header' => 'Accept: */*',
    'arc_reader_credentials' => array(
        'ENDPOINT_HOST' => 'USER:PASS'
    )
);
$reader = ARC2::getComponent('Reader', $config);
$reader->activate('ENDPOINT_URL');

echo "\nformat:" . $reader->getFormat();

while ($data = $reader->readStream()) {
    echo $data;
}
$reader->closeStream();

print_r($reader->getErrors());

@kgeographer
Copy link
Author

I've found an immediate workaround via Jeen Broekstra in using Tomcat web.xml constraints to prevent write/delete calls made via REST. I can use Sesame workbench and windows client (which do recognize credentials) to manage the repositories.

Still, I'd feel better to harden it further, so I will give this a try soon.

thanks

@k00ni
Copy link
Collaborator

k00ni commented Jun 14, 2018

Hi @kgeographer, any news here? Issue seems solved to me.

@k00ni k00ni added question waiting for feedback Waiting for essential feedback of one of the parties in the conversation. labels Jun 14, 2018
@k00ni k00ni removed the waiting for feedback Waiting for essential feedback of one of the parties in the conversation. label Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants