https://linen.dev logo
#general
Title
# general
a

AndriiSKR

12/12/2023, 10:35 AM
just in case... Does Wiremock may support SAML auth acting as Identity Provider (IdP) mocking need? looking to mock it for load testing needs together with regular APIs
t

Tom

12/12/2023, 11:37 AM
I’m sure you could mock a SAML endpoint with WireMock, since it’s just an HTTP + XML API. I don’t know of any public examples of this unfortunately.
🙌 1
a

AndriiSKR

12/12/2023, 11:40 AM
yeah, i would love to have example. Based on xml tricks, i am quite confused how to make it work 🙂
@Tom i have done the tech research on how SAML works. Now wondering if I can configure mock in such way: • URL decode the SAML Request • base64 decode the SAML Request • extract some info (ID and Issuer) from XML • respond with ID + Issuer in Json.
t

Tom

12/15/2023, 10:45 AM
You should be able to do all these things via response templating. There’s a URL encode/decode helper: https://wiremock.org/docs/response-templating/#url-encoding-helper a base64 encode/decode helper: https://wiremock.org/docs/response-templating/#url-encoding-helper and an xPath helper for extracting XML values: https://wiremock.org/docs/response-templating/#url-encoding-helper
🙌 1
tq 1