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
add pin-based security for doc requests #262
Conversation
|
Also related to: #192 |
|
This is almost "looks good to me".
BUT
|
|
Yeah, if Session::Token is an issue it should be removed, and instead be listed as an EPrints dependency. I wasn't able to fully test that, since I already have it installed too. (Feel free to send a PR to our branch if you know of a simple fix) |
|
I haven't checked it out but EPrints must be generating tokens for sessions somehow; perhaps the Session::Token dependency could be replaced with whatever that is? |
|
John (jesusbagpuss) and I were just asking that same question. The "code" param for the token used by the current Request::Repond does this to generate a random string: my @A = (); This is what DataObj::LoginTicket does: sub _code I suspect that Session::Token does a more robust job than both of these (?), but if those other methods suffice then we would avoid the need to create a dependency. Better would be to abstract the Token generation (EPrints::Utils perhaps?) and have it done conditionally so that if someone has Session::Token installed Eprints will use that. Otherwise use one of those first-principle methods. |
Still invoke it if available, otherwise fall back to regular rand()-based token generation
|
I updated the PR using Request::Respond's code; if accepted we could update Request::Respond to use the new method in EPrints::Utils too, to keep things DRY. Maybe even DataObj::LoginTicket. |
|
Dear all, this is a great functionality. There is a specific motivation why it has not been merged yet? |
|
Glad to see this finally went in! |
When configured (see
cfg.d/request_copy.pl), this security model allows authors to respond to copy requests without having a valid login.The pin-based model allows the contact author to respond whether they have an EPrints account associated with the specified email address or not. The normal repository authentication mechanism is not used, instead the presence of a random pin in the querystring identifies the contact author and grants access.
The text was updated successfully, but these errors were encountered: