A Brief Introduction to SAML Security Vector
Tags: saml, bugbounty, cybersecurity, infosec
Published: 2022-11-16 04:56:45

---
title: A Brief Introduction to SAML Security Vector
published: true
date: 2022-11-16 02:10:00 UTC
tags: saml,bugbounty,cybersecurity,infosec
canonical_url: https://tutorialboy24.blogspot.com/2022/11/a-brief-introduction-to-saml-security.html
---

 

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjxMmF6pI9tiOiRELApGx2XsU0DBOHYqJx3M5u6iMEy0psFe6PMkrS0JKEZbuyDvIrKLpubmRm7dvMBpiio8jEvCGCn5eZbXRt5sS2Se8r7Sv-gTqubAqNofT_EqLEug01yjZPtAi-vqNe-EXiExotN5fSoODsdA0eT-8-LOUuzPj9HFBsQ7G1Bs2iJg/w640-h360/saml.png)

SAML started in 2001, and the final SAML 2.0 version was released in 2005. Since then, no major version has been released, and SAML 2.0 has continued until now. SAML is already an antique, and now OAuth is used more in SSO. I have seen some SAML vulnerability reports on some vulnerability platforms, and it still appears in some large-scale applications. I also mentioned it in a topic "Hacking the Cloud With SAML" that I saw recently . Archeology is not bad. , at least some of its concepts are still in use today.

# SAML 2.0

SAML : Security Assertion Markup Language, a language for security assertion markup.

Uses of SAML:

- Single sign-on (SSO Single Sign-ON)

- Federated Identity

- Use SAML within other architectures such as WS-Security

Subsequent content is mainly part of SAML SSO.

The three parties in the SAML protocol: browser, identity authentication server (IDP, Identity Provider), service provider (SP, Service provider), and the mutual communication sequence, encryption method, and transmission data format of these three parties.

Maybe some of the flow charts you see on the Internet will have one or two more steps or one or two fewer steps. That is just some differences in the specific selection and implementation of SAML transmission by developers. It is not important for us to understand the whole SAML authentication process. Big, just infer other things from one fact. The basic authentication process is as follows:

[![](https://blogger.googleusercontent.com/img/a/AVvXsEhRJb-g6SNOKXfeG2WcpaWnYQe3JCoNlQxg9POF1TytHJYjJ0EcVItl31N12G9CkZvixtbZzar7Bwmfef2ssQIOCnMxls1WtchTydG-yNnLVoiyLXyGBptOD9kebawW5k-Kj2Lmwrh4iyy56HUL7FAYCCqWLWHpOM-kSchegOIU1ofSr_FyW9G13oTy_g=w640-h376)](https://blogger.googleusercontent.com/img/a/AVvXsEhRJb-g6SNOKXfeG2WcpaWnYQe3JCoNlQxg9POF1TytHJYjJ0EcVItl31N12G9CkZvixtbZzar7Bwmfef2ssQIOCnMxls1WtchTydG-yNnLVoiyLXyGBptOD9kebawW5k-Kj2Lmwrh4iyy56HUL7FAYCCqWLWHpOM-kSchegOIU1ofSr_FyW9G13oTy_g)
  

Let’s take a look at the figure first, and then we will see the details of each link in the case of OpenSAML.

## SAML SSO through OpenSAML

OpenSAML is an open source implementation of the SAML protocol. I found an SSO demo implemented with OpenSAML on github . It uses HTTP-POST to transmit SAML, and there are hundreds of stars. Run the project, log in normally and see the complete communication package process, port 9090 is SP, port 8080 is IDP

User access to SP service

request:

```
GET /user.html?force-authn=true HTTP/1.1Host: 192.168.0.104:9090Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Referer: http://192.168.0.104:9090/Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,vi;q=0.7Cookie: mujinaSpSessionId=2E15F753B56E4646FA4CACCE4DD2ED6D; mujinaIdpSessionId=6203026E878EFB44F90769F285FB05D9Connection: close
```

response:

```
HTTP/1.1 200 X-Content-Type-Options: nosniffX-XSS-Protection: 1; mode=blockCache-Control: no-cache, no-store, max-age=0, must-revalidatePragma: no-cacheExpires: 0X-Frame-Options: DENYContent-Type: text/html;charset=UTF-8Content-Language: zh-CNDate: Sat, 22 Oct 2022 10:29:57 GMTConnection: closeContent-Length: 889<!DOCTYPE html><html><head> <title>Mujina Service Provider</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="/main.css"/> <script src="/sp.js"></script></head><body><section class="login-container-wrapper"> <section class="login-container"> <section class="login"> <h1>Mujina Service Provider</h1> <a id="user-link" class="button" href="/user.html?force-authn=false">Login</a> <section class="force-authn"> <input type="checkbox" id="force-authn" name="force-authn"/> <label for="force-authn">Force Authn request?</label> </section> </section> <a class="powered-by" href="https://openconext.org/" target="_blank">Copyright ?? 2018 OpenConext</a> </section></section></body></html>
```

Return to the SP login page, and the user clicks to log in.

### SP returns Redirect

request:

```
GET /user.html?force-authn=true HTTP/1.1Host: 192.168.0.104:9090Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Referer: http://192.168.0.104:9090/Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,vi;q=0.7Cookie: mujinaSpSessionId=2E15F753B56E4646FA4CACCE4DD2ED6D; mujinaIdpSessionId=6203026E878EFB44F90769F285FB05D9Connection: close
```

response:

```
HTTP/1.1 200 Set-Cookie: mujinaSpSessionId=F6BCE4D93AA256056960B9459E27B374; Path=/; HttpOnlyCache-control: no-cache, no-storePragma: no-cacheX-Content-Type-Options: nosniffX-XSS-Protection: 1; mode=blockX-Frame-Options: DENYContent-Type: text/html;charset=UTF-8Date: Sat, 22 Oct 2022 10:30:02 GMTConnection: closeContent-Length: 4483<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> </head> <body onload="document.forms[0].submit()"> <noscript> <p> <strong>Note:</strong> Since your browser does not support JavaScript, you must press the Continue button once to proceed. </p> </noscript> <form action="http&#x3a;&#x2f;&#x2f;192.168.0.104&#x3a;8080&#x2f;SingleSignOnService" method="post"> <div><input type="hidden" name="SAMLRequest" value="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRG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ZBZ21yMDU1ZkFqcEhlWkZnRFpCQVBDd1lkM1ROTURlU3lNdGEzS2Erb1M3R1JGRGVQDQprTUVtK2tINC9ySVROS1VGMXNPdldCVFNvd2s5VHVkRUR5RnFnR250Y2R1L2wvelJ4dngzM3kzTE1HNVVTRDB4NFg0SUtqUnJSTjFCDQpiY0tnaThkcTEwQzNqZHFOYW5jVHVQb3FUM1dXelJ2VnRCL3EzNEI3Rjc0LzZKemdFb09DRUh1ZkJNcDRaRnU1NFAweUVHdFdmVHdUDQp6dW9ab2JyQ2hWVkJ0NHcvWFphZ3JSdFVDRE53UnBITmJwanhZdWRicUxxcGkxTVFwVjlvaHQvQnBUSFZKRzJpMHJvPTwvZHM6WDUwOUNlcnRpZmljYXRlPjwvZHM6WDUwOURhdGE+PC9kczpLZXlJbmZvPjwvZHM6U2lnbmF0dXJlPjwvc2FtbDJwOkF1dGhuUmVxdWVzdD4="/> </div> <noscript> <div> <input type="submit" value="Continue"/> </div> </noscript> </form> </body></html>
```

The IDP login URL is returned with AuthnRequest, which is base64 encoded, unpacked and formatted as follows:

```
<?xml version="1.0" encoding="UTF-8"?><saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="http://192.168.0.104:9090/saml/SSO" Destination="http://192.168.0.104:8080/SingleSignOnService" ForceAuthn="true" ID="ahgg4a45deh9i67h0f2iedga0755g" IsPassive="false" IssueInstant="2022-10-22T10:30:02.115Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"> <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">http://mock-sp </saml2:Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <ds:Reference URI="#ahgg4a45deh9i67h0f2iedga0755g"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue>W4tlLstlUd7FOsSnI4PmMS00Xrm1PBa1D115M7FDqnI=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>oe8d3A6LUMVwNERgxPr0tIuROo+0Rw5z12n99PJxJKNWaveTGbfAA1PME494T2jVg5HmNeKPrCBMTnOwDfirmzTSCsxTOqwhZI1sNqnkIsLJyczuFR52YELmZLnk9743yeQD0dJwKGYQGBBrID8AJuhoAKHYO74Y/abed0Va6kvevf4vktqcP4GYasc61n8j8SseGgC4kTXtOpuh6PZg/7efRe6wiOrU46hv7QEZPn6JsOfl6qJ7tMeceEzoNsNuor4bv6UWNYziO7u7Ji3NGNZt4EwmzCSGWqqghLNW/5YwapZzqsJii0X0q/fvR1qd5T0JjaxvieKYKkfLetHxbg==</ds:SignatureValue> <ds:KeyInfo> <ds:X509Data> <ds:X509Certificate>MIIDEzCCAfugAwIBAgIJAKoK/heBjcOYMA0GCSqGSIb3DQEBBQUAMCAxHjAcBgNVBAoMFU9yZ2FuaXphdGlvbiwgQ049T0lEQzAeFw0xNTExMTExMDEyMTVaFw0yNTExMTAxMDEyMTVaMCAxHjAcBgNVBAoMFU9yZ2FuaXphdGlvbiwgQ049T0lEQzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANBGwJ/qpTQNiSgUglSE2UzEkUow+wS8r67etxoEhlzJZfgK/k5TfG1wICDqapHAxEVgUM10aBHRctNocA5wmlHtxdidhzRZroqHwpKy2BmsKX5Z2oK25RLpsyusB1KroemgA/CjUnI6rIL1xxFn3KyOFh1ZBLUQtKNQeMS7HFGgSDAp+sXuTFujz12LFDugX0T0KB5a1+0l8y0PEa0yGa1oi6seONx849ZHxM0PRvUunWkuTM+foZ0jZpFapXe02yWMqhc/2iYMieE/3GvOguJchJt6R+cut8VBb6ubKUIGK7pmoq/TB6DVXpvsHqsDJXechxcicu4pdKVDHSec850CAwEAAaNQME4wHQYDVR0OBBYEFK7RqjoodSYVXGTVEdLf3kJflP/sMB8GA1UdIwQYMBaAFK7RqjoodSYVXGTVEdLf3kJflP/sMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADNZkxlFXh4F45muCbnQd+WmaXlGvb9tkUyAIxVL8AIu8J18F420vpnGpoUAE+Hy3evBmp2nkrFAgmr055fAjpHeZFgDZBAPCwYd3TNMDeSyMta3Ka+oS7GRFDePkMEm+kH4/rITNKUF1sOvWBTSowk9TudEDyFqgGntcdu/l/zRxvx33y3LMG5USD0x4X4IKjRrRN1BbcKgi8dq10C3jdqNancTuPoqT3WWzRvVtB/q34B7F74/6JzgEoOCEHufBMp4ZFu54P0yEGtWfTwTzuoZobrChVVBt4w/XZagrRtUCDNwRpHNbpjxYudbqLqpi1MQpV9oht/BpTHVJG2i0ro=</ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </ds:Signature></saml2p:AuthnRequest>
```

Take a look at the meaning of each tag and attribute in turn.

## AuthnRequest

The SP communicates to the IDP that I want to authenticate a user, which does not contain user information, but contains the basic information of the SP.

- AssertionConsumerServiceURL: Specifies which URL of the SP to send the AuthnResponse to after the IDP authentication is successful

- Destination: Specifies the endpoint for IDP authentication

- ForceAuthn: Mandatory authentication, even if it has been authenticated before, the browser carries the authenticated session, if this value is true, it will still re-authenticate

- ID: Random identification, mainly used to facilitate reference in other tags, such as Reference in SignedInfo

- IsPassive: Default is false. If true, the IdP cannot display the interaction with the user through the browser, and the user cannot perceive the existence of the jump

- IssueInstant: when the request was issued

- ProtocolBinding: what to use to transmit SAML messages, here is through HTTP POST

- Version: Version 2.0

### Issuer

It is used to identify the actual issuer of the AuthnRequest request message, usually in URI format.

### Signature

Signature method, xmldsig (XML Signature) is used here. This is a concept and does not refer to a specific algorithm. The specific algorithm is in SignedInfo .

### SignedInfo

- CanonicalizationMethod: Canonicalization algorithm, the object of action is the content in the Signature tag, the xml-exc-c14n used here is an algorithm used to standardize the xml format

- SignatureMethod: What method to use to sign DigestValue, note that the object signed here is the digest value instead of the xml object, the digest object is the xml

- Reference: Reference, the ID referenced here is the ID in AuthnRequest, which means that other label information in the Reference will apply to the content of the AuthnRequest label and sub-labels

- Transforms: You can specify multiple transforms to chain the referenced object. For example, enveloped-signature adopts partial signature method, that is, the Signature tag in AuthnRequest will not be included in the digest content when calculating the digest; xml-exc-c14n algorithm It is to normalize the content in AuthnRequest

- DigestMethod: Digest algorithm for AuthnRequest information, sha256 is similar to md5 algorithm, one-way algorithm, irreversible, using this method for digest calculation

- DigestValue: Digest value of AuthnRequest information

## SignatureValue

The signature result, where the signature object is the SignedInfo tag.

### KeyInfo

Contains the X509 public key certificate information. The public key in the X509Certificate will be used for the digest. After the IDP receives the AuthnRequest, it will also use the public key to decrypt the signature information, and then compare it with the digest value to see if the information has been tampered with.

How to summarize, which part is extracted, and which part is signed, will be seen in the subsequent analysis of the code details.

#### Browser redirects to IDP

request:

```
POST /SingleSignOnService HTTP/1.1Host: 192.168.0.104:8080Content-Length: 3718Cache-Control: max-age=0Upgrade-Insecure-Requests: 1Origin: http://192.168.0.104:9090Content-Type: application/x-www-form-urlencodedUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Referer: http://192.168.0.104:9090/Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,vi;q=0.7Cookie: mujinaIdpSessionId=6203026E878EFB44F90769F285FB05D9; mujinaSpSessionId=F6BCE4D93AA256056960B9459E27B374Connection: closeSAMLRequest=PD94bWwgdmVyc2lvbj0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SjE4DQpGNDIwdnBuR3BvVUFFK0h5M2V2Qm1wMm5rckZBZ21yMDU1ZkFqcEhlWkZnRFpCQVBDd1lkM1ROTURlU3lNdGEzS2Erb1M3R1JGRGVQDQprTUVtK2tINC9ySVROS1VGMXNPdldCVFNvd2s5VHVkRUR5RnFnR250Y2R1L2wvelJ4dngzM3kzTE1HNVVTRDB4NFg0SUtqUnJSTjFCDQpiY0tnaThkcTEwQzNqZHFOYW5jVHVQb3FUM1dXelJ2VnRCL3EzNEI3Rjc0LzZKemdFb09DRUh1ZkJNcDRaRnU1NFAweUVHdFdmVHdUDQp6dW9ab2JyQ2hWVkJ0NHcvWFphZ3JSdFVDRE53UnBITmJwanhZdWRicUxxcGkxTVFwVjlvaHQvQnBUSFZKRzJpMHJvPTwvZHM6WDUwOUNlcnRpZmljYXRlPjwvZHM6WDUwOURhdGE%2BPC9kczpLZXlJbmZvPjwvZHM6U2lnbmF0dXJlPjwvc2FtbDJwOkF1dGhuUmVxdWVzdD4%3D
```

  

response:

```
HTTP/1.1 302 Set-Cookie: mujinaIdpSessionId=C54BBCAED0850B9E50195AD02DEAA9D6; Path=/; HttpOnlyX-Content-Type-Options: nosniffX-XSS-Protection: 1; mode=blockCache-Control: no-cache, no-store, max-age=0, must-revalidatePragma: no-cacheExpires: 0X-Frame-Options: DENYLocation: http://192.168.0.104:8080/loginContent-Length: 0Date: Sat, 22 Oct 2022 10:30:02 GMTConnection: close
```

Here IDP will verify that the AuthnRequest information is correct, and then redirect the user to the IDP's login page.

### IDP Login Page

To save some space, the request and response information here will not be posted, and the familiarity with the process will not be affected.

The user enters the account password to log in

request:

```
POST /login HTTP/1.1Host: 192.168.0.104:8080Content-Length: 118Cache-Control: max-age=0Upgrade-Insecure-Requests: 1Origin: http://192.168.0.104:8080Content-Type: application/x-www-form-urlencodedUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Referer: http://192.168.0.104:8080/loginAccept-Language: zh-CN,zh;q=0.9,en;q=0.8,vi;q=0.7Cookie: mujinaSpSessionId=F6BCE4D93AA256056960B9459E27B374; mujinaIdpSessionId=C54BBCAED0850B9E50195AD02DEAA9D6Connection: closeusername=wewe&password=ererer&persist-me=on&urn%3Amace%3Aterena.org%3Aattribute-def%3AschacHomeOrganizationType=ererer
```

response:

```
HTTP/1.1 302 X-Content-Type-Options: nosniffX-XSS-Protection: 1; mode=blockCache-Control: no-cache, no-store, max-age=0, must-revalidatePragma: no-cacheExpires: 0X-Frame-Options: DENYLocation: http://192.168.0.104:8080/SingleSignOnServiceContent-Length: 0Date: Sat, 22 Oct 2022 10:30:12 GMTConnection: close
```

The IDP verifies the user, the user authentication is successful, the AuthnResponse is generated and cached in the session, and then redirected to the SingleSignOnService. Later, the browser will use GET to request the SingleSignOnService endpoint once.

#### Browser redirects to SingleSignOnService

request:

```
GET /SingleSignOnService HTTP/1.1Host: 192.168.0.104:8080Cache-Control: max-age=0Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Referer: http://192.168.0.104:8080/loginAccept-Language: zh-CN,zh;q=0.9,en;q=0.8,vi;q=0.7Cookie: mujinaSpSessionId=F6BCE4D93AA256056960B9459E27B374; mujinaIdpSessionId=C54BBCAED0850B9E50195AD02DEAA9D6Connection: close
```

response:

```
HTTP/1.1 200 Cache-control: no-cache, no-storePragma: no-cacheX-Content-Type-Options: nosniffX-XSS-Protection: 1; mode=blockX-Frame-Options: DENYContent-Type: text/html;charset=UTF-8Date: Sat, 22 Oct 2022 10:30:12 GMTConnection: closeContent-Length: 13542<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> </head> <body onload="document.forms[0].submit()"> <noscript> <p> <strong>Note:</strong> Since your browser does not support JavaScript, you must press the Continue button once to proceed. </p> </noscript> <form action="http&#x3a;&#x2f;&#x2f;192.168.0.104&#x3a;9090&#x2f;saml&#x2f;SSO" method="post"> <div><input type="hidden" name="SAMLResponse" value="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOlJlc3BvbnNlIHhtbG5zOnNhbWwycD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiBEZXN0aW5hdGlvbj0iaHR0cDovLzE5Mi4xNjguMC4xMDQ6OTA5MC9zYW1sL1NTTyIgSUQ9Il9jNTBjMjQzZi1hNjA2LTRhNDMtOTQ4Ni1lYWVjMTUyYzJjMTEiIEluUmVzcG9uc2VUbz0iYWhnZzRhNDVkZWg5aTY3aDBmMmllZGdhMDc1NWciIElzc3VlSW5zdGFudD0iMjAyMi0xMC0yMlQxMDozMDoxMi41NDRaIiBWZXJzaW9uPSIyLjAiIHhtbG5zOnhzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSI+PHNhbWwyOklzc3VlciB4bWxuczpzYW1sMj0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOmFzc2VydGlvbiIgRm9ybWF0PSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6bmFtZWlkLWZvcm1hdDplbnRpdHkiPmh0dHA6Ly9tb2NrLWlkcDwvc2FtbDI6SXNzdWVyPjxkczpTaWduYXR1cmUgeG1sbnM6ZHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPjxkczpTaWduZWRJbmZvPjxkczpDYW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8xMC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j5leGFtcGxlLmNvbTwvc2FtbDI6QXR0cmlidXRlVmFsdWU+PC9zYW1sMjpBdHRyaWJ1dGU+PC9zYW1sMjpBdHRyaWJ1dGVTdGF0ZW1lbnQ+PC9zYW1sMjpBc3NlcnRpb24+PC9zYW1sMnA6UmVzcG9uc2U+"/> <input type="hidden" name="Signature" value="LeMNm3aevRONrMuFm9o9GJvkF/fe3KdO9j7cU9bMS0YB5IxYzo7uSE6Kgt7dLkUC41puWhTg8lP861HqeAPUhwvoRIvRxac2aa3euPpOz+vcWepAkYTQuVxznH5gn24qYRIiBflWlVgcw7iGUHeCPP2Gk9Pf5pFaGnFeSc2CR47in1sq0tp1qTUSWTdADPV4S/K5njRLFXBYcO9YwHafFjVlEtMgeWyUxPpSBFuClpVfF8T91O3X43Q444yP4tJz7cEntI6FzRCH62N1lvz0bXz3Z6JKQ9G8MfOwvGNAIfC72cwCWyewUPRzrFR4Gw7ZV4ZYSLcMlVpGxKmxVv7o0A=="/> <input type="hidden" name="SigAlg" value="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <input type="hidden" name="KeyInfo" value="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48ZHM6S2V5SW5mbyB4bWxuczpkcz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyI+PGRzOlg1MDlEYXRhPjxkczpYNTA5Q2VydGlmaWNhdGU+TUlJREV6Q0NBZnVnQXdJQkFnSUpBS29LL2hlQmpjT1lNQTBHQ1NxR1NJYjNEUUVCQlFVQU1DQXhIakFjQmdOVkJBb01GVTl5WjJGdQ0KYVhwaGRHbHZiaXdnUTA0OVQwbEVRekFlRncweE5URXhNVEV4TURFeU1UVmFGdzB5TlRFeE1UQXhNREV5TVRWYU1DQXhIakFjQmdOVg0KQkFvTUZVOXlaMkZ1YVhwaGRHbHZiaXdnUTA0OVQwbEVRekNDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUE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TXA0WkZ1NTRQMHlFR3RXZlR3VA0KenVvWm9ickNoVlZCdDR3L1haYWdyUnRVQ0ROd1JwSE5icGp4WXVkYnFMcXBpMU1RcFY5b2h0L0JwVEhWSkcyaTBybz08L2RzOlg1MDlDZXJ0aWZpY2F0ZT48L2RzOlg1MDlEYXRhPjwvZHM6S2V5SW5mbz4="/> </div> <noscript> <div> <input type="submit" value="Continue"/> </div> </noscript> </form> </body></html>
```

In the response, the IDP returned the AuthnResponse content, along with two other parameters.

Browser redirects to SP

request:

```
POST /saml/SSO HTTP/1.1Host: 192.168.0.104:9090Content-Length: 12712Cache-Control: max-age=0Upgrade-Insecure-Requests: 1Origin: http://192.168.0.104:8080Content-Type: application/x-www-form-urlencodedUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Referer: http://192.168.0.104:8080/Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,vi;q=0.7Cookie: mujinaSpSessionId=F6BCE4D93AA256056960B9459E27B374; mujinaIdpSessionId=C54BBCAED0850B9E50195AD02DEAA9D6Connection: closeSAMLResponse=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbDJwOlJlc3BvbnNlIHhtbG5zOnNhbWwycD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiBEZXN0aW5hdGlvbj0iaHR0cDovLzE5Mi4xNjguMC4xMDQ6OTA5MC9zYW1sL1NTTyIgSUQ9Il9jNTBjMjQzZi1hNjA2LTRhNDMtOTQ4Ni1lYWVjMTUyYzJjMTEiIEluUmVzcG9uc2VUbz0iYWhnZzRhNDVkZWg5aTY3aDBmMmllZGdhMDc1NWciIElzc3VlSW5zdGFudD0iMjAyMi0xMC0yMlQxM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IU2VjODUwQ0F3RUFBYU5RTUU0d0hRWURWUjBPQkJZRUZLN1Jxam9vZFNZVg0KWEdUVkVkTGYza0pmbFAvc01COEdBMVVkSXdRWU1CYUFGSzdScWpvb2RTWVZYR1RWRWRMZjNrSmZsUC9zTUF3R0ExVWRFd1FGTUFNQg0KQWY4d0RRWUpLb1pJaHZjTkFRRUZCUUFEZ2dFQkFETlpreGxGWGg0RjQ1bXVDYm5RZCtXbWFYbEd2Yjl0a1V5QUl4Vkw4QUl1OEoxOA0KRjQyMHZwbkdwb1VBRStIeTNldkJtcDJua3JGQWdtcjA1NWZBanBIZVpGZ0RaQkFQQ3dZZDNUTk1EZVN5TXRhM0thK29TN0dSRkRlUA0Ka01FbStrSDQvcklUTktVRjFzT3ZXQlRTb3drOVR1ZEVEeUZxZ0dudGNkdS9sL3pSeHZ4MzN5M0xNRzVVU0QweDRYNElLalJyUk4xQg0KYmNLZ2k4ZHExMEMzamRxTmFuY1R1UG9xVDNXV3pSdlZ0Qi9xMzRCN0Y3NC82SnpnRW9PQ0VIdWZCTXA0WkZ1NTRQMHlFR3RXZlR3VA0KenVvWm9ickNoVlZCdDR3L1haYWdyUnRVQ0ROd1JwSE5icGp4WXVkYnFMcXBpMU1RcFY5b2h0L0JwVEhWSkcyaTBybz08L2RzOlg1MDlDZXJ0aWZpY2F0ZT48L2RzOlg1MDlEYXRhPjwvZHM6S2V5SW5mbz4%3D
```

response:

```
HTTP/1.1 302 X-Content-Type-Options: nosniffX-XSS-Protection: 1; mode=blockCache-Control: no-cache, no-store, max-age=0, must-revalidatePragma: no-cacheExpires: 0X-Frame-Options: DENYLocation: http://192.168.0.104:9090/user.html?force-authn=trueContent-Length: 0Date: Sat, 22 Oct 2022 10:30:12 GMTConnection: close
```

This step sends a total of three parameters:

- SAMLResponse: The response content sent to the SP after the IDP authenticates the user successfully

- SigAlg: Signature algorithm, here is to use HTTP-POST to transmit data content, in order to ensure that the received data has not been modified, sign the bunch of strings of SAMLResponse

- KeyInfo: SP's public key, IDP uses its own private key to sign the bunch of strings in SAMLResponse, and then transmits its own public key

When the SP verifies the AuthnResponse successfully, it will normally display the accessed services. Here's a look at the decoded and formatted content of AuthnResponse:

```
<?xml version="1.0" encoding="utf-8"?><saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xs="http://www.w3.org/2001/XMLSchema" Destination="http://192.168.0.104:9090/saml/SSO" ID="_c50c243f-a606-4a43-9486-eaec152c2c11" InResponseTo="ahgg4a45deh9i67h0f2iedga0755g" IssueInstant="2022-10-22T10:30:12.544Z" Version="2.0"> <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://mock-idp</saml2:Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <ds:Reference URI="#_c50c243f-a606-4a43-9486-eaec152c2c11"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs"></ec:InclusiveNamespaces> </ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue>f4BTE7H1QRBOmC1nRpmw0sOFgDk+uLgG7q/cMhkiD5o=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>Me01OUam5leJF4wSPeM3q+B+mKmwJRULaOY79hXwxqUbDPmwlSJb+1tZ1+nYtiNUEkYudPXZOkf8SdlUhDUKILvtwfogXTJletWwNVO0y6hKHXqmnSazKZeR+tk1bDa5/Jt2GIwZQNfA3aE1BRNiJedJBLw91AO02ngEnRXVctVtU4XwHlrXbTUacd44+hDrWBonQbwRf0FqRYve3B4JyubJP02kfg/tHa9T7WOsC/hOhKg+W6TG32K80mtBxY50B5FAhHjYD5YqDZ7FU/gNAyypj8UXlM0ot7n6oq/XvcuYL9/0C0ze3U/vesNs8LC1j7yCkRQyxAlylIHRbv8Akw==</ds:SignatureValue> <ds:KeyInfo> <ds:X509Data> <ds:X509Certificate>MIIDEzCCAfugAwIBAgIJAKoK/heBjcOYMA0GCSqGSIb3DQEBBQUAMCAxHjAcBgNVBAoMFU9yZ2Fu aXphdGlvbiwgQ049T0lEQzAeFw0xNTExMTExMDEyMTVaFw0yNTExMTAxMDEyMTVaMCAxHjAcBgNV BAoMFU9yZ2FuaXphdGlvbiwgQ049T0lEQzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB ANBGwJ/qpTQNiSgUglSE2UzEkUow+wS8r67etxoEhlzJZfgK/k5TfG1wICDqapHAxEVgUM10aBHR ctNocA5wmlHtxdidhzRZroqHwpKy2BmsKX5Z2oK25RLpsyusB1KroemgA/CjUnI6rIL1xxFn3KyO Fh1ZBLUQtKNQeMS7HFGgSDAp+sXuTFujz12LFDugX0T0KB5a1+0l8y0PEa0yGa1oi6seONx849ZH xM0PRvUunWkuTM+foZ0jZpFapXe02yWMqhc/2iYMieE/3GvOguJchJt6R+cut8VBb6ubKUIGK7pm oq/TB6DVXpvsHqsDJXechxcicu4pdKVDHSec850CAwEAAaNQME4wHQYDVR0OBBYEFK7RqjoodSYV XGTVEdLf3kJflP/sMB8GA1UdIwQYMBaAFK7RqjoodSYVXGTVEdLf3kJflP/sMAwGA1UdEwQFMAMB Af8wDQYJKoZIhvcNAQEFBQADggEBADNZkxlFXh4F45muCbnQd+WmaXlGvb9tkUyAIxVL8AIu8J18 F420vpnGpoUAE+Hy3evBmp2nkrFAgmr055fAjpHeZFgDZBAPCwYd3TNMDeSyMta3Ka+oS7GRFDeP kMEm+kH4/rITNKUF1sOvWBTSowk9TudEDyFqgGntcdu/l/zRxvx33y3LMG5USD0x4X4IKjRrRN1B bcKgi8dq10C3jdqNancTuPoqT3WWzRvVtB/q34B7F74/6JzgEoOCEHufBMp4ZFu54P0yEGtWfTwT zuoZobrChVVBt4w/XZagrRtUCDNwRpHNbpjxYudbqLqpi1MQpV9oht/BpTHVJG2i0ro=</ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </ds:Signature> <saml2p:Status> <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> </saml2p:Status> <saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_b3a92133-c190-4972-8918-d6a58a75abb4" IssueInstant="2022-10-22T10:30:12.549Z" Version="2.0"> <saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://mock-idp</saml2:Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <ds:Reference URI="#_b3a92133-c190-4972-8918-d6a58a75abb4"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs"></ec:InclusiveNamespaces> </ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue>uQjVT+t142IInUWHcPdNka2xP46+gUNx+W0lfzs2fB8=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>dosUeZ+/7/sG4mbWGXmUW6yi2hlzx00REmVd1tvnIjm10dbzIvzfjJGW3yZ8FPW6Vj/ZCW/bmZY/vKSOO3T3S2XCPiKPERS5Z/4LILh2hEkWSIGehXTfmDxwsCnyDOK1Ejy7Exjt8TbMWiD9pDQKXiGykXnroa8I+KI9MHMKdP13SlxZuHD93lmwmapXax6cw4Zm8MB1v9CDgUfFRV4jagvTYNqrKVt7emBbnc2xxQtiaLd3q6NNQgUXNAS5W1BoQRJwL3CjJ72sPTYQxOHdqqcLQNjMnpRX7Rdq80e8ddz63kfVkl0UpRioYKQTFp8S6e2r1CoIOjM0pa3heNkRsw==</ds:SignatureValue> </ds:Signature> <saml2:Subject> <saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">wewe</saml2:NameID> <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <saml2:SubjectConfirmationData InResponseTo="ahgg4a45deh9i67h0f2iedga0755g" NotOnOrAfter="2022-10-22T18:30:12.546Z" Recipient="http://192.168.0.104:9090/saml/SSO"/> </saml2:SubjectConfirmation> </saml2:Subject> <saml2:Conditions NotBefore="2022-10-22T10:27:12.546Z" NotOnOrAfter="2022-10-22T10:33:12.546Z"> <saml2:AudienceRestriction> <saml2:Audience>http://mock-sp</saml2:Audience> </saml2:AudienceRestriction> </saml2:Conditions> <saml2:AuthnStatement AuthnInstant="2022-10-22T10:30:12.547Z"> <saml2:AuthnContext> <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef> <saml2:AuthenticatingAuthority>http://mock-idp</saml2:AuthenticatingAuthority> </saml2:AuthnContext> </saml2:AuthnStatement> <saml2:AttributeStatement> <saml2:Attribute Name="urn:mace:dir:attribute-def:displayName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John Doe</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:dir:attribute-def:uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">wewe</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:dir:attribute-def:cn" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John Doe</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:dir:attribute-def:sn" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Doe</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:dir:attribute-def:eduPersonPrincipalName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">j.doe@example.com</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:dir:attribute-def:givenName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:dir:attribute-def:mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">j.doe@example.com</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:terena.org:attribute-def:schacHomeOrganizationType" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">ererer</saml2:AttributeValue> </saml2:Attribute> <saml2:Attribute Name="urn:mace:terena.org:attribute-def:schacHomeOrganization" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">example.com</saml2:AttributeValue> </saml2:Attribute> </saml2:AttributeStatement> </saml2:Assertion></saml2p:Response>
```

Response has an additional InResponseTo attribute. This value is the ID value of the previous AuthnRequest, and then the first sub-Signature tag has the same meaning as AuthnRequest. Here are the other tags.

#### Status

The sign of the result of the IDP authentication user, here is success, indicating that the user authentication is successful.

#### Assertion

Assertion means assertion, which contains some basic information and attributes of the user.

The meaning of the Issuer tag contained in it is the same as that of AuthnRequest, and the Signature is similar, but the content of the signature is different. You will see which part of the signature is signed in the subsequent code detailed analysis.

#### Subject

- NameID: Identifier, where the Format attribute is unspecified, indicating that the IdP defines a format for it, and it is assumed that the SP knows how to parse the format data response from the IdP. For example, the IdP gives a format data "UserName=XXXXX Country=US", and the SP gets the assertion that the UserName can be parsed to be "XXXXX". Here we are just a character username string format, indicating that the username is wewe

- SubjectConfirmation: how the user authenticates, the bearer method used by the method here

- SubjectConfirmationData: InResponseTo indicates who to respond to, NotOnOrAfter indicates that it is valid before this, Recipient indicates the receiving endpoint

- Conditions: Limit the valid time of the Assertion, where the Audience-related tags are some information about the receiver

- AuthnStatement: idp uses information for user authentication, certification authority, etc.

- AttributeStatement: some attributes related to the user

## SAML SSO 

It is still the previous project. Here we focus on the generation of AuthnRequest generated by SP and AuthnResponse generated by IDP, and the processing of AuthnRequest received by IDP and AuthnResponse received by SP. The signature and digest, as well as some conversion and verification parts involved are the key points.

#### SP generates AuthnRequest

The call stack to the summary is as follows:

```
calculateDigest:719, Reference (org.apache.xml.security.signature)generateDigestValue:406, Reference (org.apache.xml.security.signature)generateDigestValues:206, Manifest (org.apache.xml.security.signature)sign:609, XMLSignature (org.apache.xml.security.signature)signObject:77, Signer (org.opensaml.xml.signature)signMessage:193, BaseSAML2MessageEncoder (org.opensaml.saml2.binding.encoding)doEncode:109, HTTPPostEncoder (org.opensaml.saml2.binding.encoding)encode:52, BaseMessageEncoder (org.opensaml.ws.message.encoder)sendMessage:224, SAMLProcessorImpl (org.springframework.security.saml.processor)sendMessage:42, ConfigurableSAMLProcessor (mujina.sp)sendMessage:148, AbstractProfileBase (org.springframework.security.saml.websso)sendAuthenticationRequest:107, WebSSOProfileImpl (org.springframework.security.saml.websso)initializeSSO:225, SAMLEntryPoint (org.springframework.security.saml)commence:152, SAMLEntryPoint (org.springframework.security.saml)sendStartAuthentication:215, ExceptionTranslationFilter
```

The call stack is the entire process of generating an AuthnRequest. Here we mainly look at the summary and which part is extracted:

[![](https://blogger.googleusercontent.com/img/a/AVvXsEjxSXVmQq3uCvCrtmL8nsGWFVlpBeWAmebr1wcDlEf5My50djdPnJxCBiSrJlWPm2Q-KRt-HCunRFfHw0fdM2v4pycnFfBnLafkPig5ms9VDzI4HLTdZIYeJlXZMpNSTjCK9zabiivHAkYYUzb_Cawfcpwhmzk_bW9Dc2RGBWZKMFfZb2Bo-GeHaLn97Q=w640-h364)](https://blogger.googleusercontent.com/img/a/AVvXsEjxSXVmQq3uCvCrtmL8nsGWFVlpBeWAmebr1wcDlEf5My50djdPnJxCBiSrJlWPm2Q-KRt-HCunRFfHw0fdM2v4pycnFfBnLafkPig5ms9VDzI4HLTdZIYeJlXZMpNSTjCK9zabiivHAkYYUzb_Cawfcpwhmzk_bW9Dc2RGBWZKMFfZb2Bo-GeHaLn97Q)
  

```
<saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="http://192.168.0.104:9090/saml/SSO" Destination="http://192.168.0.104:8080/SingleSignOnService" ForceAuthn="true" ID="a534936dfbc0a19e32g890f5f33i4ee" IsPassive="false" IssueInstant="2022-10-31T13:16:48.841Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"><saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">http://mock-sp</saml2:Issuer></saml2p:AuthnRequest>
```

The xml content is the content after two transforms:

[![](https://blogger.googleusercontent.com/img/a/AVvXsEh3ASljAwIjtpw_ICh7_ETyy2olDI5_R0tJcoCLxsjpgsU9oVr8ac6EvLA-5d4hi88gJqv18hYKk0yYJIlKpToIN2TJGol9u5FOM7WkllqJoAdbwZ20L8yC9-1QBNKSVDhyFyjE8JiL5-wwVvwciePJN-CUr7muQ_RRPsXpY78tOtl6Q1k6FJQCy8eWTQ=w640-h406)](https://blogger.googleusercontent.com/img/a/AVvXsEh3ASljAwIjtpw_ICh7_ETyy2olDI5_R0tJcoCLxsjpgsU9oVr8ac6EvLA-5d4hi88gJqv18hYKk0yYJIlKpToIN2TJGol9u5FOM7WkllqJoAdbwZ20L8yC9-1QBNKSVDhyFyjE8JiL5-wwVvwciePJN-CUr7muQ_RRPsXpY78tOtl6Q1k6FJQCy8eWTQ)
  

Algorithm="[http://www.w3.org/2000/09/xmldsig#enveloped-signature](http://www.w3.org/2000/09/xmldsig#enveloped-signature)"The converter will exclude the content of the Signature tag in the AuthnRequest, Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"normalize the xml (remove some operations such as comments) and compress it, and the final content is as above.

Then perform the SHA-256 digest algorithm on this part of the content:

[![](https://blogger.googleusercontent.com/img/a/AVvXsEinj9Ft266fsjm5WbzjiBxCfY1izY_g57sNkF3s76caQFnbtIkCIIzUGu0iMNzxeWxLS1T3tw6Fhlr1OAJWKHO1lMu_SZj85DYGJLpF7uOsX9q7k-it2ZxxKS-UppucFypcyk3aDPkd9vn1Oj6L_qRKfs036jWyLYMCXuCRDYPKN7eZKHVs5Umnr_kGJw=w640-h358)](https://blogger.googleusercontent.com/img/a/AVvXsEinj9Ft266fsjm5WbzjiBxCfY1izY_g57sNkF3s76caQFnbtIkCIIzUGu0iMNzxeWxLS1T3tw6Fhlr1OAJWKHO1lMu_SZj85DYGJLpF7uOsX9q7k-it2ZxxKS-UppucFypcyk3aDPkd9vn1Oj6L_qRKfs036jWyLYMCXuCRDYPKN7eZKHVs5Umnr_kGJw)
  

Subsequent signature, the call stack at the signature is as follows:

```
engineSign:190, RSASignature (sun.security.rsa)engineSign:1235, Signature$Delegate (java.security)sign:598, Signature (java.security)engineSign:133, SignatureBaseRSA (org.apache.xml.security.algorithms.implementations)sign:174, SignatureAlgorithm (org.apache.xml.security.algorithms)sign:628, XMLSignature (org.apache.xml.security.signature)signObject:77, Signer (org.opensaml.xml.signature)signMessage:193, BaseSAML2MessageEncoder (org.opensaml.saml2.binding.encoding)doEncode:109, HTTPPostEncoder (org.opensaml.saml2.binding.encoding)encode:52, BaseMessageEncoder (org.opensaml.ws.message.encoder)sendMessage:224, SAMLProcessorImpl (org.springframework.security.saml.processor)sendMessage:42, ConfigurableSAMLProcessor (mujina.sp)sendMessage:148, AbstractProfileBase (org.springframework.security.saml.websso)sendAuthenticationRequest:107, WebSSOProfileImpl
```

[![](https://blogger.googleusercontent.com/img/a/AVvXsEjLw5cn52maEfcpTez0lXgDTzyqFmeaq86tBOS3mQUluaDcb2v6BB0UuS1QeEqu1jCTgURGvUVLx6Pu92_uof-T-Q4lWogDUwksx2byXEnq25Kl3v4BdzhqMYYmBqim6VS0jjHsWkSBXlpmN7FgCFd2ZQwZvL7e0xVudjyvuV5iuFuW5wbD04ABkVvCZg=w640-h358)](https://blogger.googleusercontent.com/img/a/AVvXsEjLw5cn52maEfcpTez0lXgDTzyqFmeaq86tBOS3mQUluaDcb2v6BB0UuS1QeEqu1jCTgURGvUVLx6Pu92_uof-T-Q4lWogDUwksx2byXEnq25Kl3v4BdzhqMYYmBqim6VS0jjHsWkSBXlpmN7FgCFd2ZQwZvL7e0xVudjyvuV5iuFuW5wbD04ABkVvCZg)
  

Use the SP's private key (configured in the application.yml file) to sign SingedInfo:

```
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></ds:SignatureMethod><ds:Reference URI="#a5856d7b1876hii3i40cda0c3fc38h"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod><ds:DigestValue>UEOuyyx4dWr3X0XoQryWQfSzNpXleQ5zSg9LayAEX7E=</ds:DigestValue></ds:Reference></ds:SignedInfo>
```

After these processes, the xml of the AuthnRequest you see is what you saw in the previous packet capture and decoding:

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWIpa7dpsYaAuvP9bzyDc7SGyn0bOJS8x_H8VC8X-l602TBzqZGcLwsOFEI_cHwlSVdMl7G_NKojQrwNNIQhyK1UqpST2M0ZXHMVUk852SjYTGwtfCyGJj_ciSGtiUPkMpcql8ufoXGGyxJAvYUrkV57rTMWjGk3zNZi_WzYWeujK-Ug1-fMLkVv4otg/w640-h382/331e950b-fd20-4987-b149-61ce5d5b24d1.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWIpa7dpsYaAuvP9bzyDc7SGyn0bOJS8x_H8VC8X-l602TBzqZGcLwsOFEI_cHwlSVdMl7G_NKojQrwNNIQhyK1UqpST2M0ZXHMVUk852SjYTGwtfCyGJj_ciSGtiUPkMpcql8ufoXGGyxJAvYUrkV57rTMWjGk3zNZi_WzYWeujK-Ug1-fMLkVv4otg/s2400/331e950b-fd20-4987-b149-61ce5d5b24d1.png)

  

Finally, there is an http post that transmits base64 encoding, so what you see in the capture is also base64 encoding.

### IDP receives AuthnRequest processing

The mujina.idp.SAMLMessageHandler#extractSAMLMessageContextAuthnRequest sent by the SP is extracted and verified in:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9l9WoOv4AGHE9I2Pu4ul1hg_Og42PUargMWajMkjqPprj7LIfEQlqrw20uX3HYkfYseMRCOe-JvWR07LDigBG2f7W3JKJt466Dq8hSY0__iOJ6_U1AZDcYgzlcwwAcQFKcDTmdtEvoXabS9JZqr-FMiyqhGD6wzSxY1dkz3TyOHZSAUOBrp9VIh0tGg/w640-h362/7e4f8b3a-a171-49ca-943d-dfdfba928f10.png)

The security policy for AuthnRequest verification only detects whether the IssueInstant has expired, and there are no other policies. Then there is validatorSuites detection. You can see that there are two types of validators, each with specific validators corresponding to multiple labels. However, the test found that the IDP did not perform certificate verification, signature verification, and digest verification on AuthnRequest.

### IDP generates AuthnResponse

To sign the Assertion, the call stack is as follows:

```
calculateDigest:719, Reference (org.apache.xml.security.signature)generateDigestValue:406, Reference (org.apache.xml.security.signature)generateDigestValues:206, Manifest (org.apache.xml.security.signature)sign:609, XMLSignature (org.apache.xml.security.signature)signObject:77, Signer (org.opensaml.xml.signature)signAssertion:153, SAMLBuilder (mujina.saml)sendAuthnResponse:123, SAMLMessageHandler (mujina.idp)doSSO:77, SsoController (mujina.idp)singleSignOnServicePost:55, SsoController (mujina.idp)
```

The summary is as follows:

 ![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqeEfxPgKesoIJyyNfIRv_84iLCi7LZBhVbvMngOvWNgoNGng9cakKsO8PC1kwpLknk7rv867e0R7iS5nhG0UnG5hmY_SwTbi_lzhl7PM-BxFGxTQzwKG0Dgb9-1L6HDl5TAm02GRMMl1PtEJWgQrHfrdcoILTB-56jwqAlOXxlF3YGunV2wWzG9TiXQ/w640-h338/6c8d3fbc-6eb7-4aae-b54f-dab0eb0f1d0e.png)

Abstract content:

```
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="_2f36cf83-55f7-415e-ba10-5d8188c58e31" IssueInstant="2022-11-01T14:00:37.681Z" Version="2.0"><saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://mock-idp</saml2:Issuer><saml2:Subject><saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">111111</saml2:NameID><saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml2:SubjectConfirmationData InResponseTo="a4ebjf264d9b7dja4hicahibc3d2jf8" NotOnOrAfter="2022-11-01T22:00:37.677Z" Recipient="http://192.168.0.104:9090/saml/SSO"></saml2:SubjectConfirmationData></saml2:SubjectConfirmation></saml2:Subject><saml2:Conditions NotBefore="2022-11-01T13:57:37.678Z" NotOnOrAfter="2022-11-01T14:03:37.678Z"><saml2:AudienceRestriction><saml2:Audience>http://mock-sp</saml2:Audience></saml2:AudienceRestriction></saml2:Conditions><saml2:AuthnStatement AuthnInstant="2022-11-01T14:00:37.678Z"><saml2:AuthnContext><saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef><saml2:AuthenticatingAuthority>http://mock-idp</saml2:AuthenticatingAuthority></saml2:AuthnContext></saml2:AuthnStatement><saml2:AttributeStatement><saml2:Attribute Name="urn:mace:dir:attribute-def:displayName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John Doe</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">111111</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:oasis:names:tc:SAML:attribute:subject-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">sdsdsdsd</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:cn" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John Doe</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:sn" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Doe</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:eduPersonPrincipalName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">j.doe@example.com</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:givenName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">j.doe@example.com</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:terena.org:attribute-def:schacHomeOrganization" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">example.com</saml2:AttributeValue></saml2:Attribute></saml2:AttributeStatement></saml2:Assertion>
```

Here also uses the same transform algorithm as the previous SP generated AuthnRequest, so the Signature tag is excluded and normalized. SingedInfo will be signed later, in the same way as the AuthnRequest signature method, and the private key of the signature is configured in the application.yml file.

The Response tag will be digested and signed later:

```
calculateDigest:719, Reference (org.apache.xml.security.signature)generateDigestValue:406, Reference (org.apache.xml.security.signature)generateDigestValues:206, Manifest (org.apache.xml.security.signature)sign:609, XMLSignature (org.apache.xml.security.signature)signObject:77, Signer (org.opensaml.xml.signature)signMessage:193, BaseSAML2MessageEncoder (org.opensaml.saml2.binding.encoding)signMessage:97, HTTPPostSimpleSignEncoder (org.opensaml.saml2.binding.encoding)doEncode:109, HTTPPostEncoder (org.opensaml.saml2.binding.encoding)encode:52, BaseMessageEncoder (org.opensaml.ws.message.encoder)sendAuthnResponse:145, SAMLMessageHandler (mujina.idp)doSSO:77, SsoController (mujina.idp)singleSignOnServicePost:55, SsoController (mujina.idp)
```

Abstract content:

```
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xs="http://www.w3.org/2001/XMLSchema" Destination="http://192.168.0.104:9090/saml/SSO" ID="_cac5ad52-f303-4356-b061-177f2bc4247c" InResponseTo="a4ebjf264d9b7dja4hicahibc3d2jf8" IssueInstant="2022-11-01T14:00:37.675Z" Version="2.0"><saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://mock-idp</saml2:Issuer><saml2p:Status><saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"></saml2p:StatusCode></saml2p:Status><saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_2f36cf83-55f7-415e-ba10-5d8188c58e31" IssueInstant="2022-11-01T14:00:37.681Z" Version="2.0"><saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://mock-idp</saml2:Issuer><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></ds:SignatureMethod><ds:Reference URI="#_2f36cf83-55f7-415e-ba10-5d8188c58e31"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></ds:Transform><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs"></ec:InclusiveNamespaces></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod><ds:DigestValue>XUf3yZB7j4wKYhl3K7Cp4dhfe/E0qKs3a8at+WjZ4Sc=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>i97x4tGq3whwLpqCIXRsLAy2pn0Wx0+yuHBreiMTwGm4Ekao3DfFvzSfPN5rMVATV59ntBonmUayrZExxsEyVm2xMSFBBEx0JO2stJ6dx2XXPgIiHr7tV5oH9V9wK5OwG1rAHRDMyg4IBCQzLlQrrBZwMCAu/G9FaSw0vBq/COSS8YBrW5/vBH4tS9/NdtTQiXiDoXnGSVYZvXtE0W5anNAUiDytmQhai4dy4Yim/rtKRjIXJVAWD9djCcuR7N//7MWRw1XjWlr1RTwm2TtVvGEY5FL5fVRjdsXJdcc7HNq3UUMQnBpY5RKe+xhri8oZqBc6dmyF96PEUY54EVTdWw==</ds:SignatureValue></ds:Signature><saml2:Subject><saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">111111</saml2:NameID><saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml2:SubjectConfirmationData InResponseTo="a4ebjf264d9b7dja4hicahibc3d2jf8" NotOnOrAfter="2022-11-01T22:00:37.677Z" Recipient="http://192.168.0.104:9090/saml/SSO"></saml2:SubjectConfirmationData></saml2:SubjectConfirmation></saml2:Subject><saml2:Conditions NotBefore="2022-11-01T13:57:37.678Z" NotOnOrAfter="2022-11-01T14:03:37.678Z"><saml2:AudienceRestriction><saml2:Audience>http://mock-sp</saml2:Audience></saml2:AudienceRestriction></saml2:Conditions><saml2:AuthnStatement AuthnInstant="2022-11-01T14:00:37.678Z"><saml2:AuthnContext><saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef><saml2:AuthenticatingAuthority>http://mock-idp</saml2:AuthenticatingAuthority></saml2:AuthnContext></saml2:AuthnStatement><saml2:AttributeStatement><saml2:Attribute Name="urn:mace:dir:attribute-def:displayName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John Doe</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">111111</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:oasis:names:tc:SAML:attribute:subject-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">sdsdsdsd</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:cn" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John Doe</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:sn" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Doe</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:eduPersonPrincipalName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">j.doe@example.com</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:givenName" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">John</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:dir:attribute-def:mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">j.doe@example.com</saml2:AttributeValue></saml2:Attribute><saml2:Attribute Name="urn:mace:terena.org:attribute-def:schacHomeOrganization" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">example.com</saml2:AttributeValue></saml2:Attribute></saml2:AttributeStatement></saml2:Assertion></saml2p:Response>
```

Note that the summary includes Assertion and all subtags of Assertion at this time, and the Signature tag in Response is not included in the summary because the same transform as before is applied . After signing the SingedInfo later, the final xml is what you see when you capture the packet.

### SP receives AuthnResponse processing

```
evaluate:51, BasicSecurityPolicy (org.opensaml.ws.security.provider)processSecurityPolicy:132, BaseMessageDecoder (org.opensaml.ws.message.decoder)decode:83, BaseMessageDecoder (org.opensaml.ws.message.decoder)decode:70, BaseSAML2MessageDecoder (org.opensaml.saml2.binding.decoding)retrieveMessage:105, SAMLProcessorImpl (org.springframework.security.saml.processor)retrieveMessage:172, SAMLProcessorImpl (org.springframework.security.saml.processor)attemptAuthentication:85, SAMLProcessingFilter (org.springframework.security.saml)doFilter:223, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication)doFilter:213, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication)
```

The main checkpoints are the two securityPolicies:

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7lnbAsnRvNfYJpWVOtiTkprp1YOxMQ_Gj4J-SD0xtY8GW23rYj1RTNTcBVm1UXvopoB3p8fzZMcj0C3NqBzF3je1am60LTx05ECEBwe9-9Es5VYZw-3lsbeFMVRO7LgwUwRwQsF1oTMaAjjEYIdgiKUT23eX3gxsZqJhsSw0-mTxBvdzP06yfKsF_AA/w640-h338/7d4469bb-840a-42e2-a959-b77961cc39cb.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7lnbAsnRvNfYJpWVOtiTkprp1YOxMQ_Gj4J-SD0xtY8GW23rYj1RTNTcBVm1UXvopoB3p8fzZMcj0C3NqBzF3je1am60LTx05ECEBwe9-9Es5VYZw-3lsbeFMVRO7LgwUwRwQsF1oTMaAjjEYIdgiKUT23eX3gxsZqJhsSw0-mTxBvdzP06yfKsF_AA/s2528/7d4469bb-840a-42e2-a959-b77961cc39cb.png)
  

SAML2HTTPPostSimpleSignRuleIt is to verify the signature of the data in the post transmission, which is easy to understand.

SAMLProtocolMessageXMLSignatureSecurityPolicyRuleIt is to verify the signature in the Saml Response. First, the certificate of the IDP will be extracted from the local ( classpath:metadata/mujina.local.idp.metadata.xmlthere is a configuration in it). Here, the certificate is not extracted from the passed Response, but the configured trusted certificate is used:

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8QQGEpX-uS_xaNvPIUxM1aGiHfx5Z73fv2sDE6EE4NlzkMxJ0O9BwRAxeGgdIY9tLW6Q7vHQR7Yy6uD543DZmdX2uh7ndYhymrOWrhxdwFsUCFftxYws5pNwLgG_FQ3nY4KfPYdKtfNXQAQCKKyOIfNx4fXHc7NzXO94F8NIBYrkRFaf0nk78HAy-dw/w640-h390/1330d369-9e30-46dc-9013-a3d7143b8c43.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8QQGEpX-uS_xaNvPIUxM1aGiHfx5Z73fv2sDE6EE4NlzkMxJ0O9BwRAxeGgdIY9tLW6Q7vHQR7Yy6uD543DZmdX2uh7ndYhymrOWrhxdwFsUCFftxYws5pNwLgG_FQ3nY4KfPYdKtfNXQAQCKKyOIfNx4fXHc7NzXO94F8NIBYrkRFaf0nk78HAy-dw/s2298/1330d369-9e30-46dc-9013-a3d7143b8c43.png)
  

The call stack is as follows:

```
checkSignatureValue:723, XMLSignature (org.apache.xml.security.signature)validate:69, SignatureValidator (org.opensaml.xml.signature)verifySignature:142, BaseSignatureTrustEngine (org.opensaml.xml.signature.impl)validate:100, BaseSignatureTrustEngine (org.opensaml.xml.signature.impl)validate:100, ExplicitKeySignatureTrustEngine (org.opensaml.xml.signature.impl)validate:49, ExplicitKeySignatureTrustEngine (org.opensaml.xml.signature.impl)evaluate:104, BaseTrustEngineRule (org.opensaml.ws.security.provider)evaluate:91, BaseTrustEngineRule (org.opensaml.ws.security.provider)doEvaluate:128, SAMLProtocolMessageXMLSignatureSecurityPolicyRule (org.opensaml.common.binding.security)evaluate:107, SAMLProtocolMessageXMLSignatureSecurityPolicyRule (org.opensaml.common.binding.security)evaluate:51, BasicSecurityPolicy (org.opensaml.ws.security.provider)processSecurityPolicy:132, BaseMessageDecoder (org.opensaml.ws.message.decoder)decode:83, BaseMessageDecoder (org.opensaml.ws.message.decoder)decode:70, BaseSAML2MessageDecoder (org.opensaml.saml2.binding.decoding)retrieveMessage:105, SAMLProcessorImpl (org.springframework.security.saml.processor)retrieveMessage:172, SAMLProcessorImpl (org.springframework.security.saml.processor)attemptAuthentication:85, SAMLProcessingFilter (org.springframework.security.saml)doFilter:223, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication)doFilter:213, AbstractAuthenticationProcessingFilter
```

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtU_AOWuJZ6lPw9ZUS6BXZpiLcJhSdL935ngwkvtodaGmv4EAEY3BHAsPu0ymEdHpCWD22kjXNlEWrb4J5N-6km6LraSQd1opUaolqNjM7nThLeY0rd0JuMdfPitfBz-FWHgVBXpE6X8LdHkPuMzt9EmZOOjWX-i7D1rLqIZhct_10B6IahROXXnWAbQ/w640-h358/e865014c-993b-4e76-b164-dfbe2520e381.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtU_AOWuJZ6lPw9ZUS6BXZpiLcJhSdL935ngwkvtodaGmv4EAEY3BHAsPu0ymEdHpCWD22kjXNlEWrb4J5N-6km6LraSQd1opUaolqNjM7nThLeY0rd0JuMdfPitfBz-FWHgVBXpE6X8LdHkPuMzt9EmZOOjWX-i7D1rLqIZhct_10B6IahROXXnWAbQ/s2525/e865014c-993b-4e76-b164-dfbe2520e381.png)
  

Extract the public key from the certificate, decrypt the SignatureValue with the public key, the decrypted value is the digest of Signedinfo, re-digest the Signedinfo, and compare it with the decrypted digest value. Next, the digest value of DigestValue will be compared. This value is the digest of the Response sub-tag Signature except for the Response sub-tag. The processing here is to recalculate the digest of this part, and then compare it with DigestValue:

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpwhx0DUm98HqJFVWUUmnk_3KOfvHj3tjmWDlGQTxqnTqDaNFVkeLA7gXLSMEdVXBRMm5loxgwNACZosnmFiTVPoA54wgTiLbHpBQnhIZMOB8BRTeJCOLEIZgdbZDPDTjv5rpARejXoRrmlbUCvKma77_Xi4c7PEA6vj6L-ULR4_XYebAIosvSCXY9Ig/w640-h326/1163fe87-2270-4f2e-aa15-2a4a08e97d7f.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpwhx0DUm98HqJFVWUUmnk_3KOfvHj3tjmWDlGQTxqnTqDaNFVkeLA7gXLSMEdVXBRMm5loxgwNACZosnmFiTVPoA54wgTiLbHpBQnhIZMOB8BRTeJCOLEIZgdbZDPDTjv5rpARejXoRrmlbUCvKma77_Xi4c7PEA6vj6L-ULR4_XYebAIosvSCXY9Ig/s2479/1163fe87-2270-4f2e-aa15-2a4a08e97d7f.png)
  

Of course, there are other verifications in the process, such as status verification.

Assertion will be verified later:

```
processAuthenticationResponse:301, WebSSOProfileConsumerImpl (org.springframework.security.saml.websso)authenticate:88, SAMLAuthenticationProvider (org.springframework.security.saml)authenticate:182, ProviderManager (org.springframework.security.authentication)attemptAuthentication:92, SAMLProcessingFilter (org.springframework.security.saml)doFilter:223, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication)doFilter:213, AbstractAuthenticationProcessingFilter (org.springframework.security.web.authentication)
```

[![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshlT2QDNEjK99bEHZ4VOhRzoojXqfaAmYUNSWfmVEWO7I_09K04XsG0uiPhOjw5Y1u2zxDse9XxnGUh7d7A7g3w4nxb5ZWht-8IMsBgORCsv6Xbqv9dSfu7r1LYHqJgIhRilW-UzG634-R-qwbqQyXNZff3qFMXRj2U9w10CXB0Szt1XEbXgaujqQ1Q/w640-h368/9e9d9454-8631-48d1-95b3-49a5b09a1357.png)](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgshlT2QDNEjK99bEHZ4VOhRzoojXqfaAmYUNSWfmVEWO7I_09K04XsG0uiPhOjw5Y1u2zxDse9XxnGUh7d7A7g3w4nxb5ZWht-8IMsBgORCsv6Xbqv9dSfu7r1LYHqJgIhRilW-UzG634-R-qwbqQyXNZff3qFMXRj2U9w10CXB0Szt1XEbXgaujqQ1Q/s2453/9e9d9454-8631-48d1-95b3-49a5b09a1357.png)

The verification method is consistent with the verification in Response. The certificate is configured locally instead of extracted from the Assertion. The Sianature and summary information in the Assertion are verified. It is also verified whether the Conditions are expired and whether the receiver in the Subject is The expected receiving endpoint and other verifications. After this series of verifications, a Credential is successfully returned, which contains some information of the user.

## Potential Security Risks in the SAML Verification Process

For signature issues, several issues mentioned in the article [Bypassing SAML 2.0 SSO with XML Signature Attacks feel good to illustrate the potential security implications of SAML](https://research.aurainfosec.io/bypassing-saml20-SSO/):

- Is a signature required? Some SAML implementations may judge whether the signature is carried from the request, and verify if it is carried, and not verify if it is not carried; or set a signature verification switch for developers to process, and developers may not be familiar with not turning on mandatory Verification etc.

- Was the signature verified? Although the generated AuthnRequest and Response are both signed, they did not perform signature verification when they received the SAML message

- Is the signature from the correct signer? X509Certificate contains the signer information. If there is no verification of whether it is a trusted certificate, then the certificate can be forged, and then the SAML message can be tampered with and re-signed

- Are the correct parts of the response being signed? There are only two signatures allowed by the SAML standard: Response and Assertion. No one has completely implemented the complex XML signature mechanism just to use SAML. This standard is generic, as are the implementations of the standard and their software libraries. Therefore, if some libraries do not verify the signature to the correct location, they can refer to the signature in different locations of the document, and make the recipient think that the signature is valid, causing XSW attacks

There is a SAML Raider plug-in in Burp, which can easily modify and forge SAML attacks, but sometimes it needs to be manually constructed, so it is necessary to understand the SAML processing flow.

In "Hacking the Cloud With SAML", a new attack surface is mentioned, which is the sequence of SignedInfo verification and digest verification. From the above section on the processing of AuthnResponse received by SP , we can see that the digest verification will be It is processed by transform first, and the calculation of the summary does not include the content of the Signature label, so if the summary verification is performed first, the operation space under the transforms is not limited, and the transform can be set arbitrarily. Two CVEs are also mentioned in this ppt (CVE-2022-34716, CVE-2022-34169), is a good example of transform attack.

## Problems

The OpenSAML used in Demo is relatively new. After testing, the processing of SP receiving AuthnResponse does not have the above problems. Its verification sequence is as follows:

- Use locally trusted certificates

- Check SignedInf

- checksum

So there is no problem with the verification of Response.

However, when IDP receives the AuthnRequest, it only checks whether the Instant has expired. However, because there is no process for processing signatures and digests, there is no possibility of other attacks. However, the IDP is the AssertionConsumerServiceURL obtained from the AuthnRequest, without checking whether it is expected, so when the Response is sent back later, it will cause an SSRF problem. This part of the processing should be done by the developer, not a library problem.

## Conclusion

Since a relatively new version of OpenSAML is used for debugging, some repair traces can be found during the debugging process, such as the repair of XSW and ds:Object element attacks. I saw SAML or SAML vulnerability reports before, because it involves signatures and digests, and it is also for XML signatures and digests. Is it digested and signed like strings? If not, how to sign XML and how to digest XML? , how to verify XML, how to tamper with forgery in my attack, what data needs to be changed, how to recalculate signature and digest, etc. Now it is very clear after debugging.

## References

- [https://research.aurainfosec.io/bypassing-saml20-SSO/](https://research.aurainfosec.io/bypassing-saml20-SSO/)

- [https://drive.google.com/file/d/1p1tTTIjg3RoJecYSU3CetvNw6-ZZdMXn/view](https://drive.google.com/file/d/1p1tTTIjg3RoJecYSU3CetvNw6-ZZdMXn/view)

- [https://github.com/OpenConext/Mujina](https://github.com/OpenConext/Mujina)

Source :- [https://tutorialboy24.blogspot.com/2022/11/a-brief-introduction-to-saml-security.html](https://tutorialboy24.blogspot.com/2022/11/a-brief-introduction-to-saml-security.html)