One requirement after making a schema change is to write an FBC upgrade rule to perform commit-to-commit upgrade within master.groovy. All FBC upgrade is manual via the use of the openam-config-upgrader and its rule files. The upgrader's associated rules perform that transformation. This page is here to help you get started with writing FBC upgrade rules for any schema change.
After a schema change add upgrade rules to master.groovy. Use the existing rules as examples.
AM has the option of storing its configuration in
Other contents should be held in external data stores e.g. CTS, User store, applications and polices stores.
By default in ~/openam/config/services
Above is the top level structure of the FBC. It has similarities with an Amster export but be aware that it is very different.
Amster files != FBC files
N.B. Concentrating on the configuration files:
Agent services for example
Set of idempotent rules that will upgrade file based configuration files to be compatible with the latest version of AM on a branch. master.groovy is contained in the AM.zip release.
The rules within master.groovy must be idempotent.
Idempotency can be achieved using the configuration version. More information can be found here Upgrade rule filtering based on version.
def UPGRADE_TO_VERSION = "22.214.171.124" def APPLICABLE_VERSIONS = ["126.96.36.199","188.8.131.52"] return [ setVersion(UPGRADE_TO_VERSION), forRealmService("authenticationTreesService", forVersionsBefore(APPLICABLE_VERSIONS, forRealmDefaults( addAttribute("new").with("attribute")) ) ) ]
Guards can be used to achieve idempotency.
return [ forRealmService("OAuth2Provider", forRealmDefaults( within("advancedOIDCConfig", where(key("authorisedIdmDelegationClients").isNotPresent(), addAttribute("authorisedIdmDelegationClients").with(Collections.emptySet())))), forSettings( within("advancedOIDCConfig", where(key("authorisedIdmDelegationClients").isNotPresent(), addAttribute("authorisedIdmDelegationClients").with(Collections.emptySet()))))), ]
Unit tests will run against master.groovy for these test cases. When adding rules it is expected that test case files are added to test those rules.
Further advice can be found in the associated README.
The following process could be followed to find out the contents of new or changed fbc as a result of a schema change, e.g. How to find the service name as it is not the Amster name.
The FBC service name != Amster service name