Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6461

Merge all security related validators into a single hook

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.5, 1.8.0
    • core, security
    • None

    Description

      I'd like to see if it's feasible to merge all security related validators into a single hook, instead of a hook per SecurityConfiguration.
      Pros

      • all validators will be merged into a single hook, meaning processing will happen via a single diff over the content
        Cons
      • order of hooks will change, there will be commit hooks first, all aggregated validators next and post validation hooks last. I don't think there's any issue with validation itself as all data added by the hooks will be visible to the composite validator.

      This is how the chaining looks like in the current setup:

          EditorHook : 
              (TokenValidatorProvider),
          VersionablePathHook, 
          EditorHook : 
              (CompositeEditorProvider : ([
                  PermissionStoreValidatorProvider, 
                  PermissionValidatorProvider, 
                  AccessControlValidatorProvider])), 
          EditorHook : 
              (PrivilegeValidatorProvider), 
      
          EditorHook : 
              (CompositeEditorProvider : ([
                  UserValidatorProvider,
                  CacheValidatorProvider])),
          PermissionHook, 
          JcrAllCommitHook
      

      If we merged them, this is the result:

          VersionablePathHook, 
          EditorHook : 
              (CompositeEditorProvider : ([
                  PermissionStoreValidatorProvider,
                  PermissionValidatorProvider,
                  AccessControlValidatorProvider, 
                  UserValidatorProvider,
                  CacheValidatorProvider, 
                  PrivilegeValidatorProvider,
                  TokenValidatorProvider])),
          PermissionHook, 
          JcrAllCommitHook
      

      Attachments

        1. OAK-6461.patch
          1 kB
          Alex Deparvu

        Activity

          People

            stillalex Alex Deparvu
            stillalex Alex Deparvu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: