Class QoaMappingService

java.lang.Object
swiss.trustbroker.mapping.service.QoaMappingService

@Service public class QoaMappingService extends Object
Service for mapping and handling Qoa values from/to RP and CP.
  • Constructor Details

  • Method Details

    • extractQoaLevel

      public CustomQoa extractQoaLevel(String qoa, QoaConfig qoaConfig)
    • extractQoaLevels

      public List<CustomQoa> extractQoaLevels(List<String> qoas, QoaConfig qoaConfig)
    • isStrongestPossible

      public boolean isStrongestPossible(String name)
    • extractQoaLevelFromAuthLevel

      public CustomQoa extractQoaLevelFromAuthLevel(String authLevel, QoaConfig qoaConfig)
    • getDefaultLevel

      public CustomQoa getDefaultLevel()
    • getUnspecifiedLevel

      public CustomQoa getUnspecifiedLevel()
    • getUnspecifiedAuthLevel

      public CustomQoa getUnspecifiedAuthLevel()
    • getMinQoaLevel

      public Optional<Integer> getMinQoaLevel(List<String> contextClasses, QoaConfig qoaConfig)
    • getMaxQoaOrder

      public Integer getMaxQoaOrder(List<String> classRefs, QoaConfig configQoa)
    • extractPepQoaFromAuthLevel

      public List<String> extractPepQoaFromAuthLevel(String authLevel, QoaConfig qoaConfig, String usePepQoaPolicy)
    • extractPepQoaFromAuthLevel

      public List<String> extractPepQoaFromAuthLevel(String authLevel, QoaConfig qoaConfig)
    • mapResponseQoasToOutbound

      public List<String> mapResponseQoasToOutbound(List<String> responseContextClasses, QoaConfig inboundQoaConfig, QoaComparison requestComparisonType, List<String> requestContextClasses, QoaConfig outboundQoaConfig)
      Mapping of CP response QoAs to RP outbound.
    • computeDefaultQoaFromConf

      public List<String> computeDefaultQoaFromConf(QoaConfig qoaConfig)
      Returns:
      default QoAs for config.
    • mapRequestQoasToOutbound

      public QoaSpec mapRequestQoasToOutbound(QoaComparison requestComparisonType, List<String> requestContextClasses, QoaConfig inboundQoaConfig, QoaConfig outboundQoaConfig)
      Map RP request context classes to outbound CP request.
    • canCpFulfillRequestQoas

      public boolean canCpFulfillRequestQoas(QoaComparison requestComparisonType, List<String> requestContextClasses, QoaConfig rpQoaConfig, QoaConfig cpQoaConfig)
      Returns:
      true if the QOA values defined for the CP allow fulfilling the requested context classes / comparison type, false if not. Returns true if the CP config has no QOAs defined (CP might return anything), if the RP did not request QOAs and the RP config does not define defaults (we accept anything), or if QOA checks are not enforced for either RP or CP (just log the result of the check).
    • getQoaConfiguration

      public QoaConfig getQoaConfiguration(StateData spStateData, RelyingParty relyingParty)
    • getQoaConfiguration

      public Qoa getQoaConfiguration(String providerName, String referer, RelyingParty relyingParty)