Skip to main content
NextYou're reading unreleased docs. Features and APIs may change before release.View latestv1.1.x

Resource Sharing Across Organization Units

Resource sharing lets a resource that one organization unit owns be used by other organization units, without a separate copy in each of them. A sharing policy on the resource states which organization units it reaches.

How It Works​

Every resource belongs to one organization unit, its owner. The owner can always use the resource and needs no policy. A resource with no sharing policy is not shared with any other organization unit.

A sharing policy extends the resource to other organization units. It states up to three sections, and each section covers one group of organization units:

SectionReaches
allUnitsEvery organization unit in the deployment, including organization units created later.
childUnitsOrganization units beneath the organization unit that defines the policy, either all of them or the ones the policy names.
otherTreeRootsRoot organization units of other trees, either all of them or the ones the policy names.

The policy reaches everything its sections reach. These rules keep that reach unambiguous:

  • allUnits stands alone. A policy that states it cannot state childUnits or otherTreeRoots. Those two can be stated together.
  • A named organization unit sits directly beneath the organization unit that defines the policy. The policy says whether the resource stops at that organization unit or carries on to everything below it.
  • Another tree is reached at its root only, never at an organization unit below the root. The root of the owner's own tree is not another tree and cannot be reached.
  • A policy lists an organization unit only once.
  • A section that reaches a whole group can withhold organization units from it. An excluded organization unit takes everything beneath it out of reach as well.

The owner defines a policy by default. An organization unit the resource is shared with can define one too, sharing the resource onward to the organization units directly beneath itself. See Resharing.

When to Use This​

Sharing fits when several organization units need the same resource and one owner maintains it:

  • One definition serves many customer or partner organization units, so a change is made once.
  • The owner decides which organization units use the resource and can withdraw it from one of them without affecting the others.
  • A section that reaches a whole group also covers organization units created later.

A separate resource in each organization unit fits when each one needs its own independent configuration and ownership.

Sharing Policy in YAML​

A sharing policy is declared in the sharingPolicies list of the resource's declarative file. This policy shares the resource with every organization unit beneath its owner:

yaml
sharingPolicies:
- id: all-customers
childUnits:
mode: all

Policy Fields​

FieldRequiredDescription
idYesIdentifier of the policy. It stays the same across changes to the file.
initiatingOuIdNoOrganization unit that defines the policy. Defaults to the resource owner. See Resharing.
allUnitsNoReaches every organization unit in the deployment.
childUnitsNoReaches organization units beneath the organization unit that defines the policy, which is the owner by default.
otherTreeRootsNoReaches the root organization units of other trees.

A policy states at least one of the three sections.

A policy accepts only the fields listed on this page. A field it does not declare, such as a misspelled excludedOuIds, fails the resource file or the import instead of being ignored.

All Organization Units​

allUnits reaches every organization unit in the deployment, at any depth.

FieldRequiredDescription
excludedOuIdsNoOrganization units to withhold. See Exclusions.
overlayRulesNoTerms every organization unit reached holds the resource on. See Overlay Rules.
yaml
sharingPolicies:
- id: everyone
allUnits: {}

Child Organization Units​

childUnits reaches organization units beneath the organization unit that defines the policy. That is the owner, unless the policy sets initiatingOuId to reshare the resource onward.

FieldRequiredDescription
modeYesall or selected.
excludedOuIdsNoOrganization units to withhold. Valid with mode: all only. See Exclusions.
unitsWith mode: selectedOrganization units to reach. Valid with mode: selected only.
overlayRulesNoTerms every organization unit reached holds the resource on. Valid with mode: all only. See Overlay Rules.
modeReaches
allEverything beneath that organization unit, at any depth, including organization units created later.
selectedThe organization units listed under units.

Each entry under units takes these fields:

FieldRequiredDescription
ouIdYesAn organization unit directly beneath the organization unit that defines the policy. It is not resolved against the owner when the policy sets initiatingOuId.
reachYesunit reaches the named organization unit and nothing below it. subtree reaches the named organization unit and everything below it at any depth.
overlayRulesNoTerms this organization unit holds the resource on. See Overlay Rules.
yaml
sharingPolicies:
- id: named-customers
childUnits:
mode: selected
units:
- ouId: acme-customer-a
reach: unit
- ouId: acme-customer-b
reach: subtree

Roots of Other Trees​

otherTreeRoots reaches the root organization units of other trees.

FieldRequiredDescription
modeYesall or selected.
excludedOuIdsNoRoot organization units to withhold. Valid with mode: all only. See Exclusions.
unitsWith mode: selectedRoot organization units to reach. Valid with mode: selected only.
overlayRulesNoTerms every root organization unit reached holds the resource on. Valid with mode: all only. See Overlay Rules.
modeReaches
allThe root organization unit of every other tree, including trees created later.
selectedThe root organization units listed under units.

Each entry under units takes these fields:

FieldRequiredDescription
ouIdYesThe root organization unit of another tree.
overlayRulesNoTerms this root organization unit holds the resource on. See Overlay Rules.

This policy states both sections, so it reaches every organization unit beneath the owner and one root in another tree:

yaml
sharingPolicies:
- id: customers-and-partners
childUnits:
mode: all
otherTreeRoots:
mode: selected
units:
- ouId: partner-root

Overlay Rules​

Sharing says which organization units reach a resource. Overlay rules say on what terms. A rule governs one field of the resource and decides whether the organization unit that reaches it may write that field, and which values it may choose.

Which fields a resource exposes depends on the resource type. A flow exposes one field for each variable it declares, keyed variables.<identifier>, so a rule decides whether a reached organization unit may set that variable and which values it may choose. A user exposes one field, roles: the roles the share mandates for the user in a named child organization unit. See Mandate Roles on a Shared User. A resource server exposes one field, permissions: the permission strings of the resource server, compared as a hierarchy so that orders covers orders:read. A policy cannot set it yet, so an organization unit it reaches gets the whole resource server, with every resource and action it defines, and cannot choose its own permissions. A permissions rule may only state editable: false, which is the same as stating no rule. A rule that names a value or excludedValues is refused with RES-1038. The Management API refuses an editable rule or one with allowedValues with RES-1029. A resource file or an import reports the sharing framework's own code instead: SHR-1008 for an editable rule, and SHR-1011 for allowedValues on a fixed rule. A resource type that exposes no field takes no overlay rules.

Each rule takes these fields:

FieldRequiredDescription
editableYesWhether the organization unit may write the field.
valueNoWhat the organization unit starts with, or is pinned to when the field is not editable.
allowedValuesNoBounds what the organization unit may choose from. Omitted means the field's whole range.
excludedValuesNoSubtracted from both value and allowedValues, last.

Rules sit beside the organization units they apply to, so one policy can state different terms for different organization units:

PlacementApplies to
On allUnitsEvery organization unit reached.
On childUnits with mode: allEvery organization unit reached.
On an entry under childUnits.unitsThat organization unit alone.
On otherTreeRoots with mode: allEvery root organization unit reached.
On an entry under otherTreeRoots.unitsThat root organization unit alone.

A section with mode: selected states its rules per entry, not on the section.

Here a flow reaches every organization unit beneath its owner with one variable pinned, and one named customer may choose that variable from a list:

yaml
sharingPolicies:
- id: all-customers
childUnits:
mode: all
overlayRules:
variables.mfa-method:
editable: false
value:
- totp
- id: acme-customer-a
childUnits:
mode: selected
units:
- ouId: acme-customer-a
reach: unit
overlayRules:
variables.mfa-method:
editable: true
allowedValues:
- totp
- sms-otp

An organization unit that reshares the resource can only narrow the terms it was given. It cannot widen them for the organization units beneath it. See Resharing.

Exclusions​

excludedOuIds withholds organization units, and everything beneath them, from a section that reaches a whole group.

SectionCan exclude
allUnitsAny organization unit.
childUnits with mode: allOrganization units directly beneath the organization unit that defines the policy.
otherTreeRoots with mode: allRoot organization units.

A section with mode: selected takes no excludedOuIds. An organization unit is withheld there by leaving it out of units.

yaml
sharingPolicies:
- id: all-but-trials
childUnits:
mode: all
excludedOuIds:
- acme-trial-customers

Resharing​

An organization unit that receives a shared resource can share it onward, to the organization units beneath itself. This is resharing, and it is how a resource travels down a tree one step at a time: the owner decides who receives it, and each of those organization units decides who receives it next.

Set initiatingOuId to define a policy on behalf of an organization unit other than the owner. The resource then reaches the organization units beneath that one.

RuleDescription
Who can reshareAn organization unit the resource reaches on its own, without anything beneath it being reached: a child named with reach: unit, or a root reached through otherTreeRoots. An organization unit reached through mode: all, reach: subtree, or allUnits has nothing left to reshare, because the resource already reaches everything below it.
What the policy can statechildUnits only. allUnits and otherTreeRoots stay with the owner.
What childUnits reachesOrganization units beneath the organization unit that reshares, not beneath the owner. A named organization unit sits directly beneath it.
How many policiesOne for each organization unit on a resource.
Order in the fileThe file is read in order, so the policy that brings the resource to an organization unit comes before the policy that organization unit defines.

Here the owner shares the resource with acme-customer-a alone, and acme-customer-a reshares it to its own child:

yaml
sharingPolicies:
- id: owner-policy
childUnits:
mode: selected
units:
- ouId: acme-customer-a
reach: unit
- id: customer-a-policy
initiatingOuId: acme-customer-a
childUnits:
mode: selected
units:
- ouId: acme-customer-a-emea
reach: unit

Sharing Outside the Owner's Tree​

allUnits and otherTreeRoots reach outside the owner's own tree. An owner that is a root organization unit can always state them. An owner that has a parent can state them only when resource_sharing.allow_child_ou_cross_tree_sharing is true. See Resource Sharing Configuration.

Shared Resources in the Receiving Organization Unit​

An administrator whose token is confined to one organization unit, such as a Data Plane token that holds org or one of its child permissions, works with that organization unit only. The token names the organization unit in its ouId claim, and the Data Plane refuses such a token without one with 403 Forbidden. For users, agents, applications, roles, connections, flows, and resource servers, the organization unit sees both the resources it owns and the resources shared into it:

  • List: a list request with no ouId filter returns the resources the organization unit owns, followed by the resources shared into it. Each item carries isOwnedByOU, which is false for a shared item. A shared item is listed under the receiving organization unit's ouId. For users and agents, a list narrowed by another filter returns owned resources only. A list filtered to any other organization unit's ouId is empty.
  • Read: GET on a resource's ID returns a resource shared into the organization unit, under the receiving organization unit's ouId and with isOwnedByOU: false. A resource the organization unit owns returns isOwnedByOU: true. A shared flow returns its name, handle, type, and variables, not the whole definition.
  • Change and delete: only the owner can change or delete the resource. The receiving organization unit gets 403 Forbidden with the code for its resource type.
ResourceCode for a change or delete in the receiving organization unitWhat the receiving organization unit can change
UserUSR-1045Nothing. Roles a share mandates are set by the owner's policy.
AgentAGT-1027Nothing. Agents are shared through declarative files only.
ApplicationAPP-1070Nothing.
RoleROL-1045Assignments of the role in the organization unit, when the assignments overlay rule is editable.
ConnectionCON-1041Nothing.
FlowFLM-1039Flow variables through PUT /flows/{id}/variables, when the variables overlay rule allows it.
Resource serverThe general authorization codeNothing. It reads the resource server's resources and actions too.

A resource neither owned by nor shared into the organization unit returns 403 Forbidden with the general authorization code. This includes the resource servers of the organization units above it: the organization unit uses only the resource servers it owns or that are shared with it, so it reads only those.

In the Console, a resource shared into the organization unit opens read-only, with no delete action. To assign a shared role or set a shared flow's variables in the receiving organization unit, use the API.

Explore with AI

ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© Copyright Linux Foundation Europe.For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.