Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Integration Test for Lightweight API Key and Fix WebSocket API Invocation Test Issues #13531

Merged
merged 5 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/distribution/product/src/main/conf/deployment.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ enable = true
token = ""

[apim.key_manager]
enable_apikey_subscription_validation = true
enable_lightweight_apikey_generation = true
#service_url = "https://localhost:${mgt.transport.https.port}/services/"
#username = "$ref{super_admin.username}"
#password = "$ref{super_admin.password}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,11 @@ private void invokeAPI(WebSocketClient client, String accessToken, AUTH_IN in, H
} else if (AUTH_IN.OAUTH_QUERY == in) {
echoUri = new URI(apiEndPoint + "?access_token=" + accessToken);
} else if (AUTH_IN.APIKEY_HEADER == in) {
Thread.sleep(24000);
request.setHeader("apikey", accessToken);
echoUri = new URI(apiEndPoint);
} else if (AUTH_IN.APIKEY_QUERY == in) {
Thread.sleep(24000);
echoUri = new URI(apiEndPoint + "?apikey=" + accessToken);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ password = "wso2carbon"
alias = "wso2carbon"
key_password = "wso2carbon"

[apim.key_manager]
enable_lightweight_apikey_generation = false

[[apim.gateway.environment]]
name = "Default"
type = "hybrid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
<parameter name="group" value="group4"/>
<classes>
<class name="org.wso2.am.integration.tests.other.AdvancedConfigDeploymentConfig"/>
<class name="org.wso2.am.integration.tests.api.lifecycle.APISecurityTestCase" />
<class name="org.wso2.am.integration.tests.other.NotificationTestCase"/>
<class name="org.wso2.am.integration.tests.json.ESBJAVA3380TestCase"/>
<!--THis test will be enabled once the stats event streams are finalized -->
Expand All @@ -369,8 +370,6 @@
</classes>
</test>



<test name="apim-integration-tests-application-sharing" preserve-order="true" parallel="false" group-by-instances="true">
<parameter name="group" value="group1"/>
<classes>
Expand Down
Loading