无法使用Jmeter在SAML响应主体中捕获变量

时间:2016-04-25 11:57:37

标签: jmeter saml

我有关于如何在jmeter中提取SAML响应的问题,我按照这些步骤但是它没有成功,我不知道问题出在哪里: - 当我有登录页面时,我发送邮件请求给Idp提供商以验证我(我给他,用户名和密码),之后我会得到这样的SAML响应:

PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIENvbnNlbnQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjb25zZW50Om9idGFpbmVkIiBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9hc2Z2Mi1zYXJhaC1kZXYuY2ZhcHBzLnJlbmF1bHQuZnIvc2FtbCIgSUQ9ImlkYWVnaTQtT2ZVcHQzdDZNZVd2RmhVNG92TmZNIiBJblJlc3BvbnNlVG89IklEXzNjNjJkYzZhLTI5N2YtNDM2MS1iYTg3LWIxZjZmMWJmYTUzYSIgSXNzdWVJbnN0YW50PSIyMDE2LTA0LTI1VDExOjMzOjEwWiIgVmVyc2lvbj0iMi4wIj48c2FtbDpJc3N1ZXI+aHR0cHM6Ly92aXJ0dWFsODcyLmxhYnRlY2gucGxzLnJlbmF1bHQuZnI6ODQ0My9uaWRwL3NhbWwyL21ldGFkYXRhPC9zYW1sOklzc3Vlcj48c2FtbHA6U3RhdHVzPjxzYW1scDpTdGF0dXNDb2RlIFZhbHVlPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6c3RhdHVzOlN1Y2Nlc3MiLz48L3NhbWxwOlN0YXR1cz48c2FtbDpBc3NlcnRpb24gSUQ9Imlkb0VBYWlPSnJ1RDBsdkFGdmNQR1R4QTRHWlY4IiBJc3N1ZUluc3RhbnQ9IjIwMTYtMDQtMjVUMTE6MzM6MTFaIiBWZXJzaW9u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jxzYW1sOkF0dHJpYnV0ZSB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIE5hbWU9IlJvbGUxIiBOYW1lRm9ybWF0PSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXR0cm5hbWUtZm9ybWF0OnVuc3BlY2lmaWVkIj48c2FtbDpBdHRyaWJ1dGVWYWx1ZSB4c2k6dHlwZT0ieHM6c3RyaW5nIj5hZG1pbjwvc2FtbDpBdHRyaWJ1dGVWYWx1ZT48L3NhbWw6QXR0cmlidXRlPjxzYW1sOkF0dHJpYnV0ZSB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIE5hbWU9InJlbmNvc3RjZW50ZXIiIE5hbWVGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphdHRybmFtZS1mb3JtYXQ6dW5zcGVjaWZpZWQiPjxzYW1sOkF0dHJpYnV0ZVZhbHVlIHhzaTp0eXBlPSJ4czpzdHJpbmciPkFBNTA4MTU8L3NhbWw6QXR0cmlidXRlVmFsdWU+PC9zYW1sOkF0dHJpYnV0ZT48L3NhbWw6QXR0cmlidXRlU3RhdGVtZW50Pjwvc2FtbDpBc3NlcnRpb24+PC9zYW1scDpSZXNwb25zZT4=

  • 在我使用的jmeter中:发布正则表达式提取器,我给他这个正则表达式来提取SAMLResponse但它不起作用: name ='SAMLResponse'value ='([^“] +)'

如果有人可以帮助我?

3 个答案:

答案 0 :(得分:0)

此响应是base64编码的。你需要base64解码这个响应。将响应保存在文件中,我们称之为idpResponse。

如果你有一个linux shell运行以下命令来解码响应:

 cat idpResponse | base64 -D

你的内容是:

  <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
  xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
  Consent="urn:oasis:names:tc:SAML:2.0:consent:obtained"
  Destination="https://asfv2-sarah-dev.cfapps.renault.fr/saml"
  ID="idaegi4-OfUpt3t6MeWvFhU4ovNfM"
  InResponseTo="ID_3c62dc6a-297f-4361-ba87-b1f6f1bfa53a"
  IssueInstant="2016-04-25T11:33:10Z" Version="2.0">
    <saml:Issuer>
    https://virtual872.labtech.pls.renault.fr:8443/nidp/saml2/metadata</saml:Issuer>
    <samlp:Status>
      <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
    </samlp:Status>
    <saml:Assertion ID="idoEAaiOJruD0lvAFvcPGTxA4GZV8"
    IssueInstant="2016-04-25T11:33:11Z" Version="2.0">
      <saml:Issuer>
      https://virtual872.labtech.pls.renault.fr:8443/nidp/saml2/metadata</saml: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/2000/09/xmldsig#rsa-sha1" />
          <ds:Reference URI="#idoEAaiOJruD0lvAFvcPGTxA4GZV8">
            <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/2000/09/xmldsig#sha1" />
            <ds:DigestValue>
            JCZ165dScExJIQRJ1G/WcBGrcrg=</ds:DigestValue>
          </ds:Reference>
        </ds:SignedInfo>
        <ds:SignatureValue>
        vRmUL8JH4zbU+nMwb9OuVJFYAchodke2E3HJzpbaQBwvFG3fzVMeyWsmgiZYOFG0R9N++yZod0gi
        6SEanBEFUMZNrT5YRaEyR6Y7N6Jp5VHS0/YUcjujt7LHOihEgHY7geNMGq9yNFH37aFH6U3xfP42
        qfuFAPHgwcLwBj1PgTwIm5FS05I8p/vUBbGb3RTjZlmotDvfXqHrelPsw6niPEi6I7SN7KNtVZUs
        tA4bRgTcufgKMEVUhwV+ZvIJDfSV1ZgbuUp9GzRxtUbJnkNPob9it4z5LxQLARtZ+h/XxLJe4kHq
        VaCUd4aZQGSikGujErPVUIxKQpGJzdOETKUS9Q==</ds:SignatureValue>
        <ds:KeyInfo>
          <ds:X509Data>
            <ds:X509Certificate>
            MIIFWTCCBEGgAwIBAgICAg4wDQYJKoZIhvcNAQEFBQAwRTEQMA4GA1UECgwHUmVuYXVsdDExMC8G
            A1UEAwwoQ2xhc3MgMSBBdXRoZW50aWNhdGlvbiBQcmUgUHJvZHVjdGlvbiBDQTAeFw0xNTA3MDIx
            NTQzMDRaFw0yNDExMTYxMDUwMjBaMEsxEDAOBgNVBAoMB1JlbmF1bHQxCzAJBgNVBAYTAkZSMSow
            KAYDVQQDDCF2aXJ0dWFsODcyLmxhYnRlY2gucGxzLnJlbmF1bHQuZnIwggEiMA0GCSqGSIb3DQEB
            AQUAA4IBDwAwggEKAoIBAQDZt4GCZUe8szuK3iM/C0S7udZU65kej3Pii9Bv2IH/htPLTgDgxX/b
            WLwUfCTRJ48IldsMeYjKqPeRAvNr9Dr/HXfHEG4sSopjIw0a0+GRQrwvycTlx0bN40CDlEQzaRxO
            awjf5YUXgCuvdY98F1vwpr1o8d4h3VQ0jUWCQZpdHMNz3FqxsCwpWz89JTjs7d7k/T9skgfPpc4R
            BXhNNV0DqT4pSLFBZijsNHgSpGsZ10+7PAd3NQyARbys/NthrR3VL7HLTJ7XcdJmSCJYf/3xtCkl
            XVrmBZC0eVGW2O6Au9PaG4EfFv/wpLuc5d1dpBEZFfqm8G1cGPF8FOkOxRn/AgMBAAGjggJLMIIC
            RzAdBgNVHQ4EFgQUcN9ay5TA5Ke6Z7clTMyAHYpNHvEwHwYDVR0jBBgwFoAUo7dspiMVtOjlt/9E
            Pq8/RHUFz3kwgewGA1UdIASB5DCB4TCB3gYKKwYBBAGqEQQQATCBzzBvBggrBgEFBQcCARZjaHR0
            cDovL2NybC5yZW5hdWx0LmZyL0NlcnRpZmljYXRpb25Qb2xpY2llcy9SZW5hdWx0SW50ZXJuYWwv
            Q2xhc3MxQXV0aGVudGljYXRpb25QcmVQcm9kdWN0aW9uQ0EucGRmMFwGCCsGAQUFBwICMFAaTlJl
            bmF1bHQgSW50ZXJuYWwgQ2xhc3MgMSBBdXRoZW50aWNhdGlvbiBQcmUgUHJvZHVjdGlvbiBDQSBD
            ZXJ0aWZpY2F0aW9uIFBvbGljeTARBglghkgBhvhCAQEEBAMCBsAwHQYDVR0lBBYwFAYIKwYBBQUH
            AwIGCCsGAQUFBwMBMA4GA1UdDwEB/wQEAwIF4DAlBgNVHREEHjAcgRpkaWRpZXIucm9tZWxvdEBy
            ZW5hdWx0LmNvbTBYBgNVHR8EUTBPME2gS6BJhkdodHRwOi8vY3JsLnJlbmF1bHQuZnIvQ1JML1Jl
            bmF1bHRJbnRlcm5hbC9DbGFzczFBdXRoUHJlUHJvZHVjdGlvbkNBLmNybDBTBggrBgEFBQcBAQRH
            MEUwQwYIKwYBBQUHMAGGN2h0dHA6Ly9jcmwucmVuYXVsdC5mci9vY3NwL1JlbmF1bHRJbnRlcm5h
            bFByZVByb2R1Y3Rpb24wDQYJKoZIhvcNAQEFBQADggEBAE1DcpWVnVN5bvZBqFkjUV1zQioU/yE0
            F6YVOn8NGvul3dgUInpDAu528CGU3mf4Wkwyg/AcicvuK+jbf6SNzuoqcCDjbqa6WaKFDHMgj1VD
            GrfYBw/WddNG/t8DNcaJbmvW68F1W0NL1DwVDgfAQ+pWd/s64fFssm8rdYkf9KwzLPXKYIn74Ybr
            +Ff+xfTXeU4aXkP57Z3IceoHVvgXmcByJA3jaY+Mt+c4At0sDgccozEK2XNXtN30ts0s2bxcU/NC
            7URFJN0FO6xG7YoH2ba3ItJUzQyds4fxWT1Z97ghpx4dz9c9uw0xbBXhpVtBVvn9oL9BP4uGcLZa
            ZveLyIM=</ds:X509Certificate>
          </ds:X509Data>
        </ds:KeyInfo>
      </ds:Signature>
      <saml:Subject>
        <saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
        NameQualifier="https://virtual872.labtech.pls.renault.fr:8443/nidp/saml2/metadata"
        SPNameQualifier="https://asfv2-sarah-dev.cfapps.renault.fr">
        p080145</saml:NameID>
        <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">

          <saml:SubjectConfirmationData InResponseTo="ID_3c62dc6a-297f-4361-ba87-b1f6f1bfa53a"
          NotOnOrAfter="2016-04-25T12:33:10Z"
          Recipient="https://asfv2-sarah-dev.cfapps.renault.fr/saml" />
        </saml:SubjectConfirmation>
      </saml:Subject>
      <saml:Conditions NotBefore="2016-04-25T11:28:11Z"
      NotOnOrAfter="2016-04-25T11:38:11Z">
        <saml:AudienceRestriction>
          <saml:Audience>
          https://asfv2-sarah-dev.cfapps.renault.fr</saml:Audience>
        </saml:AudienceRestriction>
      </saml:Conditions>
      <saml:AuthnStatement AuthnInstant="2016-04-25T11:33:10Z"
      SessionIndex="idoEAaiOJruD0lvAFvcPGTxA4GZV8">
        <saml:AuthnContext>
          <saml:AuthnContextClassRef>
          urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef>
          <saml:AuthnContextDeclRef>
          secure/name/password/uri</saml:AuthnContextDeclRef>
        </saml:AuthnContext>
      </saml:AuthnStatement>
      <saml:AttributeStatement>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="uid"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">

          <saml:AttributeValue xsi:type="xs:string">
          p080145</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="preferredLanguage"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">

          <saml:AttributeValue xsi:type="xs:string">
          FR</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="mail"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">

          <saml:AttributeValue xsi:type="xs:string">
          sarah.hadbi@renault.com</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="givenName"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">

          <saml:AttributeValue xsi:type="xs:string">
          Sarah</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="sn"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">

          <saml:AttributeValue xsi:type="xs:string">
          Hadbi</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="cn"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">

          <saml:AttributeValue xsi:type="xs:string">HADBI
          Sarah</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="renpersontype"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">

          <saml:AttributeValue xsi:type="xs:string">
          ou=catSTGR,ou=PersonTypes,ou=TechnicalData,o=renault</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="Role1"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">

          <saml:AttributeValue xsi:type="xs:string">
          admin</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        Name="rencostcenter"
        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">

          <saml:AttributeValue xsi:type="xs:string">
          AA50815</saml:AttributeValue>
        </saml:Attribute>
      </saml:AttributeStatement>
    </saml:Assertion>
  </samlp:Response>

答案 1 :(得分:0)

您的正则表达式name='SAMLResponse' value='([^"]+)'混合了引号类型:'"。您的匹配组会匹配&#34;任何不是"一次或多次的内容,然后是'。我怀疑您的模式与尾随'匹配,继续前进,然后无法找到结尾' ,因为它已经在 {{1}中匹配了它}。

如果您将此值传回另一个请求,那么您应该更改所有内容。否则,您必须执行Suresh Koya suggests

答案 2 :(得分:0)

使用正则表达式:

  

名=&#39; SAMLResponse&#39;值=&#39;([\ S \ S] +?)&#39;