Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23214

User is logged out as result of role/policy changes (Memcache sessions)

    Details

      Description

      When using memcache-based session handler, changes to user roles/policies done through the admin siteaccess will cause the corresponding user to be logged out in the frontend.

      Steps to reproduce:
      1. On browser A, login to frontend with user a
      2. On browser B, login to admin interface.
        1. Assign a new role to user a, or modify one of the existing role by adding/removing policies

      Result: User A will be logged out.

      Config:

      framework:
          session:
              cookie_domain: .ezpublish.local
              save_path: %kernel.root_dir%/sessions
              handler_id: session.handler.memcache
       
      parameters:
          session_memcache_host: "127.0.0.1"
          session_memcache_port: 9001
          session_memcache_prefix: prefix_
          session_memcache_expire: 3600
       
      services:
          session.memcache:
              class: Memcache
              calls:
                   - [ addServer, [ %session_memcache_host%, %session_memcache_port% ]]
       
          session.handler.memcache:
              class: Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler
              arguments: [ @session.memcache, { prefix: %session_memcache_prefix%, expiretime: %session_memcache_expire% } ]
      

        Issue Links

          Activity

          Hide
          Rui Silva (Inactive) added a comment -

          In order for reproduce this, the following previous change has to be applied before the one for this issue:
          https://github.com/ezsystems/ezpublish-kernel-ee/commit/e3556f98c9a13f406d8fde0f8e59d87792fd9d81
          QA approved.

          Show
          Rui Silva (Inactive) added a comment - In order for reproduce this, the following previous change has to be applied before the one for this issue: https://github.com/ezsystems/ezpublish-kernel-ee/commit/e3556f98c9a13f406d8fde0f8e59d87792fd9d81 QA approved.
          Hide
          André Rømcke added a comment -
          Show
          André Rømcke added a comment - Ready for review: https://github.com/ezsystems/ezpublish-kernel-ee/pull/19
          Hide
          André Rømcke added a comment -

          This might have to be documented as a known issue in 5.1 as this was fixed in an additional feature added in 5.2 which was a small bc break in regards to settings:
          https://github.com/ezsystems/ezpublish-kernel/commit/5aa01c8b36d57eda808cd97b366fa0ab58cf03b9

          Feel free to attempt to do a backport as PR, and check if all tests pass, however it won't apply cleanly (just tested).

          Alternative here is to point the customer (but test this first) to how he can configure stash to add prefix to the stash cache, so it does not clear session cache as well. It is not documented, but by latests 0.2.x version of StashBundle as I think was used by 5.1, you have the following memcacheD options exposed: https://github.com/tedious/TedivmStashBundle/blob/v0.2.4/DependencyInjection/Configuration.php#L133

          Show
          André Rømcke added a comment - This might have to be documented as a known issue in 5.1 as this was fixed in an additional feature added in 5.2 which was a small bc break in regards to settings: https://github.com/ezsystems/ezpublish-kernel/commit/5aa01c8b36d57eda808cd97b366fa0ab58cf03b9 Feel free to attempt to do a backport as PR, and check if all tests pass, however it won't apply cleanly (just tested). Alternative here is to point the customer (but test this first) to how he can configure stash to add prefix to the stash cache, so it does not clear session cache as well. It is not documented, but by latests 0.2.x version of StashBundle as I think was used by 5.1, you have the following memcacheD options exposed: https://github.com/tedious/TedivmStashBundle/blob/v0.2.4/DependencyInjection/Configuration.php#L133

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Inacio (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 1 hour, 30 minutes
                2d 1h 30m