Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Tenant 1.0.0
    • Component/s: Extensions
    • Labels:
      None

      Description

      Adding support for proposal listed at
      https://cwiki.apache.org/SLING/multitenancy-support.html

        Activity

        Felix Meschberger made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Felix Meschberger added a comment -

        Tenant 1.0 has been released, hence closing issues now.

        Show
        Felix Meschberger added a comment - Tenant 1.0 has been released, hence closing issues now.
        Gavin made changes -
        Workflow re-open possible,doc-test-required [ 12787435 ] no-reopen-closed,doc-test-required [ 12790338 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12765504 ] re-open possible,doc-test-required [ 12787435 ]
        Gavin made changes -
        Workflow Copy of no-reopen-closed,doc-test-required [ 12762545 ] no-reopen-closed,doc-test-required [ 12765504 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12733227 ] Copy of no-reopen-closed,doc-test-required [ 12762545 ]
        Felix Meschberger made changes -
        Component/s Extensions [ 12312240 ]
        Component/s API [ 12311944 ]
        Component/s JCR [ 12311946 ]
        Hide
        Bertrand Delacretaz added a comment -

        Note that IIUC this is based on the thoughts at https://cwiki.apache.org/SLING/multitenancy-support.html

        Show
        Bertrand Delacretaz added a comment - Note that IIUC this is based on the thoughts at https://cwiki.apache.org/SLING/multitenancy-support.html
        Felix Meschberger made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s Tenant 1.0 [ 12323492 ]
        Resolution Fixed [ 1 ]
        Hide
        Felix Meschberger added a comment -

        I think this can be resolved for now.

        Show
        Felix Meschberger added a comment - I think this can be resolved for now.
        Felix Meschberger made changes -
        Affects Version/s API 2.2.4 [ 12317579 ]
        Hide
        Felix Meschberger added a comment -

        > this can be wrapped as IllegalArgumentException

        Good idea. Done in Rev. 1408176

        Show
        Felix Meschberger added a comment - > this can be wrapped as IllegalArgumentException Good idea. Done in Rev. 1408176
        Hide
        Amit Gupta added a comment -

        >I am not sure about the TenantProvider.getTenants(String filter): Should this throw the InvalidSyntaxException ? Somehow this does not feel right.
        Yes, this can be wrapped as IllegalArgumentException

        >To allow for the TenantAdapterFactory to make use of the tenant resolution without exposing implementation details through the API, the adapter factory is not a separate component but is created from the TenantProviderImpl and registered as a separate service. Maybe it would even make sense to combine them both in a single class.
        Yes, make sense
        >As for tenant administration: I suggest you create a Web Console plugin which allows to create, modify and remove tenants and maybe pluggable support to configure tenants on creation.
        okie, I will work on this.

        Show
        Amit Gupta added a comment - >I am not sure about the TenantProvider.getTenants(String filter): Should this throw the InvalidSyntaxException ? Somehow this does not feel right. Yes, this can be wrapped as IllegalArgumentException >To allow for the TenantAdapterFactory to make use of the tenant resolution without exposing implementation details through the API, the adapter factory is not a separate component but is created from the TenantProviderImpl and registered as a separate service. Maybe it would even make sense to combine them both in a single class. Yes, make sense >As for tenant administration: I suggest you create a Web Console plugin which allows to create, modify and remove tenants and maybe pluggable support to configure tenants on creation. okie, I will work on this.
        Hide
        Felix Meschberger added a comment - - edited

        Thanks for the patch. Basically looks good.

        I have applied it as extensions/tenant module in the contrib section in Rev. 1407672 with a few modifications:

        Moved the API to org.apache.sling.tenant and moved the implementation to org.apache.sling.tenant.impl

        Stripped down the API to not provide an addition method. For now the API only allows reading tenant information so we should not support creating tenants. I also removed the TenantProvider.getTenantByName method. I am not sure, whether this is really usefull.

        I am not sure about the TenantProvider.getTenants(String filter): Should this throw the InvalidSyntaxException ? Somehow this does not feel right.

        To allow for the TenantAdapterFactory to make use of the tenant resolution without exposing implementation details through the API, the adapter factory is not a separate component but is created from the TenantProviderImpl and registered as a separate service. Maybe it would even make sense to combine them both in a single class.

        As for tenant administration: I suggest you create a Web Console plugin which allows to create, modify and remove tenants and maybe pluggable support to configure tenants on creation.

        And added the new module to the contrib reactor in Rev. 1407677.

        Show
        Felix Meschberger added a comment - - edited Thanks for the patch. Basically looks good. I have applied it as extensions/tenant module in the contrib section in Rev. 1407672 with a few modifications: Moved the API to org.apache.sling.tenant and moved the implementation to org.apache.sling.tenant.impl Stripped down the API to not provide an addition method. For now the API only allows reading tenant information so we should not support creating tenants. I also removed the TenantProvider.getTenantByName method. I am not sure, whether this is really usefull. I am not sure about the TenantProvider.getTenants(String filter): Should this throw the InvalidSyntaxException ? Somehow this does not feel right. To allow for the TenantAdapterFactory to make use of the tenant resolution without exposing implementation details through the API, the adapter factory is not a separate component but is created from the TenantProviderImpl and registered as a separate service. Maybe it would even make sense to combine them both in a single class. As for tenant administration: I suggest you create a Web Console plugin which allows to create, modify and remove tenants and maybe pluggable support to configure tenants on creation. And added the new module to the contrib reactor in Rev. 1407677.
        Felix Meschberger made changes -
        Assignee Felix Meschberger [ fmeschbe ]
        Amit Gupta made changes -
        Field Original Value New Value
        Attachment org.apache.sling.tenant-0.0.1-SNAPSHOT-src.zip [ 12552826 ]
        Hide
        Amit Gupta added a comment -

        attaching source zip patch

        Show
        Amit Gupta added a comment - attaching source zip patch
        Hide
        Amit Gupta added a comment -

        A first cut implementation is available at
        https://github.com/amitxlnc/sling/compare/mt

        I have added Tenant and TenantProvider interfaces. and a basic implementation for JCR based TenantProvider.
        Also, I have added a JcrTenantAdapterFactory that can adapt ResourceResolver to a tenant, based on logged in user.

        TODO:

        • externalize the logic of identifying tenant based on logged in User.
        • Add support to resolve resource to a tenant, for use cases where there is no logged in user and execution is happening in some admin context. i.e. observation listener.

        With above basic support, we can later add support for new Tenant Aware JcrResourceResolver.

        Show
        Amit Gupta added a comment - A first cut implementation is available at https://github.com/amitxlnc/sling/compare/mt I have added Tenant and TenantProvider interfaces. and a basic implementation for JCR based TenantProvider. Also, I have added a JcrTenantAdapterFactory that can adapt ResourceResolver to a tenant, based on logged in user. TODO: externalize the logic of identifying tenant based on logged in User. Add support to resolve resource to a tenant, for use cases where there is no logged in user and execution is happening in some admin context. i.e. observation listener. With above basic support, we can later add support for new Tenant Aware JcrResourceResolver.
        Amit Gupta created issue -

          People

          • Assignee:
            Felix Meschberger
            Reporter:
            Amit Gupta
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 168h
              168h
              Remaining:
              Remaining Estimate - 168h
              168h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development