admin管理员组

文章数量:1122832

I have deployed an application on the Cloud Run service. I have configured IAP and Identity Plateform for authentication to this app using SAML.

I want to automate authentication to this app for a specific user. I've created a Python script to reproduce the authentication workflow based on requests made by the Edge browser.

I've managed to automate authentication right up to the stage where I retrieve the SAML response generated by my IDP.

However, to send this SAML response, the IAP service relies on Firebase. It uses the Javascript method fireauth.oauthhelper.widget.initialize() to submit the SAML response.

<!DOCTYPE html>
<html>
    <head>
        <meta name=viewport content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <script type="text/javascript" src="experiments.js"></script>
        <script type="text/javascript" src="handler.js"></script>
        <script type="text/javascript" nonce="firebase-auth-helper">
            var POST_BODY = "SAMLResponse=SAMLRESPONSE_VALUE";
            fireauth.oauthhelper.widget.initialize();
        </script>
    </head>
    <body></body>
</html>

How do I submit this SAML response to Firebase via a Python script or API call?

本文标签: pythonAutomate SAML authentification with IAP and Cloud RunStack Overflow