authentication extention not working in Azure Function



  • Hello. I'm trying to get started with jsreport in azure functions. And it returns pdf's and all that works. I can edit my templates locally and that works too, I can even set a password here and it is honored.

    However when I set a password in my production config file which is the one used when initializing jsreport authentication is not honored. It still let me extract pdfs even with the wrong password.

    Is there something special about authentication on Azure Functions?

    "extensions": {
            "licensing": {
                "useSavedLicenseInfo": false
            },
            "authentication": {
                "enabled": true,
                "cookieSession": {
                    "secret": "biugofdgbhiufdsh"
                },
                "admin": {
                    "username" : "exampleUser",
                    "password": "password"
                }
            },
            "authorization": {
                "enabled": false
            },
            "cli": {
                "enabled": false
            },
            "express": {
                "enabled": false
            },
            "freeze": {
                "enabled": false
            },
            "fs-store": {
                "dataDirectory": "/tmp/data"
            },
            "import-export": {
                "enabled": false
            },
            "public-templates": {
                "enabled": false
            },
            "sample-template": {
                "enabled": false
            },
            "scheduling": {
                "enabled": false
            },
            "studio": {
                "enabled": false
            },
            "studio-theme-dark": {
                "enabled": false
            },
            "tags": {
                "enabled": false
            },
            "version-control": {
                "enabled": false
            }
        }
    


  • Do you use the Azure functions like this?
    https://jsreport.net/learn/azure-functions-serverless

    If that is the case, the authentication isn't applied, because you use jsreport directly using jsreport.render directly and not jsreport HTTP endpoints which are authenticated.



  • Thank you for the clarity @jan_blaha

    I've implemented basic authentication directly in the node js code before I run jsreport now. It works fine, even with the jsreport .net SDK as it also uses basic auth on the API requests.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.