docs: static void ensurePrincipalAccessIsAllowedForService(final Service service,
                                                           final RegisteredService registeredService,
                                                           final String principalId,
                                                           final Map<String, Object> attributes) {
          ensureServiceAccessIsAllowed(service, registeredService);
          if (!registeredService.getAccessStrategy().doPrincipalAttributesAllowServiceAccess(principalId, attributes)) {
              LOGGER.warn("Cannot grant access to service [{}] because it is not authorized for use by [{}].", service.getId(), principalId);
              val handlerErrors = new HashMap<String, Throwable>();
              val message = String.format("Cannot grant service access to %s", principalId);
              val exception = new UnauthorizedServiceForPrincipalException(message, registeredService, principalId, attributes);
              handlerErrors.put(UnauthorizedServiceForPrincipalException.class.getSimpleName(), exception);
  
              throw new PrincipalException(UnauthorizedServiceForPrincipalException.CODE_UNAUTHZ_SERVICE, handlerErrors, new HashMap<>());
          }
      }