Class OpenBankingRoleBasedScopeValidator

java.lang.Object
org.forgerock.openig.fapi.dcr.request.validator.OpenBankingRoleBasedScopeValidator
All Implemented Interfaces:
RegistrationRequestValidator

public class OpenBankingRoleBasedScopeValidator extends Object implements RegistrationRequestValidator
The OpenBankingRoleBasedScopeValidator enforces registration scope validation by cross-reference of permitted Software Statement Assertion (SSA) roles.

Note that this scope validation is based around Open Banking scope validation, not strictly FAPI, for which there are no specific scope validation roles. For backward compatibility support, we continue to support this form of scope validation, but its use is optional and needs to be explicitly configured via the containing FapiDcrFilterChainHeaplet.

As such, this class should not be used outside Ping-managed configuration.

In terms of the Open Banking specifications, dynamic client registration scope rule, states that:

 "scope: Specified in the scope claimed. This must be a subset of the scopes in the SSA"
 
This specification, subsection data dictionary for OBClientRegistrationRequest1, also states that:
   scope     1..1     scope     Scopes the client is asking for (if not specified, default scopes are assigned by
   the AS). This consists of a list scopes separated by spaces.     String(256)
 

In the Open Banking issued SSA we can find no scopes defined, however, we do have 'software_roles' which is an array of strings containing AISP, PISP, or a subset thereof, or ASPSP. This validator therefore checks that the scopes requested are allowed according to the roles defined in the software statement.