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

Fixed page and admin menu for Shibboleth auth #3011

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

mspalti
Copy link
Member

@mspalti mspalti commented May 5, 2024

Page content and admin menu weren't updating correctly after Shibboleth authentication. The change here forces the browser app to request fresh content after obtaining an auth token.

References

Description

Changes in 7.6.1 reintroduced the bugs reported in #1953 and #1665. This PR implements the original step of setting all of cached objects stale. Unfortunately, I was only able to test this on a production 7.6.1 instance but it should work with 8.0 as well.

Instructions for Reviewers

Testing with Shibboleth has become more difficult since https://samltest.id/ is no longer available. If anyone has a test instance running with Shib that would be a great help.

List of changes in this PR:

  • Updated the browser init service to call requestSerice.setStaleByHrefSubstring() directly rather than via the root data service (which has changed).

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added bug authentication: Shibboleth related to integration with Shibboleth 1 APPROVAL pull request only requires a single approval to merge port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels May 6, 2024
.yarn/install-state.gz Outdated Show resolved Hide resolved
Copy link

github-actions bot commented May 8, 2024

Hi @mspalti,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@mspalti
Copy link
Member Author

mspalti commented May 10, 2024

For the record, #2529 is the PR that modified RootDataService.invalidateRootCache() to call RequestService.setStaleByHref() and not RequestService.setStaleByHrefSubstring() as required by Shibboleth logins.

@tdonohue
Copy link
Member

@artlowel : Would you be able to review this change? It sounds like this PR is partially undoing a change applied in #2529 / #2510 , which you created to solve issues related to #2482. So, It might be worth you taking a look to see if there's any side effects in this PR.

@tdonohue tdonohue requested a review from artlowel May 10, 2024 16:05
@mspalti
Copy link
Member Author

mspalti commented May 28, 2024

Partial clarification. This PR is not undoing changes in #2529 or #2510. It's only updating #2187 to no longer call RootDataService invalidateRootCache() from the browser-init.service whenever external authentication is used.

@mspalti
Copy link
Member Author

mspalti commented Jul 25, 2024

@tdonohue it looks like this bugfix for Shibboleth didn't make it into the latest releases. Sorry I didn't realize this sooner. Seems like it should be prioritized for the next release. ?

@tdonohue tdonohue added the port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release label Jul 25, 2024
@tdonohue
Copy link
Member

@mspalti : Yes, this was not able to find a reviewer/tester in time for the 8.0 release. It has been moved to our 9.0 board... but, as a bug fix, it would be backported to 8.x (and hopefully 7.6.x, if not too difficult) if it was merged.

I've been waiting on feedback from @artlowel regarding this change (as the modification here is not specific to Shibboleth and may have side effects...and he knows this area of code best). I know he's currently on holiday though, so I don't know when he'd get back to this.

Regardless, this is still on our board of PRs to review. I've simply had problems finding additional reviewers/testers to ensure this small change doesn't impact other features.

Copy link
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mspalti!

Yes, this was an oversight of mine in #2529, thanks for fixing it

@tdonohue tdonohue added this to the 9.0 milestone Sep 5, 2024
@tdonohue tdonohue merged commit b5c00dd into DSpace:main Sep 5, 2024
13 checks passed
@dspace-bot
Copy link
Contributor

Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-7_x
git worktree add -d .worktree/backport-3011-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-3011-to-dspace-7_x
git switch --create backport-3011-to-dspace-7_x
git cherry-pick -x 4a236906eb6f487a9a475d70b808698dadb145f9

@dspace-bot
Copy link
Contributor

Successfully created backport PR for dspace-8_x:

@tdonohue tdonohue removed port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release labels Sep 5, 2024
@tdonohue
Copy link
Member

tdonohue commented Sep 5, 2024

Ported to 7.x in #3306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge authentication: Shibboleth related to integration with Shibboleth bug
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Export/import options missing from admin menu after shibboleth login
4 participants