Skip to main content

Networks

We've introduced the context network to break out data in accordance with your organization structure. Network allows the definition of network, subnetwork, domain, subproperty. Network will be used to define access controls in a future iteration of the Spiny app. You will be able to define a user or group of users as having access to specific values in the network context. While network and channel may seem somewhat similar the access control capability is a key difference between these two contexts. Additionally network is intended to define the child/parent relationships between various portions of a site while channels merely breaks down the content topics itself. All fields except the automatically parsed domain are optional and in some cases the Spiny team may take the liberty of defining the network value too.

info

Generally the implementation of Orion only needs to be concerned with specifying subproperty in cases where you would like to break out data and access permissions across various parts of your domain. network and subnetwork will be statically set in your bundle configurations while domain will be automatically parsed at runtime.

How access permissions will work

Please refer to the table below for an example of defined data and how network scopes applies to this data and how it generally will work.

indexdatanetworksubnetworkdomainsubproperty
1{...contextData, ...eventData}federationcommerceds9.commedical
2{...contextData, ...eventData}federationexplorationenterprise.com
3{...contextData, ...eventData}federationexplorationdiscovery.commedical
4{...contextData, ...eventData}klingon_empirewarbortas.comengineering

Above you will see 3 different examples for the Network schema to be passed on those various sites. Now let's take the following set of users in the Spiny App:

nameroleroleNetworkScope
JulianDoctorfederation/commerce/ds9.com/medical
HughDoctorfederation/exploration/discovery.com/medical
Jean-LucAdmiralfederation
KathrynVice Admiralfederation/exploration

These users only have access to the data within their roleNetworkScope. Cross referencing the table of data the following statements are true:

  • Jean-Luc has access to 1, 2, and 3
    • Network scoped to federation Jean-Luc has unconditional access to all subnetworks, domains, and subproperties
  • Kathryn has access to 2 and 3
    • Subnetwork scoped to federation/exploration Kathryn has access to the domains discovery.com and discovery.com and all other domains under the subnetwork exploration
  • Julian has access to 3
    • Subproperty scoped to federation/commerce/ds9.com/medical Julian has one of the most specific scopes at the subproperty level meaning he can only see the data of the medical subproperty under ds9.com
  • Hugh has access to 1
    • Similar to Julian; Hugh is subproperty scoped to federation/exploration/discovery.com/medical meaning he can only see data under the medical subproperty of discovery.com

Hopefully this clears up the how Spiny leverages this Network schema but if you do still have questions please don't hesitate to reach out and ask.

Fields

network

The most top level designation above the domain. In the case of Google this would be Alphabet. In the case of Alexa this would be Amazon.

subnetwork

Subnetworks usually only exist at an enterprise level but can be used to designate teams that work across multiple domains.

domain

Domain is automatically parsed by Orion and should never be updated unless absolutely necessary. This value will be the domain not including any subdomain if present.

subproperty

Subproperty can usually be rellocated to two values either the proper designation of the subdomain if you divide your site content by subdomains or if there is a more top level designation that site content is divided on subproperty can be this value.

Implementation

note

If you haven't yet implemented Orion you can save this step for once you've implemented Orion.

As mentioned earlier; all values under network are optional. domain will be automatically parsed and applied by the Orion library.

network and subnetwork can be statically defined for bundles by the Spiny team and if you would like to set these to static designations please let the Spiny team know via email or slack.

Since bundles are defined at the domain level the only value that needs to be set manually in your site implementation is the subproperty value if you choose to set one. You can define any network property like so below:

orion.queue.push(function(){
orion.init({
// ... Implementation config
context: {
// ... Other context values
network: {
network: "galacticfederation", // The network ID representing the current network (Galactic Federation)
subnetwork: "earthdivision", // The subnetwork representing the Earth division within the Galactic Federation
domain: "spaceshipacademy.com", // The domain representing the current site (Spaceship Academy)
subproperty: null // The subproperty representing a subdomain or separate entity (no value)
},
}
})
})