swissbib / vufind

A library resource discovery portal designed and developed for libraries by libraries
GNU General Public License v2.0
12 stars 7 forks source link

Kontomenü multi / single #18

Closed maechler closed 9 years ago

maechler commented 10 years ago

Die angezeigten Punkte im Kontomenü sind noch nicht für single und multi unterschieden, da die Zeit dafür nicht mehr gereicht hat resp. es mehrere Möglichkeiten zur Lösung gibt.

  1. Möglichkeit Das menu.phtml für die beiden Themes überschreiben. Nachteil wäre, dass 2 Templates gewartet werden müssten.
  2. Möglichkeit Mit einem eigenen Auth-Manager arbeiten. Damit hätte man nur ein Template zu warten. Es muss aber noch "erforscht" werden, wie das geht.
guenterh commented 10 years ago

Hier ein post an die VuFind Tech Liste, der primaär versucht, die Möglichkeiten der MultiAuth auszuloten. Zum Teil mit dieser user story verbunden:

Hi,

I'm just thinking about the possibilities how to use the various authentication methods provided by VuFind for our swissbib solution.

A short picture of the idea we have in mind: a) we provide Shibboleth as the general authentication method (for institutional users and guest users who can create their own account based on the Shibboleth mechanisms - a special implementation of our AAI) https://www.swissbib.ch/MyResearch/Home?lng=en b) swissbib provides the content of 8 library systems (Aleph, Virtua [and Alma in the future]) beside other repositories c) None of these library systems is 'Shibbolized' - means: no service provider in the Shibboleth sense. Authentication is only possible via username / password (ILS - Authentication in VuFind words)

The idea:

Some time ago I made a very first implementation (mostly based on configuration) for our test system. first step: a user is authenticated via Shibboleth and is able to select a library system he/she has an account http://sb-vf20.swissbib.unibas.ch/vfrd/pictures/shib.library.system.list.png second step: once a library system is selected the user has to provide username/password for the selected system http://sb-vf20.swissbib.unibas.ch/vfrd/pictures/shibboleth.librarysystems.2.png (sorry some labels are only in German for this testsystem - the functionality could be used live via https://test.swissbib.ch/MyResearch/Home) If the authentication against the library was successful the credentials could be stored in the VuFind database as part of the shibboleth account (columns user / password in the user table -at the moment only for one system possible) or as dependent user-accounts of the general shibboleth account).

I hoped a functionality similar like this would be possible with the MultiAuth method. Today I took a look into the code and my understanding was a combination of Shibboleth with MultiAuth isn't designed so far.

If I'm not wrong the other 'multi'-authentication methods are designed for other use cases: ChoiceAuth: Shibboleth and others side by side but not in a relation (not dependent) MultiILS: for a sequence of ILS systems but no combination of Shibboleth with ILS

I would be happy for some comments on the (weird??) ideas or hints for other possibilities.

Günter

p.s: We are on the way being more compatible with the VuFind core implementation (based on bootstrap3). The status of the current implementation is available at http://sb-vf20.swissbib.unibas.ch/vfrd/. Our hope: Less effort for our own code and being able to contribute on the VuFind core code.

guenterh commented 10 years ago

Antwort Demian Sorry if I'm missing or misunderstanding something, but what you are describing sounds fairly close to the default behavior of VuFind. VuFind normally uses two levels of authentication -- the first level logs the user into VuFind itself, and utilizes the Auth plug-ins. The second level logs the user into the ILS, and utilizes the ILS driver. In some cases, the first-level authentication can fill credentials into the database to automatically enable the second level. In other cases, the user is separately prompted to link ILS credentials to their VuFind account. All of this is tied to the cat_username / cat_password fields in the user table.

Your use case is a little different from the default simply because you have multiple ILSes in play, but you may be able to come up with a solution either by adjusting the database structure or by using the MultiBackend driver.

The limitations you mention for the current multi-authentication options are correct, but I don't think that matters for your situation. VuFind is already set up to prompt for missing ILS credentials when they are needed, so this doesn't need to be addressed at the first-level authentication stage. If you're only really using Shibboleth for authentication, I would expect the basic shib driver to do the job for you. Any customizations would happen later, in relation to the second-stage ILS authentication.

Am I missing the point, or does that make sense? Please let me know if you need help finding any of the relevant code.

guenterh commented 10 years ago

my response Hi Demian,

thanks for your hints - It seems I made a mess between MultiAuthentication and MultiBackend. Now I realized that MultiBackend (which I need) is the concept of the 2nd step and I made a small test with MultiBackend as the driver type in the Config Catalog section in conjunction with Shibboleth as the authentication method of the first step in the Authentication section - which works nice-

As you wrote, I have to think about how to process and store multiple ILS credentials. Currently I think it's a combination of extending the database structure (outside of the user table because I want to avoid a mix-up with VF-core) and MultiBackend driver. (close to your hint) Another dependency: I followed with interest the Authentication/Authorization discussion some time ago on this list.

Just another topic: Digging into the VF-code once again (unfortunately because of time pressure only infrequently) I saw a first implementation of David Maus using the WidgetInterface for facets. I remember the time just at the beginning of VF2 using the first (beta) versions of ZF2 with nice discussions between David and you about the pros and cons of various design decisions. (or your Blog posts about the first ZF2 steps). Does something similar take place for the current development? From my point of view it would be really helpful.

Best wishes from Basel!

Günter

guenterh commented 10 years ago

@maechler @nicokarrer Ich habe mir die Informationen aus dem Mail im Zusammenhang mit dieser user story durch den Kopf gehen lassen. Ich glaube nicht dass man das Problem über den Authentication wird lösen können. Warum - siehe attachement (die Klassenzusammenhänge ergeben sich aus dem Ablauf in VuFind\Controller\MyResearchController->checkedoutAction())

Aktuell sind die dendencies wie im grünen Teil oben. Was hier keinen Sinn macht ist, dass green durch die leere section catalog den Aleph-Driver aus config_base.ini von swissbib orange erbt womit die Connection (vom AuthManager erstellt) die Referenz auf Aleph erhält). Das führt nach meinem Verständnis dazu, dass wir im Template (wo es also nicht hingehört) Abfragen machen, in welcher view man sich befindet und damit Menuepunkte anzeigt oder nicht.

Dies sollte m.E. durch den verwendeten driver gesteuert werden. Dieser sollte dem template mitteilen, welche menuepunkte gerendert werden. Ich habe das mal mit dem NoILS driver ausprobiert (im template menu.phtml wird danach gefragt). Das könnte funktionieren. VuFind verwendet diesen driver jedoch in einem anderen Sinn, nämlich so, dass man sich in einem maintenance mode befindet (und damit entsprechende Hinweise auf der Oberfläche ausgibt - was wir nicht wollen) Sample als driver ist noch eine Möglichkeit. Laut Doku in der Config hat er aber eine für uns nicht brauchbare Mindestfunktionalität

Ich sehe folgende Weg (wie in den gelben Zusammenhängen auf dem Bild) Wir verwenden den VuFind MultiBackend Driver der einen default auf einen z.B. SwissbibNoILS Driver besitzt) Dieser SwissbibNoILS Driver steuert das Rendering der MenuePunkte in menue.phtml, dass die Kontenfunktionalität in swissbib green nicht angezeigt wird.

Werden wir in swissbib green ebenfalls den Zugriff auf (mehrere) Ausleihsysteme über shibboleth ermöglichen (was das Ziel ist), kann der MultiBackend driver neben dem Default auf weitere Systeme referenzieren. Diese steuern dann das Rendering der Menuepunkte.

overview authentication shibboleth

Was denkt Ihr?

guenterh commented 10 years ago

@maechler @nicokarrer dass ist dann mein letzter Post für heute...

Das Dumme an der Sache ist, dass ich Euch bei snowflake keine Shibboleth Infrastruktur hinstellen kann, so dass Ihr das bei Euch nachvollziehen könntet (und dementsprechend weiterentwicklen)

Wie wäre folgendes Vorgehen: Ihr schreibt Euch einen Shibboleth MockUp (autentication method shibbolethmock) und verwendet einen Dummy-User. Dieser brauch eigentlich gar nicht mal aus der Datenbank gelesen zu werden.

Mit diesem MockUp könntet Ihr dann eine ILS Connection vom Typ MultiBackend referenzieren und die entsprechende driver benutzen.

Für uns wäre das 'extrem' hilfreich: Ihr könntet uns bei der Entwicklung von Patron Funktionlaität in swissbib green unterstützen. Die Mechanismen hier sind dann gleich wie bei swissbib orange.

Wir müssen das morgen diskutieren. Abhängig vom Ausgang der Diskussion hat das für mich sehr hohe Priorität!

Günter

guenterh commented 10 years ago

Die user story sollte auf Basis von https://github.com/swissbib/vufind/commit/efc498f79e6a6faf514489cca62248bd9b634463 angegangen werden.

Zwei Zielrichtungen a) Umsetzung dieser user story

b) mittelfristig (bis Ende dieses Jahres)

guenterh commented 10 years ago

Warum benutze ich im Moment für Basel/Bern Multiauthentication und nicht ILS wie bisher? -> ILS unterstützt bisher nicht die Methode getLoginTargets, die ich im menu.phtml benötige um die vorhandenen targets mit Login Funktionalität abzufragen <? foreach ($this->auth()->getLoginTargets() as $target): ?>

Todo: enweder ILS erweitern oder?

Günter

guenterh commented 10 years ago

Beipiel für die Integration von mehreren Konten

screen n konten

nicokarrer commented 10 years ago

Konfiguration der Konten in den verschiedenen Installationen

für beide: config.ini:

[Authentication]
hash_passwords = true
encrypt_ils_password = true
ils_encryption_key = <your key>

[MultiAuth]
method_order   = ILS,Virtua
filters = "username:trim,password:trim"

[Catalog]
driver = MultiBackend

swissbib: config.ini

[Authentication]
...
method  =   shibbolethmock //oder vermutlich shibboleth

basel/bern: config.ini

[Authentication]
...
method  =   MultiILS

MultiBackend.ini

[Login]
drivers[] = Multi_IDSBB
;drivers[] = Multi_IDSBBSchool //für school
guenterh commented 9 years ago

steht im engen Zusammenhang mit https://github.com/vufind-org/vufind/commits/authorization

ich muss mir diesen branch unbedingt ansehen