-
Notifications
You must be signed in to change notification settings - Fork 18
Setup: Tenant Configuration
For each tenant a new configuration Section must be added containing specific configuration for the boarded tenant. This configuration needs to be added in Azure App Configuration. A new configuration Section called Tenant
must be added and with this section configurations for all tenants need to be added. For a tenant with name 'Demo Partner' add a section called 'DEMO_PARTNER' (replace space with '_' and convert to upper case) under the Tenant
section with the following JSON (sample JSON)
{
"Name": "Demo Partner",
"ShortName": "Demo",
"Authorization": {
"Administrators": "<<Comma-separated list of AAD Application IDs having admin access on this tenant>>",
"SenderAppName": "Experimentation:Flighting:API",
"Type": "<<Type of authorization allowed. Currently only 'Configuration' type is allowed>>"
},
"BusinessRuleEngine": {
"CacheDuration": "<<Duration (in mins) to cache the Rule Engine JSON files>>",
"Enabled": "<<Rules Engine filter is enabled when set to true. Values - true | false>>",
"Storage": {
"ContainerName": "<<Name of the blob container with the Rule Engine JSON files>>",
"StorageConnectionStringKey": "<<Secret key in Key Vault containing the connection string of the Storage Account having Rule Engine JSON files>>"
}
},
"Evaluation": {
"AddDisabledContext": "<<Enables or disabled the disabled context. Values - true | false>>",
"AddEnabledContext": "<<Enables or disabled the enabled context. Values - true | false>>",
"IgnoreException": "<<Will evaluate the feature toggle to false for any unhandled exception during execution. Values - true | false>>"
},
"Cache": {
"FeatureFlagNames": "<<Cache type to cache names of Feature flags>>",
"FeatureFlags": "<<Cache type to cache feature flag results>>",
"Graph": "<<Cache type to cache data from graph (User list from Group)>>",
"OperatorMapping": "<<Cache type to cache the filter-operator mapping>>",
"RulesEngine": "<<Cache type to cache the Rules engine JSON>>",
"Type": "URP",
"URP": {
"App": "FXP-Flighting",
"Cluster": "PS-PreProd-01",
"Location": "eastus",
"SecretKey": "URP-Secret"
}
}
}
See multi-tenancy for more details.
See cache types to understand more about the Caching configuration.
See the Rules Engine filter documentation for more details about the required information from downstream tenants.
To enable Rules Engine filter, add the BusinessRuleEngine
section for the required tenant.
As an Admin team after receiving the Storage Connection String, you will need to add the connection string in your Azure Key Vault. The Secret Key has to be added in BusinessRuleEngine:Storage:StorageConnectionStringKey
.
In most of the scenarios, most of the tenants will have the same configuration. To reduce adding the same type of configuration multiple times you can add a Default
tenant. All the configurations from Default
tenant will be applied to the other tenants, unless overridden.
See this example for more details:
{
"Tenants": {
"Default": {
"Authorization": {
"Administrators": "DUMMY_VALUES",
"SenderAppName": "Experimentation:Flighting:API",
"Type": "Configuration"
},
"Cache": {
"FeatureFlagNames": "InMemory",
"FeatureFlags": "NoCache",
"Graph": "InMemory",
"OperatorMapping": "InMemory",
"RulesEngine": "InMemory",
"Type": "URP",
"URP": {
"App": "FXP-Flighting",
"Cluster": "PS-PreProd-01",
"Location": "eastus",
"SecretKey": "URP-Secret"
}
},
"Evaluation": {
"AddDisabledContext": "false",
"AddEnabledContext": "false",
"IgnoreException": "false"
}
},
"FINANCE": {
"BusinessRuleEngine": {
"CacheDuration": "240",
"Enabled": "true",
"Storage": {
"ContainerName": "flighting-rule-engines",
"StorageConnectionStringKey": "Finance-Storage-ConnectionString"
}
},
"Evaluation": {
"AddDisabledContext": "true",
"AddEnabledContext": "true",
"IgnoreException": "true"
},
"Name": "FINANCE",
"ShortName": "Fin"
},
"HUMAN_RESOURCE": {
"BusinessRuleEngine": {
"CacheDuration": "240",
"Enabled": "true",
"Storage": {
"ContainerName": "feature-flag-rules",
"StorageConnectionStringKey": "HR-Storage-ConnectionString"
}
},
"Name": "Human Resource Team",
"ShortName": "HR"
},
"SUPPLY_CHAIN": {
"Name": "SUPPLY CHAIN",
"ShortName": "SCT"
}
}
}
In this example there are 3 tenants in the Feature Flighting System - Finance, Human Resource and Supply Chain. The Finance and HR team has Business Rules Engine configured in separate Storage Accounts. The Evaluation
configuration is overridden by the Finance team, but shared by the other 2 teams. The Supply Chain team doesn't have Rules Engine configured. Caching and Authorization Configuration are same for all 3 tenants.