AhmadZuwari
AhmadZuwari

Reputation: 21

lucee saml auth request not recognized by firefox saml tracer

Using example below why my saml request not recognized by firefox saml tracer ?


<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>

this is what saml tracer show

saml tracer without SAML tab

i am expecting saml tracer would look like this

saml tracer with SAML tab

what is the correct way to do this ?

Upvotes: 1

Views: 127

Answers (0)

Related Questions