Bug 31990

Summary: Shibboleth may redirect to OPAC if staff interface and OPAC are served on same hostname.
Product: Koha Reporter: Björn Nylén <bjorn.nylen>
Component: AuthenticationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dpavlin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Björn Nylén 2022-10-26 13:53:26 UTC
The issue seems to be caused by the session interface being stuck to 'opac' if you serve both intranet and opac on the same hostname (different ports) and you visit the opac page before trying to log into intranet. 

Using the same hostname will result in opac and intranet using the same session cookie, ie same session which may confuse things.

Repoducable in koha testing docker:
1. Enable shibboleth in koha-conf.xml and add a stub configuration
   <shibboleth>
       <matchpoint>userid</matchpoint> <!-- koha borrower field to match upon -->
       <mapping>
           <userid is="eduPersonID"></userid> <!-- koha borrower field to shibboleth attribute mapping -->
       </mapping>
   </shibboleth>

2. Resatart everything
3. Visit opac
4. Visit staff. The shib-login link will be to the opac url.

Visiting staff before opac will not do the opposite though.
Issue arised when we upgraded to 22.05.

Possibly a side effect of Bug 29915 or Bug 29914? Not familiar enough to actually say.