From f3a0fe1c8a74f6047dd6c9c5021cfa7cb158751e Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 14:13:33 +0530 Subject: [PATCH 1/9] update cve versions --- libs/dao/pom.xml | 4 ++-- libs/protobuf/.gitignore | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 libs/protobuf/.gitignore diff --git a/libs/dao/pom.xml b/libs/dao/pom.xml index 8fe12f0c0b..800ee2d444 100644 --- a/libs/dao/pom.xml +++ b/libs/dao/pom.xml @@ -142,12 +142,12 @@ com.google.protobuf protobuf-java-util - 3.21.5 + 3.25.5 com.nimbusds nimbus-jose-jwt - 9.15.2 + 9.37.2 com.auth0 diff --git a/libs/protobuf/.gitignore b/libs/protobuf/.gitignore new file mode 100644 index 0000000000..7589473dd1 --- /dev/null +++ b/libs/protobuf/.gitignore @@ -0,0 +1 @@ +src/main/java/com/akto/proto/generated From c4b107c60216641e0a45e1e59bdcbd6181b86cca Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 14:46:37 +0530 Subject: [PATCH 2/9] scope flapdoodle to test in maven --- apps/api-analyser/pom.xml | 6 ++ apps/api-runtime/pom.xml | 5 ++ .../main/java/com/akto/action/HarAction.java | 73 ------------------- apps/dashboard/src/main/resources/struts.xml | 10 --- apps/mini-runtime/pom.xml | 5 ++ apps/mini-testing/pom.xml | 5 ++ apps/testing-cli/pom.xml | 5 ++ apps/testing/pom.xml | 5 ++ libs/dao/pom.xml | 1 + 9 files changed, 32 insertions(+), 83 deletions(-) diff --git a/apps/api-analyser/pom.xml b/apps/api-analyser/pom.xml index 26c4ecd590..7d953870db 100644 --- a/apps/api-analyser/pom.xml +++ b/apps/api-analyser/pom.xml @@ -113,4 +113,10 @@ src/test/java + + + true + + + diff --git a/apps/api-runtime/pom.xml b/apps/api-runtime/pom.xml index 70a30f57cc..114a6e3b55 100644 --- a/apps/api-runtime/pom.xml +++ b/apps/api-runtime/pom.xml @@ -136,6 +136,11 @@ + + + true + + diff --git a/apps/dashboard/src/main/java/com/akto/action/HarAction.java b/apps/dashboard/src/main/java/com/akto/action/HarAction.java index cf861147b4..ad3e0944f8 100644 --- a/apps/dashboard/src/main/java/com/akto/action/HarAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/HarAction.java @@ -1,45 +1,26 @@ package com.akto.action; -import com.akto.DaoInit; -import com.akto.analyser.ResourceAnalyser; import com.akto.dao.ApiCollectionsDao; import com.akto.dao.BurpPluginInfoDao; -import com.akto.dao.RuntimeFilterDao; import com.akto.dao.context.Context; import com.akto.dao.file.FilesDao; import com.akto.dto.ApiCollection; import com.akto.dto.HttpResponseParams; import com.akto.har.HAR; -import com.akto.listener.InitializerListener; import com.akto.listener.KafkaListener; -import com.akto.parsers.HttpCallParser; -import com.akto.runtime.APICatalogSync; -import com.akto.dto.HttpResponseParams; import com.akto.dto.ApiToken.Utility; -import com.akto.dto.type.SingleTypeInfo; -import com.akto.har.HAR; import com.akto.log.LoggerMaker; import com.akto.usage.UsageMetricCalculator; -import com.akto.dto.ApiToken.Utility; import com.akto.util.DashboardMode; import com.akto.utils.GzipUtils; import com.akto.utils.Utils; import com.mongodb.BasicDBObject; -import com.mongodb.ConnectionString; import com.mongodb.client.model.Filters; import com.opensymphony.xwork2.Action; -import org.apache.commons.io.FileUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.sun.jna.*; - -import java.io.File; import java.io.IOException; -import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Set; -import java.util.UUID; public class HarAction extends UserAction { private String harString; @@ -195,58 +176,4 @@ public boolean getSkipKafka() { public void setTcpContent(byte[] tcpContent) { this.tcpContent = tcpContent; } - - Awesome awesome = null; - - public String uploadTcp() { - - File tmpDir = FileUtils.getTempDirectory(); - String filename = UUID.randomUUID().toString() + ".pcap"; - File tcpDump = new File(tmpDir, filename); - try { - FileUtils.writeByteArrayToFile(tcpDump, tcpContent); - Awesome awesome = (Awesome) Native.load("awesome", Awesome.class); - Awesome.GoString.ByValue str = new Awesome.GoString.ByValue(); - str.p = tcpDump.getAbsolutePath(); - str.n = str.p.length(); - - Awesome.GoString.ByValue str2 = new Awesome.GoString.ByValue(); - str2.p = System.getenv("AKTO_KAFKA_BROKER_URL"); - str2.n = str2.p.length(); - - awesome.readTcpDumpFile(str, str2 , apiCollectionId); - - return Action.SUCCESS.toUpperCase(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return Action.ERROR.toUpperCase(); - } - - } - - interface Awesome extends Library { - public static class GoString extends Structure { - /** C type : const char* */ - public String p; - public long n; - public GoString() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("p", "n"); - } - /** @param p C type : const char* */ - public GoString(String p, long n) { - super(); - this.p = p; - this.n = n; - } - public static class ByReference extends GoString implements Structure.ByReference {} - public static class ByValue extends GoString implements Structure.ByValue {} - } - - public void readTcpDumpFile(GoString.ByValue filepath, GoString.ByValue kafkaURL, long apiCollectionId); - - } } \ No newline at end of file diff --git a/apps/dashboard/src/main/resources/struts.xml b/apps/dashboard/src/main/resources/struts.xml index 7a3e924065..bd1edd8408 100644 --- a/apps/dashboard/src/main/resources/struts.xml +++ b/apps/dashboard/src/main/resources/struts.xml @@ -1042,16 +1042,6 @@ - - - - - - - 401 - - - diff --git a/apps/mini-runtime/pom.xml b/apps/mini-runtime/pom.xml index c2c8cc92f4..93e04d64d8 100644 --- a/apps/mini-runtime/pom.xml +++ b/apps/mini-runtime/pom.xml @@ -136,6 +136,11 @@ + + + true + + diff --git a/apps/mini-testing/pom.xml b/apps/mini-testing/pom.xml index 3a756f2dea..f1d652735d 100644 --- a/apps/mini-testing/pom.xml +++ b/apps/mini-testing/pom.xml @@ -113,6 +113,11 @@ + + + true + + diff --git a/apps/testing-cli/pom.xml b/apps/testing-cli/pom.xml index bfdf9eb3a8..f828aa62fa 100644 --- a/apps/testing-cli/pom.xml +++ b/apps/testing-cli/pom.xml @@ -115,6 +115,11 @@ + + + true + + diff --git a/apps/testing/pom.xml b/apps/testing/pom.xml index e0a5e9da7d..5ba041047e 100644 --- a/apps/testing/pom.xml +++ b/apps/testing/pom.xml @@ -113,6 +113,11 @@ + + + true + + diff --git a/libs/dao/pom.xml b/libs/dao/pom.xml index 800ee2d444..9f2334f045 100644 --- a/libs/dao/pom.xml +++ b/libs/dao/pom.xml @@ -111,6 +111,7 @@ de.flapdoodle.embed de.flapdoodle.embed.mongo 3.2.6 + test com.squareup.okhttp3 From ef9ddc3bd9d9c961a6ce66676cd1296fab4b22f9 Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 14:52:01 +0530 Subject: [PATCH 3/9] skip tests --- .github/workflows/staging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 6c2b3c4440..88b38eef4b 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -23,7 +23,7 @@ jobs: id: docker_tag run: echo "IMAGE_TAG=a-$(echo ${{ github.ref_name }} | sed 's/[^a-zA-Z0-9]/-/g')" >> $GITHUB_OUTPUT - - run: mvn package -Dakto-image-tag=${{ github.event.inputs.Tag }} -Dakto-build-time=$(eval "date +%s") -Dakto-release-version=${{steps.docker_tag.outputs.IMAGE_TAG}} + - run: mvn package -Dakto-image-tag=${{ github.event.inputs.Tag }} -Dakto-build-time=$(eval "date +%s") -Dakto-release-version=${{steps.docker_tag.outputs.IMAGE_TAG}} -Dmaven.test.skip=true - name: DockerHub login env: DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} From 7b6f17cc7b358cbd0e83839aa8a9c8786cf5e1e5 Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 15:06:36 +0530 Subject: [PATCH 4/9] fix flapdoodle dep --- .github/workflows/staging.yml | 2 +- libs/utils/pom.xml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 88b38eef4b..6c2b3c4440 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -23,7 +23,7 @@ jobs: id: docker_tag run: echo "IMAGE_TAG=a-$(echo ${{ github.ref_name }} | sed 's/[^a-zA-Z0-9]/-/g')" >> $GITHUB_OUTPUT - - run: mvn package -Dakto-image-tag=${{ github.event.inputs.Tag }} -Dakto-build-time=$(eval "date +%s") -Dakto-release-version=${{steps.docker_tag.outputs.IMAGE_TAG}} -Dmaven.test.skip=true + - run: mvn package -Dakto-image-tag=${{ github.event.inputs.Tag }} -Dakto-build-time=$(eval "date +%s") -Dakto-release-version=${{steps.docker_tag.outputs.IMAGE_TAG}} - name: DockerHub login env: DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} diff --git a/libs/utils/pom.xml b/libs/utils/pom.xml index 4cff1d626f..ee3f6ea4f7 100644 --- a/libs/utils/pom.xml +++ b/libs/utils/pom.xml @@ -83,6 +83,12 @@ har-reader 2.2.0 + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + org.junit.jupiter junit-jupiter-api From 6bc3c17484de90f98f7d5d2dd1eb7f1c568fa32d Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 15:07:58 +0530 Subject: [PATCH 5/9] fix --- apps/api-analyser/pom.xml | 5 +---- apps/api-runtime/pom.xml | 5 +---- apps/mini-runtime/pom.xml | 5 +---- apps/mini-testing/pom.xml | 5 +---- apps/testing-cli/pom.xml | 5 +---- apps/testing/pom.xml | 5 +---- 6 files changed, 6 insertions(+), 24 deletions(-) diff --git a/apps/api-analyser/pom.xml b/apps/api-analyser/pom.xml index 7d953870db..3fb09dde1e 100644 --- a/apps/api-analyser/pom.xml +++ b/apps/api-analyser/pom.xml @@ -113,10 +113,7 @@ src/test/java - - - true - + diff --git a/apps/api-runtime/pom.xml b/apps/api-runtime/pom.xml index 114a6e3b55..5447e015ae 100644 --- a/apps/api-runtime/pom.xml +++ b/apps/api-runtime/pom.xml @@ -136,10 +136,7 @@ - - - true - + diff --git a/apps/mini-runtime/pom.xml b/apps/mini-runtime/pom.xml index 93e04d64d8..6e521011c6 100644 --- a/apps/mini-runtime/pom.xml +++ b/apps/mini-runtime/pom.xml @@ -136,10 +136,7 @@ - - - true - + diff --git a/apps/mini-testing/pom.xml b/apps/mini-testing/pom.xml index f1d652735d..281794e623 100644 --- a/apps/mini-testing/pom.xml +++ b/apps/mini-testing/pom.xml @@ -113,10 +113,7 @@ - - - true - + diff --git a/apps/testing-cli/pom.xml b/apps/testing-cli/pom.xml index f828aa62fa..be2290bf30 100644 --- a/apps/testing-cli/pom.xml +++ b/apps/testing-cli/pom.xml @@ -115,10 +115,7 @@ - - - true - + diff --git a/apps/testing/pom.xml b/apps/testing/pom.xml index 5ba041047e..9552cad085 100644 --- a/apps/testing/pom.xml +++ b/apps/testing/pom.xml @@ -113,10 +113,7 @@ - - - true - + From 84d11bd052acc125a74ef2a2aba3ff82d04806fb Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 15:15:37 +0530 Subject: [PATCH 6/9] add test dep --- apps/api-analyser/pom.xml | 7 +++++++ apps/api-runtime/pom.xml | 7 +++++++ apps/billing/pom.xml | 6 ++++++ apps/dashboard/pom.xml | 7 +++++++ apps/database-abstractor/pom.xml | 8 +++++++- apps/internal/pom.xml | 8 +++++++- apps/mini-runtime/pom.xml | 7 +++++++ apps/mini-testing/pom.xml | 7 +++++++ apps/testing-cli/pom.xml | 7 +++++++ apps/testing/pom.xml | 7 +++++++ libs/integrations/pom.xml | 7 +++++++ 11 files changed, 76 insertions(+), 2 deletions(-) diff --git a/apps/api-analyser/pom.xml b/apps/api-analyser/pom.xml index 3fb09dde1e..713ed9f1ed 100644 --- a/apps/api-analyser/pom.xml +++ b/apps/api-analyser/pom.xml @@ -15,6 +15,13 @@ jar + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + com.akto.libs.dao dao diff --git a/apps/api-runtime/pom.xml b/apps/api-runtime/pom.xml index 5447e015ae..69853718e5 100644 --- a/apps/api-runtime/pom.xml +++ b/apps/api-runtime/pom.xml @@ -15,6 +15,13 @@ jar + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + org.apache.commons commons-lang3 diff --git a/apps/billing/pom.xml b/apps/billing/pom.xml index c367e23636..0b38dc56f3 100644 --- a/apps/billing/pom.xml +++ b/apps/billing/pom.xml @@ -31,6 +31,12 @@ struts2-core 2.5.30 + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + com.akto.libs.dao diff --git a/apps/dashboard/pom.xml b/apps/dashboard/pom.xml index c7966302b5..03bfff51bf 100644 --- a/apps/dashboard/pom.xml +++ b/apps/dashboard/pom.xml @@ -25,6 +25,13 @@ + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + com.amazonaws aws-java-sdk-lambda diff --git a/apps/database-abstractor/pom.xml b/apps/database-abstractor/pom.xml index b825307018..49269a7691 100644 --- a/apps/database-abstractor/pom.xml +++ b/apps/database-abstractor/pom.xml @@ -25,7 +25,13 @@ - + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + org.apache.struts struts2-core diff --git a/apps/internal/pom.xml b/apps/internal/pom.xml index 695454914a..e9d6126650 100644 --- a/apps/internal/pom.xml +++ b/apps/internal/pom.xml @@ -54,7 +54,13 @@ jetty-servlets 9.4.44.v20210927 - + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + diff --git a/apps/mini-runtime/pom.xml b/apps/mini-runtime/pom.xml index 6e521011c6..5a25062a35 100644 --- a/apps/mini-runtime/pom.xml +++ b/apps/mini-runtime/pom.xml @@ -15,6 +15,13 @@ jar + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + org.apache.commons commons-lang3 diff --git a/apps/mini-testing/pom.xml b/apps/mini-testing/pom.xml index 281794e623..e59f372a2a 100644 --- a/apps/mini-testing/pom.xml +++ b/apps/mini-testing/pom.xml @@ -16,6 +16,13 @@ + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + com.akto.libs.dao dao diff --git a/apps/testing-cli/pom.xml b/apps/testing-cli/pom.xml index be2290bf30..345eb4a16d 100644 --- a/apps/testing-cli/pom.xml +++ b/apps/testing-cli/pom.xml @@ -16,6 +16,13 @@ + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + com.akto.libs.dao dao diff --git a/apps/testing/pom.xml b/apps/testing/pom.xml index 9552cad085..0986109350 100644 --- a/apps/testing/pom.xml +++ b/apps/testing/pom.xml @@ -45,6 +45,13 @@ snakeyaml 1.33 + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + diff --git a/libs/integrations/pom.xml b/libs/integrations/pom.xml index 8dd89358fa..0fe3613a75 100644 --- a/libs/integrations/pom.xml +++ b/libs/integrations/pom.xml @@ -14,6 +14,13 @@ jar + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + 3.2.6 + test + + com.squareup.okhttp3 From c0c2eaac3754af0d91ac05652a0d25131f2a52e7 Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 16:16:30 +0530 Subject: [PATCH 7/9] upgrade mortbay --- apps/database-abstractor/pom.xml | 6 ++++++ libs/utils/pom.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/database-abstractor/pom.xml b/apps/database-abstractor/pom.xml index 49269a7691..d009928532 100644 --- a/apps/database-abstractor/pom.xml +++ b/apps/database-abstractor/pom.xml @@ -32,6 +32,12 @@ test + + org.mortbay.jetty + jetty + 6.1.26 + + org.apache.struts struts2-core diff --git a/libs/utils/pom.xml b/libs/utils/pom.xml index ee3f6ea4f7..1b189d1b02 100644 --- a/libs/utils/pom.xml +++ b/libs/utils/pom.xml @@ -45,7 +45,7 @@ org.mortbay.jetty jetty - 6.1.26 + 7.0.0.pre4 com.google.apis From 460056dbaeb5355966a72396dff4f02b9c55e26b Mon Sep 17 00:00:00 2001 From: notshivansh Date: Fri, 10 Jan 2025 16:42:52 +0530 Subject: [PATCH 8/9] move mortbay jetty package to respective places --- apps/billing/pom.xml | 6 +++++- apps/internal/pom.xml | 6 +++++- apps/mini-testing/pom.xml | 5 +++++ apps/testing/pom.xml | 5 +++++ libs/utils/pom.xml | 11 ++++++----- .../src/main/java/com/akto/graphql/GraphQLUtils.java | 8 +++++--- .../src/test/java/com/akto/TestGraphQLUtils.java | 6 ------ 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/apps/billing/pom.xml b/apps/billing/pom.xml index 0b38dc56f3..0aa4affed7 100644 --- a/apps/billing/pom.xml +++ b/apps/billing/pom.xml @@ -60,7 +60,11 @@ jetty-servlets 9.4.44.v20210927 - + + org.mortbay.jetty + jetty + 6.1.26 + diff --git a/apps/internal/pom.xml b/apps/internal/pom.xml index e9d6126650..7be87e35b6 100644 --- a/apps/internal/pom.xml +++ b/apps/internal/pom.xml @@ -42,7 +42,11 @@ utils ${project.version} - + + org.mortbay.jetty + jetty + 6.1.26 + org.apache.struts struts2-json-plugin diff --git a/apps/mini-testing/pom.xml b/apps/mini-testing/pom.xml index e59f372a2a..90a787df24 100644 --- a/apps/mini-testing/pom.xml +++ b/apps/mini-testing/pom.xml @@ -16,6 +16,11 @@ + + org.mortbay.jetty + jetty + 6.1.26 + de.flapdoodle.embed de.flapdoodle.embed.mongo diff --git a/apps/testing/pom.xml b/apps/testing/pom.xml index 0986109350..58b2d6546b 100644 --- a/apps/testing/pom.xml +++ b/apps/testing/pom.xml @@ -16,6 +16,11 @@ + + org.mortbay.jetty + jetty + 6.1.26 + com.akto.libs.dao dao diff --git a/libs/utils/pom.xml b/libs/utils/pom.xml index 1b189d1b02..7547b6e0f4 100644 --- a/libs/utils/pom.xml +++ b/libs/utils/pom.xml @@ -42,11 +42,6 @@ google-api-client 1.23.0 - - org.mortbay.jetty - jetty - 7.0.0.pre4 - com.google.apis google-api-services-sheets @@ -72,6 +67,12 @@ dao ${project.version} + + javax.servlet + javax.servlet-api + 4.0.1 + provided + org.apache.httpcomponents httpclient diff --git a/libs/utils/src/main/java/com/akto/graphql/GraphQLUtils.java b/libs/utils/src/main/java/com/akto/graphql/GraphQLUtils.java index e44543334d..1f563bc0c2 100644 --- a/libs/utils/src/main/java/com/akto/graphql/GraphQLUtils.java +++ b/libs/utils/src/main/java/com/akto/graphql/GraphQLUtils.java @@ -10,7 +10,8 @@ import graphql.util.TreeTransformerUtil; import graphql.validation.DocumentVisitor; import graphql.validation.LanguageTraversal; -import org.mortbay.util.ajax.JSON; +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; import java.util.*; @@ -103,7 +104,8 @@ public List parseGraphqlResponseParam(HttpResponseParams res Map mapOfRequestPayload = null; Object[] listOfRequestPayload = null; try { - Object obj = JSON.parse(requestPayload); + JSONObject jsonObject = JSON.parseObject(requestPayload); + Object obj = (Object)jsonObject; if (obj instanceof Map) { mapOfRequestPayload = (Map) obj; } else if (obj instanceof Object[]) { @@ -304,7 +306,7 @@ private void updateResponseParamList(HttpResponseParams responseParams, List Date: Fri, 10 Jan 2025 16:59:11 +0530 Subject: [PATCH 9/9] update docker tag version --- .github/workflows/prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index 28aa0c02b6..b81c48ceaf 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -61,7 +61,7 @@ jobs: IMAGE_TAG: latest IMAGE_TAG1: testruntime IMAGE_TAG2: local - IMAGE_TAG3: 1.42.5_local + IMAGE_TAG3: 1.42.6_local run: | docker buildx create --use # Build a docker container and push it to DockerHub @@ -86,7 +86,7 @@ jobs: IMAGE_TAG: latest IMAGE_TAG1: testruntime IMAGE_TAG2: local - IMAGE_TAG3: 1.42.5_local + IMAGE_TAG3: 1.42.6_local run: | echo $IMAGE_TAG >> $GITHUB_STEP_SUMMARY docker buildx create --use