code: @ReadOperation
      public Map<String, Object> releasePrincipalAttributes(final String username,
                                                            final String password,
                                                            final String service) {
  
  
          val selectedService = this.serviceFactory.createService(service);
          val registeredService = this.servicesManager.findServiceBy(selectedService);
  
          val credential = new UsernamePasswordCredential(username, password);
          val result = this.authenticationSystemSupport.handleAndFinalizeSingleAuthenticationTransaction(selectedService, credential);
          val authentication = result.getAuthentication();
  
          val principal = authentication.getPrincipal();
          val attributesToRelease = registeredService.getAttributeReleasePolicy().getAttributes(principal, selectedService, registeredService);
          val builder = DefaultAuthenticationBuilder.of(
                  principal,
                  this.principalFactory,
                  attributesToRelease,
                  selectedService,
                  registeredService,
                  authentication);
  
          val finalAuthentication = builder.build();
          val assertion = new DefaultAssertionBuilder(finalAuthentication)
              .with(selectedService)
              .with(CollectionUtils.wrap(finalAuthentication))
              .build();
  
          val resValidation = new LinkedHashMap<String, Object>();
          resValidation.put(CasViewConstants.MODEL_ATTRIBUTE_NAME_ASSERTION, assertion);
          resValidation.put(CasViewConstants.MODEL_ATTRIBUTE_NAME_SERVICE, selectedService);
          resValidation.put("registeredService", registeredService);
  
          return resValidation;
      }
docs: Release principal attributes map.
  
  @param username the username
  @param password the password
  @param service  the service
  @return the map