JR IO: Basic authentication not working for JSON (web) data adapter

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Basic authentication doesn't seem to work for the JSON (web) data adapter. It always returns 403, like it is not including the username and pass that I provided. I only get it working when I manually encode the username + pass and add them as an authorization header value.

What I need:

- Dynamically set the username, pass and request url when generating the report. I do so by defining the values and assigning them to properties using parameters as shown below:
    <parameter name="report_data_location" class="java.lang.String" evaluationTime="Early">
        <property name="net.sf.jasperreports.http.data.url"/>
        <defaultValueExpression><![CDATA["some_url"]]></defaultValueExpression>
    </parameter>
    <parameter name="report_data_user" class="java.lang.String" isForPrompting="false" evaluationTime="Early">
        <property name="net.sf.jasperreports.http.data.username"/>
        <defaultValueExpression><![CDATA["some_username"]]></defaultValueExpression>
    </parameter>
    <parameter name="report_data_pass" class="java.lang.String" isForPrompting="false" evaluationTime="Early">
        <property name="net.sf.jasperreports.http.data.password"/>
        <defaultValueExpression><![CDATA["some_pass"]]></defaultValueExpression>
    </parameter>

I have tested my endpoint using a third party client verifying the basic authentication security on this endpoint. I have also tried to set the username and pass directly into the data adapter but that also doesn't seem to work. It still returns the same 403 error.

Is there some setting or so that I still need to set before basic authentication is available or do I have a mistake in my setup?

Thanks in advanced,

Glen

glen.blokker_1's picture
Joined: May 18 2022 - 1:47am
Last seen: 3 weeks 1 day ago

0 Answers:

No answers yet
Feedback