代码之家  ›  专栏  ›  技术社区  ›  AhmadZuwari

firefoxsaml跟踪器无法识别luceesaml身份验证请求

  •  0
  • AhmadZuwari  · 技术社区  · 2 年前

    使用下面的示例,为什么我的saml请求未被firefox saml跟踪器识别?

    
    <cfset uid=createUUID()>
    <cfset setIssueIns=datetimeFormat(now(), "yyyy-MM-dd'T'HH:nn:ss'Z'")>
    
    <cfset samlRequestXml='<?xml version="1.0" encoding="UTF-8" standalone="no"?><saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
    AssertionConsumerServiceURL="http://yoursite/sso.cfm" Destination="https://youridp/sso" ForceAuthn="false" ID="#uid#" IsPassive="false" IssueInstant="#setIssueIns#" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"><saml2:Issuer>http://yoursite/sso</saml2:Issuer></saml2p:AuthnRequest>'>
    
    <cfscript>
    
        // write the request to a file
        fileWrite(expandPath("./temp/#uid#.xml"), samlRequestXml);
        
        // Use cfzip to compress the file
        cfzip(action="zip", file=expandPath("./temp/#uid#.zip"), source=expandPath("./temp/#uid#.xml"));
        
        // read the compressed data
        zipData = fileReadBinary(expandPath("./temp/#uid#.zip"));
        
        // Encode the compressed data
        encodedRequest = binaryEncode(zipData, "Base64");
        
        // URL encode the encoded data
        samlreq = urlEncodedFormat(encodedRequest, "UTF-8");
        
    </cfscript> 
    
    <cffile action="delete" file="./temp/#uid#.zip">
    <cffile action="delete" file="./temp/#uid#.xml">
    
    <br>
    <form name="form1" method="get" action="https://youridp/sso">
        <input type="hidden" name="SAMLRequest" value="<cfoutput>#samlreq#</cfoutput>">
        <input type="submit" name="submit" id="submit" value="send request">
    </form>
    
    

    这就是saml tracer显示的内容

    saml tracer without SAML tab

    我预计saml tracer会是这样的

    saml tracer with SAML tab

    正确的方法是什么?

    0 回复  |  直到 2 年前