Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • O OS Core Common
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe SoftwareOpen Subsurface Data Universe Software
  • Platform
  • System
  • Lib
  • core
  • OS Core Common
  • Issues
  • #39
Closed
Open
Issue created Apr 14, 2021 by Rostislav Dublin (EPAM)@Rostislav_DublinMaintainer4 of 5 checklist items completed4/5 checklist items

ADR: Partion Service as a TenantInfo provider

Status

  • Proposed
  • Trialing
  • Under review
  • Approved
  • Retired

Context

Currently, CSPs have their own implementation of retrieving the TenantInfo data:

  1. AWS. https://community.opengroup.org/osdu/platform/system/lib/cloud/aws/os-core-lib-aws/-/blob/master/src/main/java/org/opengroup/osdu/core/aws/multitenancy/TenantFactory.java
  2. Azure. https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/blob/master/src/main/java/org/opengroup/osdu/azure/multitenancy/TenantFactoryImpl.java
  3. IBM. https://community.opengroup.org/osdu/platform/system/lib/cloud/ibm/os-core-lib-ibm/-/blob/master/src/main/java/org/opengroup/osdu/core/ibm/multitenancy/TenantFactory.java

All implementations follow a similar way to retrieve the TenantInfo from the Partition service (request partition service->map to TenantInfo class; calls to the Partition service are cached).

Scope

Implement a common approach to retrieve the TenantInfo data and use it across all services.

Decision

Unify an approach of retrieving TenantInfo and using it across all services:

  • Implement a common tenant factory (ITenantFactory) on the core-lib level.
  • Remove CSP-specific implementations of the TenantFactory.
  • Some CSPs will require to restructure a code and implement missing interfaces (in fact, the code is already there):
  • IBM should implement IServiceAccountJwtClient explicitly. There is already a similar method in the TenantFactory implementation.

Outcome of the Decision (added by @rostislav.dublin on May 24):

  1. A single common implementation of PartitionTenantInfoFactory in os-core-common. It just lies here and does not inject anywhere. See it in the MR 73 ;

  2. Each CSP injects the above single common implementation in its CSP library, removing its own implementation. Everyone moves at their own pace, no one rushes anyone. E.g. GCP uses AbstractFactoryBean as shown here.

Rationale

This change unifies an approach of retrieving tenant information, which is used to separate tenants from each other (multitenancy). With the increased maintainability of the code, OSDU will have a unified basic data to implement multitenancy

Consequences

Simplified CSP-specific code and code generalization (higher maintainability and reusability).

Edited May 24, 2021 by Chris Zhang
Assignee
Assign to
Time tracking