Last active
January 21, 2018 22:32
-
-
Save AlainODea/889c37155f13689829af351a9383739b to your computer and use it in GitHub Desktop.
SAML Debugging - Pulling SAMLResponse POSTed to Okta from HAR using jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
harFile="${1:=NetworkData.xml}" | |
cat "${harFile}" | | |
jq --raw-output --from-file har-to-SAMLResponse.jq | # get URL encoded SAMLResponse | |
while read; do echo -e ${REPLY//%/\\x}; done | # decode to Base64 SAMLResponse | |
base64 --decode # decode to XML SAMLResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.log.entries[].request | | |
select(.url == "https://example.okta.com/sso/saml2/0oa21234abcd1234abcd1234") | | |
.postData.params[] | | |
select(.name == "SAMLResponse") | | |
.value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment