Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/ci_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ jobs:

- name: Configure Docker credentials
run: |
gcloud auth configure-docker gcr.io
gcloud auth configure-docker us-docker.pkg.dev

- name: pull mock collector image
run: |
docker pull gcr.io/px-docker-repo/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker tag gcr.io/px-docker-repo/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG localhost:5001/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker pull us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker tag us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG localhost:5001/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker push localhost:5001/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG

- name: deploy mock collector
Expand Down Expand Up @@ -124,8 +124,8 @@ jobs:

- name: pull enforcer tests image
run: |
docker pull gcr.io/px-docker-repo/connecteam/enforcer-specs-tests:$ENFORCER_SPEC_TESTS_IMAGE_TAG && \
docker tag gcr.io/px-docker-repo/connecteam/enforcer-specs-tests:$ENFORCER_SPEC_TESTS_IMAGE_TAG localhost:5001/enforcer-spec-tests:$ENFORCER_SPEC_TESTS_IMAGE_TAG && \
docker pull us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/enforcer-specs-tests:$ENFORCER_SPEC_TESTS_IMAGE_TAG && \
docker tag us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/enforcer-specs-tests:$ENFORCER_SPEC_TESTS_IMAGE_TAG localhost:5001/enforcer-spec-tests:$ENFORCER_SPEC_TESTS_IMAGE_TAG && \
docker push localhost:5001/enforcer-spec-tests:$ENFORCER_SPEC_TESTS_IMAGE_TAG

- name: run enforcer tests
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/fuzzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ jobs:

- name: Configure Docker credentials
run: |
gcloud auth configure-docker gcr.io
gcloud auth configure-docker us-docker.pkg.dev

- name: pull mock collector image
run: |
docker pull gcr.io/px-docker-repo/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker tag gcr.io/px-docker-repo/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG localhost:5001/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker pull us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker tag us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG localhost:5001/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG && \
docker push localhost:5001/mock-collector:$MOCK_COLLECTOR_IMAGE_TAG

- name: deploy mock collector
Expand Down Expand Up @@ -127,8 +127,8 @@ jobs:

- name: pull fuzzer image
run: |
docker pull gcr.io/px-docker-repo/connecteam/connect-enforcer-fuzzer:$FUZZER_TAG && \
docker tag gcr.io/px-docker-repo/connecteam/connect-enforcer-fuzzer:$FUZZER_TAG localhost:5001/connect-enforcer-fuzzer:$FUZZER_TAG && \
docker pull us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/connect-enforcer-fuzzer:$FUZZER_TAG && \
docker tag us-docker.pkg.dev/hmn-registry/docker-common-us/connecteam/connect-enforcer-fuzzer:$FUZZER_TAG localhost:5001/connect-enforcer-fuzzer:$FUZZER_TAG && \
docker push localhost:5001/connect-enforcer-fuzzer:$FUZZER_TAG

- name: run fuzzer
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## [v6.14.2](https://github.com/PerimeterX/perimeterx-java-sdk/compare/6.14.2...HEAD) (2025-06-15)
- Added Cross Tab Session cookie support on risk_api and async activities

## [v6.14.1](https://github.com/PerimeterX/perimeterx-java-sdk/compare/6.14.1...HEAD) (2024-11-12)
- Fix Telemetry bug when sending page requested activities when telemetry fails
- Fix risk_rtt is not sent when risk call gets s2s_timeout
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# [PerimeterX](http://www.perimeterx.com) Java SDK

> Latest stable version: [v6.14.1](https://search.maven.org/#artifactdetails%7Ccom.perimeterx%7Cperimeterx-sdk%7C6.15.0%7Cjar)
> Latest stable version: [v6.14.2](https://search.maven.org/#artifactdetails%7Ccom.perimeterx%7Cperimeterx-sdk%7C6.15.0%7Cjar)

## Table of Contents

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<name>PerimeterX JAVA SDK</name>
<groupId>com.perimeterx</groupId>
<artifactId>perimeterx-sdk</artifactId>
<version>6.14.1</version>
<version>6.14.2</version>

<packaging>jar</packaging>
<description>PerimeterX Java SDK</description>
Expand Down
2 changes: 1 addition & 1 deletion px_metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.14.1",
"version": "6.14.2",
"supported_features": [
"advanced_blocking_response",
"bypass_monitor_header",
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/perimeterx/models/PXContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public class PXContext {
private String additionalRiskInfo;
private String servletPath;
private String pxhdDomain;
private String pxCtsCookie;
private long enforcerStartTime;

/**
Expand Down Expand Up @@ -397,7 +398,7 @@ private void parseCookies(HttpServletRequest request, boolean isMobileToken) {
.map(request::getHeader)
.toArray(String[]::new);
this.requestCookieNames = CookieNamesExtractor.extractCookieNames(cookies);
setVidAndPxhd(cookies);
setVidPxhdAndPxcts(cookies);
tokens.addAll(headerParser.createRawCookieDataList(cookieHeaders));
this.tokens = tokens;
DataEnrichmentCookie deCookie = headerParser.getRawDataEnrichmentCookie(this.tokens, cookieKeysToCheck(this, this.pxConfiguration));
Expand All @@ -406,7 +407,7 @@ private void parseCookies(HttpServletRequest request, boolean isMobileToken) {
}
}

private void setVidAndPxhd(Cookie[] cookies) {
private void setVidPxhdAndPxcts(Cookie[] cookies) {
if (cookies != null) {
for (Cookie cookie : cookies) {
if (cookie.getName().equals("_pxvid") || cookie.getName().equals("pxvid")) {
Expand All @@ -425,6 +426,9 @@ private void setVidAndPxhd(Cookie[] cookies) {
logger.error("setVidAndPxhd - failed while decoding the pxhd value", e);
}
}
if (cookie.getName().equals("pxcts")) {
this.pxCtsCookie = cookie.getValue();
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class CommonActivityDetails implements ActivityDetails {
@JsonProperty("pass")
public String password;

@JsonProperty("cross_tab_session")
public String pxCtsCookie;

public CommonActivityDetails(PXContext context) {
final LoginData loginData = context.getLoginData();

Expand All @@ -81,6 +84,7 @@ public CommonActivityDetails(PXContext context) {
this.callReason = additional.callReason;
this.riskStartTime = additional.riskStartTime;
this.enforcerStartTime = additional.enforcerStartTime;
this.pxCtsCookie = additional.pxCtsCookie;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public class Additional {
@JsonProperty("risk_start_time")
public long riskStartTime;

@JsonProperty("cross_tab_session")
public String pxCtsCookie;

public static Additional fromContext(PXContext ctx) {
Additional additional = new Additional();
additional.pxCookie = ctx.getRiskCookie();
Expand All @@ -110,6 +113,7 @@ public static Additional fromContext(PXContext ctx) {
additional.requestId = ctx.getRequestId();
additional.enforcerStartTime = ctx.getEnforcerStartTime();
additional.riskStartTime = new Date().getTime();
additional.pxCtsCookie = ctx.getPxCtsCookie();

setLoginCredentials(ctx, additional);

Expand Down
2 changes: 1 addition & 1 deletion web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<com.perimeterx.version>6.14.1</com.perimeterx.version>
<com.perimeterx.version>6.14.2</com.perimeterx.version>
</properties>

</project>