Skip to content

Commit

Permalink
Merge branch 'master' into 4.3.0-dep-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
lasanthaS authored Mar 22, 2024
2 parents 47ddd4c + 1dc4ad7 commit 9cf9a64
Show file tree
Hide file tree
Showing 43 changed files with 1,502 additions and 783 deletions.
1,232 changes: 613 additions & 619 deletions LICENSE.txt

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions modules/distribution/product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
<groupId>org.wso2.orbit.com.lmax</groupId>
<artifactId>disruptor</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.runtime.diagnostics</groupId>
<artifactId>runtime-diagnostics-tool</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -92,6 +96,15 @@
<overWrite>true</overWrite>
<outputDirectory>target</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.wso2.runtime.diagnostics</groupId>
<artifactId>runtime-diagnostics-tool</artifactId>
<version>${diagnostics.tool.version}</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>target</outputDirectory>
<destFileName>diagnostics-tool</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
80 changes: 46 additions & 34 deletions modules/distribution/product/src/main/assembly/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<outputDirectory>wso2am-${pom.version}</outputDirectory>
<excludes>
<exclude>**/bin/wso2server.sh</exclude>
<exclude>**/bin/carbondump.sh</exclude>
<exclude>**/bin/wso2server.bat</exclude>
<exclude>**/conf/axis2/*.j2</exclude>
<exclude>**/conf/axis2/axis2.xml</exclude>
Expand Down Expand Up @@ -76,9 +77,6 @@
<exclude>**/repository/components/plugins/nimbus-jose-jwt_2.26.1.wso2v2.jar</exclude>
<exclude>**/repository/components/plugins/net.minidev.json-smart_1.2.0.jar</exclude>
<!--<exclude>**/repository/components/plugins/wss4j_1.5.11.wso2v10.jar</exclude>-->
<exclude>**/repository/components/plugins/rampart-trust_1.6.1.wso2v14.jar</exclude>
<exclude>**/repository/components/plugins/rampart-policy_1.6.1.wso2v14.jar</exclude>
<exclude>**/repository/components/plugins/rampart-core_1.6.1.wso2v14.jar</exclude>
<exclude>**/repository/components/plugins/commons-io_2.0.0.wso2v2.jar</exclude>
<exclude>**/repository/components/plugins/com.google.gson_2.1.0.jar</exclude>
<exclude>**/repository/components/plugins/com.google.gson_2.2.4.jar</exclude>
Expand Down Expand Up @@ -175,6 +173,26 @@
<exclude>**/lib/xalan*.jar</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>target/diagnostics-tool</directory>
<outputDirectory>wso2am-${pom.version}/diagnostics-tool</outputDirectory>
<excludes>
<exclude>bin/diagnostics</exclude>
<exclude>lib/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>target/diagnostics-tool/lib</directory>
<outputDirectory>wso2am-${pom.version}/lib</outputDirectory>
<excludes>
<exclude>antlr-runtime-*.jar</exclude>
<exclude>gson*.jar</exclude>
<exclude>commons-lang3-*.jar</exclude>
<exclude>log4j-api-*.jar</exclude>
<exclude>log4j-core-*.jar</exclude>
<exclude>cava-toml-*.jar</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
<outputDirectory>wso2am-${pom.version}</outputDirectory>
Expand Down Expand Up @@ -712,16 +730,16 @@
<include>client-registration#v0.17.war</include>
</includes>
</fileSet>
<!-- <fileSet>-->
<!-- <directory>-->
<!-- ../../p2-profile/product/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps-->
<!-- </directory>-->
<!-- <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps-->
<!-- </outputDirectory>-->
<!-- <includes>-->
<!-- <include>api#identity#auth#v1.1.war</include>-->
<!-- </includes>-->
<!-- </fileSet>-->
<fileSet>
<directory>
../../p2-profile/product/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps
</directory>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps
</outputDirectory>
<includes>
<include>api#identity#auth#v1.1.war</include>
</includes>
</fileSet>


<!-- Copy sample calculator api webapp-->
Expand Down Expand Up @@ -962,24 +980,6 @@
<include>org.apache.qpid.wso2:qpid-client:jar</include>
</includes>
</dependencySet>
<dependencySet>
<outputDirectory>wso2am-${pom.version}/samples/axis2Client/client_repo/modules</outputDirectory>
<includes>
<include>org.apache.axis2:addressing:mar</include>
<include>org.apache.rampart:rampart:mar</include>
<include>org.apache.sandesha2:sandesha2:mar</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
</dependencySet>
<dependencySet>
<outputDirectory>wso2am-${pom.version}/samples/axis2Server/repository/modules</outputDirectory>
<includes>
<include>org.apache.axis2:addressing:mar</include>
<include>org.apache.rampart:rampart:mar</include>
<include>org.apache.sandesha2:sandesha2:mar</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
</dependencySet>
<!--dependencySet>
<outputDirectory>wso2am-${pom.version}/repository/axis2/client/lib</outputDirectory>
<excludes>
Expand All @@ -995,9 +995,6 @@
</dependencySet-->
<dependencySet>
<outputDirectory>wso2am-${pom.version}/repository/deployment/client/modules</outputDirectory>
<includes>
<include>org.apache.rampart:rampart:mar</include>
</includes>
</dependencySet>
<dependencySet>
<outputDirectory>wso2am-${pom.version}/repository/components/lib</outputDirectory>
Expand Down Expand Up @@ -1302,6 +1299,21 @@
<fileMode>755</fileMode>
</file>

<file>
<source>src/main/startup-scripts/diagnostics.sh</source>
<outputDirectory>wso2am-${pom.version}/diagnostics-tool/bin/</outputDirectory>
<filtered>true</filtered>
<fileMode>755</fileMode>
</file>

<file>
<source>src/main/resources/conf/templates/diagnostics-tool/conf/config.toml.j2</source>
<outputDirectory>wso2am-${pom.version}/repository/resources/conf/templates/diagnostics-tool/conf</outputDirectory>
<destName>config.toml.j2</destName>
<filtered>true</filtered>
<fileMode>644</fileMode>
</file>

<file>
<source>../../../config/bam.xml</source>
<outputDirectory>wso2am-${pom.version}/repository/conf/etc</outputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ product.key=AM
product.version=4.3.0
product.wum.name=wso2am

carbon.version=4.9.26.alpha2
carbon.version=4.9.26.alpha3
am.version=4.3.0
default.server.role=APIManager
bundle.creators=org.wso2.carbon.mediator.bridge.MediatorBundleCreator
3 changes: 3 additions & 0 deletions modules/distribution/product/src/main/conf/deployment.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ enable_apikey_subscription_validation = true
#enable_cross_tenant_subscriptions = true
#default_reserved_username = "apim_reserved_user"

#[apim.publisher]
#enable_portal_configuration_only_mode = false

[apim.cors]
allow_origins = "*"
allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ appender.ERROR_LOGFILE.name = ERROR_LOGFILE
appender.ERROR_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/wso2-apigw-errors.log
appender.ERROR_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/wso2-apigw-errors-%d{MM-dd-yyyy}-%i.log.gz
appender.ERROR_LOGFILE.layout.type = PatternLayout
appender.ERROR_LOGFILE.layout.pattern = %d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n
appender.ERROR_LOGFILE.layout.pattern = %d{ISO8601} [%X{ip}-%X{host}] [%t] %5p {%c} %m%n
appender.ERROR_LOGFILE.policies.type = Policies
appender.ERROR_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy
appender.ERROR_LOGFILE.policies.time.interval = 1
Expand Down
3 changes: 2 additions & 1 deletion modules/distribution/product/src/main/extensions/error.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page isErrorPage="true" %>
<%@ page import="org.owasp.encoder.Encode" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.IdentityManagementEndpointUtil" %>
<%@ page import="org.wso2.carbon.identity.recovery.IdentityRecoveryConstants" %>
Expand Down Expand Up @@ -141,7 +142,7 @@
// Check if the error is related to the confirmation code being invalid.
// If so, navigate the users to the URL defined in `callback` URL param.
if (errorCodeFromParams === invalidConfirmationErrorCode) {
window.location.href = "<%=callback%>";
window.location.href = "<%=Encode.forHtmlAttribute(callback)%>";
return;
}
Expand Down
Binary file not shown.
64 changes: 62 additions & 2 deletions modules/distribution/product/src/main/resources/conf/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"identity.data_source": "jdbc/WSO2AM_DB",
"database.apim_db.url": "jdbc:h2:./repository/database/WSO2AM_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000",
"database.apim_db.driver": "org.h2.Driver",
"database.mb.store_db.url": "jdbc:h2:./repository/database/WSO2MB_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000",
"database.mb.store_db.url": "jdbc:h2:./repository/database/WSO2MB_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;IFEXISTS=TRUE;DB_CLOSE_DELAY=-1",
"database.mb.store_db.driver": "org.h2.Driver",
"database.mb.store_db.validationQuery": "SELECT 1",
"database.mb.store_db.username": "wso2carbon",
Expand Down Expand Up @@ -260,6 +260,7 @@
"apim.webhooks.https.trust_store.type": "$ref{truststore.type}",
"apim.webhooks.https.trust_store.password": "$ref{truststore.password}",
"apim.publisher.subscriber_claims": "http://wso2.org/claims/givenname,http://wso2.org/claims/lastname,http://wso2.org/claims/emailaddress,http://wso2.org/claims/organization",
"apim.publisher.enable_portal_configuration_only_mode": false,
"apim.jwt_authenitcation.subscription_validation_via_km": true,
"keystore.ssl_profile.default.servers": "*",
"keystore.listener_profile.ssl_verify_client" : "optional",
Expand Down Expand Up @@ -476,5 +477,64 @@
"apim.analytics.properties.truststore_location": "${carbon.home}/repository/resources/security/$ref{truststore.file_name}",
"apim.analytics.properties.truststore_password": "$ref{truststore.password}",
"tenant_mgt.disable_email_domain_validation": true,
"apim.jwt.use_kid_property": true
"apim.jwt.use_kid_property": true,
"server_configuration": {
"deployment_toml_path": "../conf/deployment.toml",
"logs_directory": "../repository/logs",
"updates_config_path": "../updates/config.json",
"diagnostic_log_file_path": "logs/diagnostics.log",
"carbon_log_file_path": "../repository/logs/wso2-apigw-errors.log",
"process_id_path": "../wso2carbon.pid",
"server_name": "WSO2 API Manager",
"server_version": "4.3.0"
},
"cpu_watcher": {
"enabled": "true",
"threshold": "80",
"retry_count": "2",
"interval": "5",
"action_executors": "ThreadDumper,MetricsSnapshot,ServerInfo"
},
"memory_watcher": {
"enabled": "true",
"threshold": "80",
"retry_count": "2",
"interval": "5",
"action_executors": "ThreadDumper,MetricsSnapshot,ServerInfo"
},
"log_watcher": {
"enabled": "true",
"interval": 0.1
},
"traffic_analyzer": {
"last_second_requests_enabled": "false",
"last_second_requests_windows_size": "300",
"last_second_requests_delay": "60",
"last_second_requests_interval": "1",
"last_fifteen_seconds_requests_enabled": "true",
"last_fifteen_seconds_requests_window_size": "100",
"last_fifteen_seconds_requests_delay": "4",
"last_fifteen_seconds_requests_interval": "15",
"last_minutes_requests_enabled": "true",
"last_minutes_requests_window_size": "100",
"last_minutes_requests_delay": "1",
"last_minutes_requests_interval": "60",
"notify_interval": "60"
},
"zip_file_configuration": {
"output_directory": "data",
"max_count": "20"
},
"log_pattern.patterns": [
{
"pattern.regex": "(.*)org.apache.synapse.transport.passthru(.*)",
"pattern.executors": "MetricsSnapshot,Netstat,OpenFileFinder,ThreadDumper,ServerInfo",
"pattern.reload_time": "30"
},
{
"pattern.regex": "(.*)org.apache.synapse(.*)",
"pattern.executors": "ServerInfo",
"pattern.reload_time": "10"
}
]
}
Loading

0 comments on commit 9cf9a64

Please sign in to comment.