docs: static void ensurePrincipalAccessIsAllowedForService(final Service service,
                                                           final RegisteredService registeredService,
                                                           final Authentication authentication,
                                                           final boolean retrievePrincipalAttributesFromReleasePolicy)
          throws UnauthorizedServiceException, PrincipalException {
          ensureServiceAccessIsAllowed(service, registeredService);
  
          val principal = authentication.getPrincipal();
          val principalAttrs =
              retrievePrincipalAttributesFromReleasePolicy && registeredService != null && registeredService.getAttributeReleasePolicy() != null
                  ? registeredService.getAttributeReleasePolicy().getAttributes(principal, service, registeredService)
                  : authentication.getPrincipal().getAttributes();
          val attributes = new HashMap<String, Object>(principalAttrs);
          attributes.putAll(authentication.getAttributes());
          ensurePrincipalAccessIsAllowedForService(service, registeredService, principal.getId(), attributes);
      }