Class MonitoringController
java.lang.Object
swiss.trustbroker.saml.controller.AbstractSamlController
swiss.trustbroker.monitoring.controller.MonitoringController
@RestController
@ConditionalOnBooleanProperty("trustbroker.config.monitoring.enabled")
public class MonitoringController
extends AbstractSamlController
Monitoring API
-
Field Summary
Fields inherited from class swiss.trustbroker.saml.controller.AbstractSamlController
samlValidator, trustBrokerProperties -
Constructor Summary
ConstructorsConstructorDescriptionMonitoringController(TrustBrokerProperties trustBrokerProperties, SamlValidator samlValidator, RelyingPartySetupService relyingPartySetupService, MonitoringService monitoringService) -
Method Summary
Modifier and TypeMethodDescriptionmonitorRelyingParty(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String rpId, String cpId) Triggers a SAML login on the provided RP / CP pair.
IDs can be plain text (unless they contain '?' or '/' that would affect the parsing of the path), URL encoded, or Base64 URL encodedmonitorRelyingPartyResponse(jakarta.servlet.http.HttpServletRequest request, String rpId, String cpId) Processes the CP response to the request triggered by the monitoring.
Note: No signature check other validation of the SAML response content is performed.Methods inherited from class swiss.trustbroker.saml.controller.AbstractSamlController
decodeSamlMessage, handleUnsupportedMessage, validateSamlIssuer, validateSamlMessage, validateSamlSchema
-
Constructor Details
-
MonitoringController
public MonitoringController(TrustBrokerProperties trustBrokerProperties, SamlValidator samlValidator, RelyingPartySetupService relyingPartySetupService, MonitoringService monitoringService)
-
-
Method Details
-
monitorRelyingParty
@GetMapping({"/api/v1/monitoring/relyingparties","/api/v1/monitoring/relyingparties/{rpId}","/api/v1/monitoring/relyingparties/{rpId}/{cpId}"}) public MonitoringResponse monitorRelyingParty(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @PathVariable(name="rpId",required=false) String rpId, @PathVariable(name="cpId",required=false) String cpId) Triggers a SAML login on the provided RP / CP pair.
IDs can be plain text (unless they contain '?' or '/' that would affect the parsing of the path), URL encoded, or Base64 URL encoded- Parameters:
request-response-rpId- required to determine the RPcpId- optional to filter the list of CPs for the RP- Returns:
- MonitoringResponse.INVALID if rpId plus cpId does not lead to a pair of exactly one RP and CP / null otherwise
-
monitorRelyingPartyResponse
@PostMapping({"/api/v1/monitoring/relyingparties","/api/v1/monitoring/relyingparties/{rpId}","/api/v1/monitoring/relyingparties/{rpId}/{cpId}"}) public MonitoringResponse monitorRelyingPartyResponse(jakarta.servlet.http.HttpServletRequest request, @PathVariable(name="rpId",required=false) String rpId, @PathVariable(name="cpId",required=false) String cpId) Processes the CP response to the request triggered by the monitoring.
Note: No signature check other validation of the SAML response content is performed.- Parameters:
request-rpId-cpId-- Returns:
- MonitoringResponse.UP for status code SUCCESS / MonitoringResponse.DOWN otherwise
-