Repository navigation
New link-level hint for authentication #43
Replies: 8 comments 5 replies
|
I am not sure how we would want to represent this but it may be prudent to consider this for OPDS item level auth. There is a function called WAYFless support. It is widely supported by various content hosts. In SAML federations the SP (Service Provider) application needs to find out where to send the end-users for authentication. This is called discovery, there are two ways to achieve it, and doing both is recommended: The term 'WAYFless' comes from the old Shibboleth term for discovery: Where Are You From, and how to avoid having the end user interact with it by supplying the federation identifier for the user's organization in the URL - e.g. https://sp.yourdomain.com/path?entity=https://idp.theirdomain.com/entity. This allows the Client (that has likely already authenticated) to pass to the content host provider (SP) who may serve content to more than one library running a Shibboleth server IDP (identity provider) |
|
Even with this approach, there's still one challenging use-case: the first feed in a catalog. To overcome this issue, I think that we could also use the same hint on the This would look almost the same as my example above, just with a different media type: A client would:
|
|
I'd like to add this new property to a revision of the current Authentication for OPDS draft. Based on experience, it solves a number of issues:
The first one is fairly straightforward to understand. For the second one, here are a few examples:
I'm tagging people who were not around at the time when this was first discussed cc @jonathangreen @tdilauro @barmintor @Apophenia |
|
I'm thinking about IIIF, which discusses in some ways the advertisement of degraded responses: |
|
Is the {
"metadata": {
"title": "Example listing publications"
},
"links": [
{
"rel": "self",
"href": "publication.json",
"type": "application/opds-publication+json"
}
],
"publications": [
{
"metadata": {
"@type": "http://schema.org/Book",
"title": "Moby-Dick",
"author": "Herman Melville",
"identifier": "urn:isbn:978031600000X",
"language": "en",
"modified": "2015-09-29T17:00:00Z"
},
"links": [
{
"rel": "self",
"href": "http://foo.org/publication.json",
"type": "application/opds-publication+json"
},
{
"rel": "http://opds-spec.org/acquisition",
"href": "http://bar.org/license-epub.lcpl",
"type": "application/vnd.readium.lcp.license.v1.0+json",
"properties": {
"authenticate": {
"href": "https://foo.org/authentication.json",
"type": "application/opds-authentication+json"
}
}
},
{
"rel": "http://opds-spec.org/acquisition",
"href": "http://baz.org/license-pdf.lcpl",
"type": "application/vnd.readium.lcp.license.v1.0+json",
"properties": {
"authenticate": {
"href": "https://foo.org/authentication.json",
"type": "application/opds-authentication+json"
}
}
}
]
}
]
} |
|
@jce1028 do you by any chance know of any SAML-authenticated OPDS feeds (Lyrasis, SImplyE?) that we could test in Thorium Reader (Desktop). We've recently updated the implementation and we are looking for more validation tests. Thank you! CC @panaC @mpdunlop could you please run some OPDS auth checks at your end with the latest Thorium build? The changes mostly affect OAuth flows (Implicit, etc.), you will see that Thorium now opens the user's default web browser to complete the auth flow (which may consist in username/password login with autofil from a password manager, as well as account creation, credentials reset, support contact, etc. which is why we've had to externalise the whole process, and give up on the original internal Electron BrowserWindow). @HadrienGardeur your insights / guidance / pointers would be most welcome! :) |
|
To add some context from Thorium Reader Desktop: we already reuse stored access tokens proactively for same-host OPDS HTTP GET requests. We do not wait for a In the current implementation, credentials are stored per host. Before sending a request, Thorium looks up the stored credentials using the requested URLβs host. This lookup is host-based rather than based on the Authentication Documentβs id. (see issue #83) For an already-authenticated same-host request, Thorium therefore avoids an initial unauthenticated request and can receive a personalized representation, even when an anonymous request would also return 200 OK. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In our current Authentication for OPDS draft, we define two different ways that a server can trigger an Authentication Flow:
401status code where the payload contains an Authentication DocumentLinkheader with the properrelandtypeOver the years, OPDS has struggled with two things related to authentication:
To cover both use cases, I'd like to propose the addition of a new link-level hint:
authenticate.This new property would provide two information to the client:
{ "rel": "self", "href": "publication.json", "type": "application/opds-publication+json", "properties": { "authenticate": { "href": "https://example.com/authentication.json", "type": "application/opds-authentication+json" } } }This new hint would be added to an updated version of the Authentication for OPDS draft.
Any thoughts/feedback on this? cc @leonardr @llemeurfr @danielweck
All reactions