Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,62 @@
<RequestGenerator>org.wso2.financial.services.accelerator.event.notifications.service.realtime.service.DefaultRealtimeEventNotificationRequestGenerator</RequestGenerator>
</Realtime>
</EventNotifications>
<DataPublishing>
<Enabled>true</Enabled>
<Username>admin</Username>
<Password>admin</Password>
<ServerURL>{tcp://localhost:7612}</ServerURL>
<AuthURL></AuthURL>
<!-- Allowed values: Thrift -->
<Protocol>Thrift</Protocol>
<PoolSize>10</PoolSize>
<QueueSize>32768</QueueSize>
<WorkerThreadCount>10</WorkerThreadCount>
<PoolWaitTimeMs>60000</PoolWaitTimeMs>
<FinancialServicesDataPublisher>org.wso2.financial.services.accelerator.data.publisher.common.FinancialServicesThriftDataPublisher</FinancialServicesDataPublisher>
<Thrift>
<PublishingTimeout>2000</PublishingTimeout>
<Streams>
<APIInvocationsEventStream>
<Attribute name="messageId" priority="1"/>
<Attribute name="consentId" priority="1"/>
<Attribute name="consumerId" priority="2"/>
<Attribute name="clientId" priority="3"/>
<Attribute name="userAgent" priority="4"/>
<Attribute name="statusCode" priority="5"/>
<Attribute name="statusMessage" priority="6"/>
<Attribute name="httpMethod" priority="7"/>
<Attribute name="responsePayloadSize" priority="8"/>
<Attribute name="electedResource" priority="9"/>
<Attribute name="apiName" priority="10"/>
<Attribute name="apiSpecVersion" priority="11"/>
<Attribute name="requestedTimestamp" priority="12"/>
</APIInvocationsEventStream>
<UserAuthenticationEventStream>
<Attribute name="userId" priority="1"/>
<Attribute name="authenticationStep" priority="2"/>
<Attribute name="authenticationStatus" priority="3"/>
<Attribute name="authenticationApproach" priority="4"/>
<Attribute name="timestamp" priority="5"/>
</UserAuthenticationEventStream>
<UserAuthorizationEventStream>
<Attribute name="userId" priority="1"/>
<Attribute name="consentId" priority="2"/>
<Attribute name="clientId" priority="3"/>
<Attribute name="requestUriKey" priority="4"/>
<Attribute name="authenticationStatus" priority="5"/>
<Attribute name="consentResource" priority="6"/>
<Attribute name="additionalDAuthFlowData" priority="7"/>
<Attribute name="userInteractionTime" priority="8"/>
<Attribute name="timestamp" priority="9"/>
</UserAuthorizationEventStream>
<ConsentLCEventStream>
<Attribute name="consentId" priority="1"/>
<Attribute name="consentDetails" priority="2"/>
<Attribute name="currentStatus" priority="3"/>
<Attribute name="previousStatus" priority="4"/>
</ConsentLCEventStream>
</Streams>
</Thrift>
</DataPublishing>
</Server>
Original file line number Diff line number Diff line change
Expand Up @@ -559,4 +559,117 @@
{% endif %}
</Security>
</ExtensionsEndpoint>
<Event>
{% if financial_services.event.queue_size is defined %}
<QueueSize>{{financial_services.event.queue_size}}</QueueSize>
{% else %}
<QueueSize>32768</QueueSize>
{% endif %}
{% if financial_services.event.worker_thread_count is defined %}
<WorkerThreadCount>{{financial_services.event.worker_thread_count}}</WorkerThreadCount>
{% else %}
<WorkerThreadCount>10</WorkerThreadCount>
{% endif %}
<EventExecutors>
{% if financial_services.event.event_executors is defined %}
{% for executor in financial_services.event.event_executors %}
<Executor class="{{executor.name}}" priority="{{executor.priority}}"/>
{% endfor %}
{% else %}
{% if financial_services.event.event_executor is defined %}
<Executor class="{{financial_services.event.event_executor}}"/>
{% else %}
<Executor class="org.wso2.financial.services.accelerator.common.event.executor.DefaultOBEventExecutor"/>
{% endif %}
Comment on lines +581 to +583
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all references to executor class names
rg "DefaultOBEventExecutor|DefaultFSEventExecutor" -t java -t xml -t jinja --no-heading -n

Repository: wso2/financial-services-accelerator

Length of output: 1453


🏁 Script executed:

#!/bin/bash
# Search for any definition or reference to DefaultOBEventExecutor
rg "class.*DefaultOBEventExecutor" --type java -n

Repository: wso2/financial-services-accelerator

Length of output: 61


Update executor class name to match actual implementation.

The template references DefaultOBEventExecutor at line 582, but this class does not exist in the codebase. The actual executor implementation is DefaultFSEventExecutor, which is the only executor class defined. Update line 582 to use the correct class name:

<Executor class="org.wso2.financial.services.accelerator.common.event.executor.DefaultFSEventExecutor"/>

This mismatch will cause runtime failures when the configuration is loaded.

🤖 Prompt for AI Agents
In
@financial-services-accelerator/accelerators/fs-is/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2
around lines 581-583, The executor class name in the template is incorrect:
replace the non-existent
org.wso2.financial.services.accelerator.common.event.executor.DefaultOBEventExecutor
with the actual implementation
org.wso2.financial.services.accelerator.common.event.executor.DefaultFSEventExecutor
so the configuration uses the correct executor class (update the <Executor
class="..."> entry to reference DefaultFSEventExecutor).

{% endif %}
</EventExecutors>
</Event>
<DataPublishing>
{% if financial_services.data_publishing.enable is defined %}
<Enabled>{{financial_services.data_publishing.enable}}</Enabled>
{% else %}
<Enabled>false</Enabled>
{% endif %}
<!-- Administrator username to login to the SI server for data publishing. -->
{% if financial_services.data_publishing.username is defined %}
<Username>{{financial_services.data_publishing.username}}</Username>
{% else %}
<Username>[email protected]@carbon.super</Username>
{% endif %}
<!-- Administrator password to login to the SI server for data publishing. -->
{% if financial_services.data_publishing.password is defined %}
<Password>{{financial_services.data_publishing.password}}</Password>
{% else %}
<Password>wso2123</Password>
{% endif %}
<!-- Server URL of the remote SI server used to collect statistics. Must
be specified in {protocol://hostname:port/} format. -->
{% if financial_services.data_publishing.server_url is defined %}
<ServerURL>{{financial_services.data_publishing.server_url}}</ServerURL>
{% else %}
<ServerURL>{tcp://ANALYTICS_HOSTNAME:7612}</ServerURL>
{% endif %}
{% if financial_services.data_publishing.auth_url is defined %}
<AuthURL>{{financial_services.data_publishing.auth_url}}</AuthURL>
{% endif %}
<!-- Allowed values: Thrift -->
{% if financial_services.data_publishing.protocol is defined %}
<Protocol>{{financial_services.data_publishing.protocol}}</Protocol>
{% else %}
<Protocol>Thrift</Protocol>
{% endif %}
{% if financial_services.data_publishing.pool_size is defined %}
<PoolSize>{{financial_services.data_publishing.pool_size}}</PoolSize>
{% else %}
<PoolSize>10</PoolSize>
{% endif %}
{% if financial_services.data_publishing.queue_size is defined %}
<QueueSize>{{financial_services.data_publishing.queue_size}}</QueueSize>
{% else %}
<QueueSize>32768</QueueSize>
{% endif %}
{% if financial_services.data_publishing.worker_thread_count is defined %}
<WorkerThreadCount>{{financial_services.data_publishing.worker_thread_count}}</WorkerThreadCount>
{% else %}
<WorkerThreadCount>10</WorkerThreadCount>
{% endif %}
{% if financial_services.data_publishing.pool_wait_time_Ms is defined %}
<PoolWaitTimeMs>{{financial_services.data_publishing.pool_wait_time_Ms}}</PoolWaitTimeMs>
{% else %}
<PoolWaitTimeMs>60000</PoolWaitTimeMs>
{% endif %}
{% if financial_services.data_publishing.financial_services_data_publisher is defined %}
<FinancialServicesDataPublisher>{{financial_services.data_publishing.financial_services_data_publisher}}</FinancialServicesDataPublisher>
{% else %}
<FinancialServicesDataPublisher>org.wso2.financial.services.accelerator.data.publisher.common.FinancialServicesThriftDataPublisher</FinancialServicesDataPublisher>
{% endif %}
{% if financial_services.data_publishing.protocol == "Thrift" or financial_services.data_publishing.protocol is not defined%}
<Thrift>
{% if financial_services.data_publishing.thrift.publishing_timeout is defined %}
<PublishingTimeout>{{financial_services.data_publishing.thrift.publishing_timeout}}</PublishingTimeout>
{% else %}
<PublishingTimeout>2000</PublishingTimeout>
{% endif %}
<Streams>
{% for stream in financial_services.data_publishing.thrift.stream %}
<{{stream.name}}>
{% for attribute in stream.attributes %}
{% if attribute.required is defined %}
{% set required = "{{attribute.required}}" %}
{% else %}
{% set required = "false" %}
{% endif %}
{% if attribute.type is defined %}
{% set type = "{{attribute.type}}" %}
{% else %}
{% set type = "string" %}
{% endif %}
Comment on lines +657 to +666
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Incorrect Jinja2 syntax in {% set %} blocks.

Using "{{attribute.required}}" inside a {% set %} statement will produce the literal string "{{attribute.required}}" rather than the attribute's value. Jinja2 variables should be referenced directly without mustache syntax inside control statements.

🔎 Proposed fix
                         {% if attribute.required is defined %}
-                                {% set required = "{{attribute.required}}" %}
+                                {% set required = attribute.required %}
                             {% else %}
                                 {% set required = "false" %}
                             {% endif %}
                             {% if attribute.type is defined %}
-                                {% set type = "{{attribute.type}}" %}
+                                {% set type = attribute.type %}
                             {% else %}
                                 {% set type = "string" %}
                             {% endif %}
🤖 Prompt for AI Agents
In
@financial-services-accelerator/accelerators/fs-is/carbon-home/repository/resources/conf/templates/repository/conf/financial-services.xml.j2
around lines 657-666, The {% set %} blocks are assigning the literal strings
"{{attribute.required}}" and "{{attribute.type}}"; change them to reference the
Jinja2 variables directly and without quotes/mustache syntax, e.g. use {% if
attribute.required is defined %}{% set required = attribute.required %}{% else
%}{% set required = false %}{% endif %} and similarly for attribute.type with {%
set type = attribute.type %} (or "string" as the fallback) so the variables
required and type receive the actual values.

<Attribute name="{{attribute.name}}" priority="{{attribute.priority}}" required="{{required}}" type="{{type}}"/>
{% endfor %}
</{{stream.name}}>
{% endfor %}
</Streams>
</Thrift>
{% endif %}

</Server>
Original file line number Diff line number Diff line change
Expand Up @@ -638,3 +638,163 @@ retry_function="EX"
circuit_breaker_open_timeout=500
pool_size=20
event_notification_request_generator="org.wso2.financial.services.accelerator.event.notifications.service.realtime.service.DefaultRealtimeEventNotificationRequestGenerator"

[financial_services.analytics.elk]
enabled = false

[financial_services.data_publishing]
enable = false
username="$ref{super_admin.username}@carbon.super"
password="$ref{super_admin.password}"
server_url = "{tcp://BI_HOSTNAME:7612}"
#auth_url = "{ssl://BI_HOSTNAME:7612}"
protocol = "Thrift"
pool_size = 10
queue_size = 32768
worker_thread_count = 10
pool_wait_time_Ms = 60000
financial_services_data_publisher = "org.wso2.financial.services.accelerator.data.publisher.FinancialServicesThriftDataPublisher"

[financial_services.data_publishing.thrift]
publishing_timeout = 2000
#data streams and their attributes with the priority order
[[financial_services.data_publishing.thrift.stream]]
name="UserAuthenticationEventStream"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="userId"
priority=1
[[financial_services.data_publishing.thrift.stream.attributes]]
name="authenticationStep"
priority=2
[[financial_services.data_publishing.thrift.stream.attributes]]
name="authenticationStatus"
priority=3
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="authenticationApproach"
priority=4
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="psuChannel"
priority=5
[[financial_services.data_publishing.thrift.stream.attributes]]
name="timestamp"
priority=6
required=true
type="long"

[[financial_services.data_publishing.thrift.stream]]
name="UserAuthorizationEventStream"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="consentId"
priority=1
[[financial_services.data_publishing.thrift.stream.attributes]]
name="requestUriKey"
priority=2
[[financial_services.data_publishing.thrift.stream.attributes]]
name="authStage"
priority=3
[[financial_services.data_publishing.thrift.stream.attributes]]
name="initiationRequestPayload"
priority=4
type="object"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="isReauthorization"
priority=5
type="boolean"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="isMultiauthorization"
priority=6
type="boolean"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="multiAuthUsers"
priority=7
[[financial_services.data_publishing.thrift.stream.attributes]]
name="userInteractionTime"
priority=8
type="long"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="timestamp"
priority=9
required=true
type="long"

[[financial_services.data_publishing.thrift.stream]]
name="ConsentLCEventStream"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="consentId"
priority=1
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="consentDetails"
priority=2
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="currentStatus"
priority=3
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="previousStatus"
priority=4
required=true

[[financial_services.data_publishing.thrift.stream]]
name="APIInvocationsEventStream"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="messageId"
priority=1
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="consentId"
priority=2
[[financial_services.data_publishing.thrift.stream.attributes]]
name="consumerId"
priority=3
[[financial_services.data_publishing.thrift.stream.attributes]]
name="clientId"
priority=4
[[financial_services.data_publishing.thrift.stream.attributes]]
name="userAgent"
priority=5
required=false
[[financial_services.data_publishing.thrift.stream.attributes]]
name="statusCode"
priority=6
required=true
type="int"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="statusMessage"
priority=7
required=false
[[financial_services.data_publishing.thrift.stream.attributes]]
name="httpMethod"
priority=8
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="responsePayloadSize"
priority=9
required=true
type="long"
[[financial_services.data_publishing.thrift.stream.attributes]]
name="electedResource"
priority=10
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="apiName"
priority=11
required=true
[[financial_services.data_publishing.thrift.stream.attributes]]
name="apiSpecVersion"
priority=12
required=false
[[financial_services.data_publishing.thrift.stream.attributes]]
name="requestTimestamp"
priority=13
required=true
type="long"

#===================for event==============================
[financial_services.event]
queue_size = 32768
worker_thread_count = 10
event_executor = "org.wso2.financial.services.accelerator.common.event.executor.DefaultFSEventExecutor"
Loading