diff --git a/open-banking-accelerator/accelerators/ob-apim/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2 b/open-banking-accelerator/accelerators/ob-apim/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2
index e26f6d73..92ee2255 100644
--- a/open-banking-accelerator/accelerators/ob-apim/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2
+++ b/open-banking-accelerator/accelerators/ob-apim/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2
@@ -313,6 +313,11 @@
{% else %}
sandbox
{% endif %}
+ {% if open_banking.dcr.registration.software_environment_identification.ssa_property_value_for_production is defined %}
+ {{open_banking.dcr.registration.software_environment_identification.ssa_property_value_for_production}}
+ {% else %}
+ production
+ {% endif %}
diff --git a/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.0.0-deployment.toml b/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.0.0-deployment.toml
index 42683bfc..ce52b689 100644
--- a/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.0.0-deployment.toml
+++ b/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.0.0-deployment.toml
@@ -433,7 +433,9 @@ roles = "AISP"
[open_banking.dcr.registration.software_environment_identification]
ssa_property_name = "software_environment"
+# If both below values doesnt match, Then software_environment is default to production.
ssa_property_value_for_sandbox = "sandbox"
+ssa_property_value_for_production = "production"
#============executors=========================
[[open_banking.gateway.openbanking_gateway_executors.type]]
diff --git a/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.1.0-deployment.toml b/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.1.0-deployment.toml
index 80e70a64..7d6e324a 100644
--- a/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.1.0-deployment.toml
+++ b/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.1.0-deployment.toml
@@ -433,7 +433,9 @@ roles = "AISP"
[open_banking.dcr.registration.software_environment_identification]
ssa_property_name = "software_environment"
+# If both below values doesnt match, Then software_environment is default to production.
ssa_property_value_for_sandbox = "sandbox"
+ssa_property_value_for_production = "production"
#============executors=========================
[[open_banking.gateway.openbanking_gateway_executors.type]]
diff --git a/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.2.0-deployment.toml b/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.2.0-deployment.toml
index 5fbe2415..a35ebf0c 100644
--- a/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.2.0-deployment.toml
+++ b/open-banking-accelerator/accelerators/ob-apim/repository/resources/wso2am-4.2.0-deployment.toml
@@ -437,7 +437,9 @@ roles = "AISP"
[open_banking.dcr.registration.software_environment_identification]
ssa_property_name = "software_environment"
+# If both below values doesnt match, Then software_environment is default to production.
ssa_property_value_for_sandbox = "sandbox"
+ssa_property_value_for_production = "production"
#============executors=========================
[[open_banking.gateway.openbanking_gateway_executors.type]]
diff --git a/open-banking-accelerator/accelerators/ob-is/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2 b/open-banking-accelerator/accelerators/ob-is/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2
index 7bbcdaac..443d0d31 100644
--- a/open-banking-accelerator/accelerators/ob-is/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2
+++ b/open-banking-accelerator/accelerators/ob-is/carbon-home/repository/resources/conf/templates/repository/conf/open-banking.xml.j2
@@ -466,6 +466,11 @@
{% else %}
sandbox
{% endif %}
+ {% if open_banking.dcr.registration.software_environment_identification.ssa_property_value_for_production is defined %}
+ {{open_banking.dcr.registration.software_environment_identification.ssa_property_value_for_production}}
+ {% else %}
+ production
+ {% endif %}
{% if open_banking.dcr.registration.grant_types.required is defined %}
diff --git a/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-5.11.0-deployment.toml b/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-5.11.0-deployment.toml
index 3c70545e..5db0a25c 100644
--- a/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-5.11.0-deployment.toml
+++ b/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-5.11.0-deployment.toml
@@ -408,7 +408,9 @@ name = "OpenBanking Ltd"
[open_banking.dcr.registration.software_environment_identification]
ssa_property_name = "software_environment"
+# If both below values doesnt match, Then software_environment is default to production.
ssa_property_value_for_sandbox = "sandbox"
+ssa_property_value_for_production = "production"
#Signature algorithm types that are allowed
#[[open_banking.signature_validation.allowed_algorithms]]
diff --git a/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.0.0-deployment.toml b/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.0.0-deployment.toml
index 133e0552..08eec470 100644
--- a/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.0.0-deployment.toml
+++ b/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.0.0-deployment.toml
@@ -408,7 +408,9 @@ name = "OpenBanking Ltd"
[open_banking.dcr.registration.software_environment_identification]
ssa_property_name = "software_environment"
+# If both below values doesnt match, Then software_environment is default to production.
ssa_property_value_for_sandbox = "sandbox"
+ssa_property_value_for_production = "production"
#Signature algorithm types that are allowed
#[[open_banking.signature_validation.allowed_algorithms]]
diff --git a/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.1.0-deployment.toml b/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.1.0-deployment.toml
index a14e9525..aab5c780 100644
--- a/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.1.0-deployment.toml
+++ b/open-banking-accelerator/accelerators/ob-is/repository/resources/wso2is-6.1.0-deployment.toml
@@ -408,7 +408,9 @@ name = "OpenBanking Ltd"
[open_banking.dcr.registration.software_environment_identification]
ssa_property_name = "software_environment"
+# If both below values doesnt match, Then software_environment is default to production.
ssa_property_value_for_sandbox = "sandbox"
+ssa_property_value_for_production = "production"
#Signature algorithm types that are allowed
#[[open_banking.signature_validation.allowed_algorithms]]
diff --git a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/config/OpenBankingConfigParser.java b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/config/OpenBankingConfigParser.java
index 776e8263..c3df4d3b 100644
--- a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/config/OpenBankingConfigParser.java
+++ b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/config/OpenBankingConfigParser.java
@@ -1419,6 +1419,18 @@ public String getSoftwareEnvIdentificationSSAPropertyValueForSandbox() {
OpenBankingConstants.DCR_SOFTWARE_ENV_IDENTIFICATION_VALUE_FOR_SANDBOX);
}
+ /**
+ * Method to get software environment identification value for production in SSA.
+ *
+ * @return String software environment identification value for production.
+ */
+ public String getSoftwareEnvIdentificationSSAPropertyValueForProduction() {
+ return getConfigElementFromKey(
+ OpenBankingConstants.DCR_SOFTWARE_ENV_IDENTIFICATION_VALUE_FOR_PRODUCTION) == null ?
+ "production" : (String) getConfigElementFromKey(
+ OpenBankingConstants.DCR_SOFTWARE_ENV_IDENTIFICATION_VALUE_FOR_PRODUCTION);
+ }
+
/**
* Get config related for checking whether PSU is a federated user or not.
*
diff --git a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/constant/OpenBankingConstants.java b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/constant/OpenBankingConstants.java
index e29c00b9..6831a70c 100644
--- a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/constant/OpenBankingConstants.java
+++ b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/constant/OpenBankingConstants.java
@@ -66,6 +66,8 @@ public class OpenBankingConstants {
"DCR.RegistrationRequestParams.SoftwareEnvironmentIdentification.PropertyName";
public static final String DCR_SOFTWARE_ENV_IDENTIFICATION_VALUE_FOR_SANDBOX =
"DCR.RegistrationRequestParams.SoftwareEnvironmentIdentification.PropertyValueForSandbox";
+ public static final String DCR_SOFTWARE_ENV_IDENTIFICATION_VALUE_FOR_PRODUCTION =
+ "DCR.RegistrationRequestParams.SoftwareEnvironmentIdentification.PropertyValueForProduction";
public static final String APIM_APPCREATION = "DCR.APIMRESTEndPoints.AppCreation";
public static final String APIM_KEYGENERATION = "DCR.APIMRESTEndPoints.KeyGeneration";
diff --git a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/util/OpenBankingUtils.java b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/util/OpenBankingUtils.java
index 669fa0ec..d8c68a9a 100644
--- a/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/util/OpenBankingUtils.java
+++ b/open-banking-accelerator/components/com.wso2.openbanking.accelerator.common/src/main/java/com/wso2/openbanking/accelerator/common/util/OpenBankingUtils.java
@@ -69,6 +69,8 @@ public static String getSoftwareEnvironmentFromSSA(String softwareStatement) thr
.getSoftwareEnvIdentificationSSAPropertyName();
String sandboxEnvIdentificationValue = OpenBankingConfigParser.getInstance()
.getSoftwareEnvIdentificationSSAPropertyValueForSandbox();
+ String prodEnvIdentificationValue = OpenBankingConfigParser.getInstance()
+ .getSoftwareEnvIdentificationSSAPropertyValueForProduction();
String softwareEnvironment = IdentityConstants.PRODUCTION;
// decode software statement and get softwareEnvironment
JSONObject softwareStatementBody = JWTUtils.decodeRequestJWT(softwareStatement, "body");
@@ -76,6 +78,9 @@ public static String getSoftwareEnvironmentFromSSA(String softwareStatement) thr
if (softwareEnvironmentValue != null &&
softwareEnvironmentValue.toString().equalsIgnoreCase(sandboxEnvIdentificationValue)) {
softwareEnvironment = IdentityConstants.SANDBOX;
+ } else if (softwareEnvironmentValue != null &&
+ softwareEnvironmentValue.toString().equalsIgnoreCase(prodEnvIdentificationValue)) {
+ softwareEnvironment = IdentityConstants.PRODUCTION;
}
return softwareEnvironment;
}