Skip to content
Snippets Groups Projects

Prompt user to reload page when SAML SSO session has expired

Merged Eduardo Sanz García requested to merge eduardosanz/saml-modal into master

What does this MR do and why?

This change adds a modal in the group and project pages that prompts the user to reload the page if the SAML session has expired.

This is part #1. In part #2, we will dismiss the modal if the user has been re-authenticated in another window/tab.

EE: true

Related to: Inconsistent behavior for "resumed" SAML sessions (#419578 - closed)

Related to: Draft: Expire session from init (!138572 - closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Configure Group SAML for a group, for example Flights and sign in - GDK howto guide
  2. After 24 hours the modal will appear. To show the modal immediately use this patch:
diff --git a/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue b/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue
index 46832247d3a9..312a2f5afb9e 100644
--- a/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue
+++ b/ee/app/assets/javascripts/saml_sso/components/saml_reload_modal.vue
@@ -22,7 +22,7 @@ export default {
     };
   },
   async created() {
-    const session = await getExpiringSamlSession({ samlProviderId: this.samlProviderId });
+    const session = { timeRemaingMs: 1000 };
 
     if (session) {
       setTimeout(() => {
Edited by Eduardo Sanz García

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 2 Warnings
    :warning: 33c4a3dd: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines.
    :warning:

    featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.

    For more information, see:

    Reviewer roulette

    Category Reviewer Maintainer
    backend @panoskanell profile link current availability (UTC+3, 1 hour ahead of author) @fabiopitino profile link current availability (UTC+1, 1 hour behind author)
    frontend @apennells profile link current availability (UTC-4, 6 hours behind author) @iamphill profile link current availability (UTC+1, 1 hour behind author)
    groupauthentication Reviewer review is optional for groupauthentication @dblessing profile link current availability (UTC-5, 7 hours behind author)

    Please check reviewer's status!

    • available Reviewer is available!
    • unavailable Reviewer is unavailable!

    Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • added 1 commit

    • d1d25d00 - Poll SAML session status and prompt window reload

    Compare with previous version

  • mentioned in issue #419578 (closed)

  • added 1 commit

    • 170aa50b - Poll SAML session status and prompt window reload

    Compare with previous version

  • Eduardo Sanz García changed the description

    changed the description

  • Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits be5ad65d and 33c4a3dd

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    mainChunk 3.23 MB 3.31 MB +81.45 KB 2.5 %
    average 4.25 MB 4.32 MB +64.54 KB 1.5 %

    :tada: Significant Reduction: 271

    Expand
    Entrypoint / Name Size before Size after Diff Diff in percent
    pages.admin.application_settings.general 779.15 KB 702.71 KB -76.44 KB -9.8 %
    pages.groups.saml_providers 570.04 KB 493.61 KB -76.44 KB -13.4 %
    pages.groups.saml_providers.saml_members.store 570.05 KB 493.62 KB -76.44 KB -13.4 %
    pages.groups.sso 240.77 KB 164.34 KB -76.44 KB -31.7 %
    pages.admin.applications 84.59 KB 21.77 KB -62.82 KB -74.3 %
    pages.admin.impersonation_tokens 571.38 KB 508.56 KB -62.82 KB -11.0 %
    pages.admin.runners.index 1.02 MB 982.19 KB -62.82 KB -6.0 %
    pages.groups.runners.index 1004.12 KB 941.3 KB -62.82 KB -6.3 %
    pages.groups.settings.access_tokens 411.44 KB 348.62 KB -62.82 KB -15.3 %
    pages.groups.settings.applications 195.18 KB 132.36 KB -62.82 KB -32.2 %

    The table above is limited to 10 entries. Please look at the full report for more details


    Note: We do not have exact data for be5ad65d. So we have used data from: d1ac27a1.
    The target commit was too new, so we used the latest commit from master we have info on.
    It might help to rerun the bundle-size-review job
    This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

    Edited by Ghost User
  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for 33c4a3dd

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Govern      | 66     | 0      | 0       | 0     | 66    | ✅     |
    | Create      | 77     | 0      | 9       | 0     | 86    | ✅     |
    | Plan        | 51     | 0      | 2       | 0     | 53    | ✅     |
    | Data Stores | 31     | 0      | 0       | 0     | 31    | ✅     |
    | Package     | 24     | 0      | 6       | 0     | 30    | ✅     |
    | Manage      | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Verify      | 35     | 0      | 1       | 0     | 36    | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Monitor     | 7      | 0      | 0       | 0     | 7     | ✅     |
    | Release     | 5      | 0      | 0       | 0     | 5     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 298    | 0      | 19      | 0     | 317   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :white_check_mark: test report for 33c4a3dd

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Govern      | 272    | 0      | 19      | 1     | 291   | ✅     |
    | Create      | 152    | 0      | 21      | 2     | 173   | ✅     |
    | Package     | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Data Stores | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Plan        | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Monitor     | 8      | 0      | 0       | 0     | 8     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 444    | 0      | 42      | 3     | 486   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    Edited by Ghost User
  • Eduardo Sanz García changed milestone to %16.10

    changed milestone to %16.10

  • mentioned in merge request !138572 (closed)

  • Andrew Evans mentioned in merge request !146011 (merged)

    mentioned in merge request !146011 (merged)

  • 🤖 GitLab Bot 🤖 changed milestone to %16.11

    changed milestone to %16.11

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading