Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
37c3046
chore: add .smarttomcat dir to gitignore
ori-gold-px Oct 22, 2025
1d6f336
feat: add is_sensitive_route to activities
ori-gold-px Oct 22, 2025
235a85b
feat: added support for px_logger_severity in example
ori-gold-px Oct 22, 2025
c420fda
chore: very minor refactoring fixes
ori-gold-px Oct 22, 2025
516aa9a
chore: updating dependencies
ori-gold-px Oct 22, 2025
4061c97
chore: alphabetized px_metadata supported features
ori-gold-px Oct 22, 2025
3884291
fix: update module mode to resolve unit test failures
ori-gold-px Oct 23, 2025
7f3d481
chore: updating gha checkout, setup-node actions
ori-gold-px Oct 23, 2025
23ed5c1
update: fuzzer, mock collector, specs test tags
ori-gold-px Oct 23, 2025
434732b
update: helm chart versions
ori-gold-px Oct 23, 2025
ce64628
fix: adding enforcerConfigJsonContent to e2e test run
ori-gold-px Oct 23, 2025
0c6e4cf
feat: add request ID to telemetry activity
ori-gold-px Oct 23, 2025
9b3817f
fix: redacting sensitive fields in telemetry, changing telemetry conf…
ori-gold-px Oct 23, 2025
53e63af
fix: compilation issues re: request id in telemetry
ori-gold-px Oct 23, 2025
b3cbab4
wip
ori-gold-px Oct 24, 2025
1292521
fix: ci_files config and px_metadata excluded tests (custom function …
ori-gold-px Oct 27, 2025
08c9bb9
feat: allow non-string types in Custom Parameters (backwards-compatib…
ori-gold-px Oct 27, 2025
697fcbe
update: configs in example
ori-gold-px Oct 27, 2025
3425343
feat: added px_secured_pxhd_enabled configuration
ori-gold-px Oct 27, 2025
82e5dec
update: tests v1.23.1
ori-gold-px Oct 27, 2025
c2b7f64
fix: exclude ad block test
ori-gold-px Oct 27, 2025
0e83cc3
update: captcha template
ori-gold-px Oct 27, 2025
93e363f
feat: added additional token info
ori-gold-px Oct 28, 2025
dc860f5
fix: align new block page (blank space)
ori-gold-px Oct 28, 2025
e1b9272
fix: align first party block script with expected value in block page
ori-gold-px Oct 28, 2025
5825be3
chore: changelog
ori-gold-px Oct 28, 2025
c1c0aff
update: e2e tests to 1.23.2
ori-gold-px Oct 28, 2025
147ad3f
fix: adding logger auth token to ci tests
ori-gold-px Oct 28, 2025
c9e4afd
update: adding retry to e2e tests
ori-gold-px Oct 28, 2025
71c18e4
update: mock collector 2.0.5 -> 2.0.6
ori-gold-px Oct 29, 2025
f081f7f
chore: upgrade setup-helm and helm version
ori-gold-px Oct 29, 2025
1105074
tmp: setup helm workaround
ori-gold-px Oct 29, 2025
e3e9029
test: reverting setup-helm, filtering for tests, seeing enforcer logs
ori-gold-px Oct 30, 2025
858677a
fix
ori-gold-px Oct 30, 2025
16d5304
fix: first party log to lowercase
ori-gold-px Oct 30, 2025
ba6999e
fix: validate third party url with port in host if needed
ori-gold-px Oct 30, 2025
5b411eb
fix
ori-gold-px Oct 30, 2025
d99b16a
fix: skipping first party timeout test (no fp timeout config supported)
ori-gold-px Oct 30, 2025
1d5ab01
try timeout 90 mins
ori-gold-px Oct 30, 2025
b0583b2
fix: connection leak bug in first party
ori-gold-px Nov 3, 2025
cf25040
fix: possible telemetry connection leak
ori-gold-px Nov 3, 2025
01f3e77
fix: first party max url length enforced, returns 400
ori-gold-px Nov 3, 2025
06b5268
refactor: set logger severity in example
ori-gold-px Nov 3, 2025
991e2ad
chore: changelog
ori-gold-px Nov 3, 2025
df32e9f
pr fixes: test v1.23.3
ori-gold-px Nov 4, 2025
52a0445
pr fix: json ignore properties moved to pxconfiguration
ori-gold-px Nov 4, 2025
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/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
version: ${{ steps.version.outputs.value }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '18.x'
node-version: '22.x'
- name: Get package version
id: version
run: echo "value=$(node -p -e "require('./px_metadata.json').version")" >> "$GITHUB_OUTPUT"
Expand All @@ -28,7 +28,7 @@ jobs:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- run: gh release create v${{ needs.extract_version.outputs.version }} --generate-notes -t "Version ${{ needs.extract_version.outputs.version }}"
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
Expand All @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up JDK 8
uses: actions/setup-java@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
Expand Down
40 changes: 25 additions & 15 deletions .github/workflows/ci_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
supported-features: ${{ steps.supported-features.outputs.value }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '20.x'
node-version: '22.x'
- name: extract supported features
id: supported-features
run: echo "value=$(node -p -e "require('./px_metadata.json').supported_features?.join(' or ') || ''")" >> "$GITHUB_OUTPUT"
Expand All @@ -25,9 +25,9 @@ jobs:
CI:
name: "E2E tests"
env:
MOCK_COLLECTOR_IMAGE_TAG: 1.3.5
MOCK_COLLECTOR_IMAGE_TAG: 2.0.6
SAMPLE_SITE_IMAGE_TAG: 1.0.0
ENFORCER_SPEC_TESTS_IMAGE_TAG: 1.8.1
ENFORCER_SPEC_TESTS_IMAGE_TAG: 1.23.3

runs-on: ubuntu-latest
timeout-minutes: 60
Expand All @@ -37,7 +37,7 @@ jobs:
steps:

- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Docker
uses: docker/setup-buildx-action@v3
Expand All @@ -50,34 +50,34 @@ jobs:
docker build . -t localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG && \
docker push localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG

- uses: azure/setup-helm@v3
- uses: azure/setup-helm@v4
with:
version: '3.14.1'
version: '3.19.0'

- name: Clone helm charts repo - mock-collector
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: PerimeterX/connect-helm-charts
token: ${{ secrets.CONNECT_PULL_TOKEN }}
ref: mock-collector-0.1.1
ref: mock-collector-0.1.2
path: ./deploy_charts/mock-collector


- name: Clone helm charts repo - enforcer-tests
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: PerimeterX/connect-helm-charts
token: ${{ secrets.CONNECT_PULL_TOKEN }}
ref: enforcer-spec-tests-0.7.1
ref: enforcer-spec-tests-0.9.1
path: ./deploy_charts/enforcer-spec-tests


- name: Clone helm charts repo - sample-site
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: PerimeterX/connect-helm-charts
token: ${{ secrets.CONNECT_PULL_TOKEN }}
ref: sample-site-0.5.0
ref: sample-site-0.6.1
path: ./deploy_charts/sample-site

- name: Set up Google Cloud SDK
Expand All @@ -101,14 +101,16 @@ jobs:
helm install mock-collector ./deploy_charts/mock-collector/charts/mock-collector \
--set image.repository=localhost:5001/mock-collector \
--set image.tag=$MOCK_COLLECTOR_IMAGE_TAG \
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
--set imagePullPolicy=Always --wait

- name: set secrets in enforcer config
run: |
cat ./ci_files/enforcer-config.json |\
jq '.px_app_id="${{ secrets.PX_APP_ID }}"' |\
jq '.px_cookie_secret="${{ secrets.TEST_COOKIE_SECRET }}"' |\
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' > /tmp/enforcer-config.json
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' |\
jq '.px_logger_auth_token="${{ secrets.PX_LOGGER_AUTH_TOKEN }}"' > /tmp/enforcer-config.json

- name: log enforcer config
run: cat /tmp/enforcer-config.json
Expand All @@ -118,6 +120,9 @@ jobs:
helm install java-enforcer ./deploy_charts/sample-site/charts/sample-site \
-f ./ci_files/enforcer-values.yaml \
--set image.name=localhost:5001/java-enforcer-sample-site \
--set appId=${{ secrets.PX_APP_ID }} \
--set cookieSecret=${{ secrets.TEST_COOKIE_SECRET }} \
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
--set image.tag=$SAMPLE_SITE_IMAGE_TAG \
--set-file enforcerConfig.content=/tmp/enforcer-config.json \
--wait
Expand All @@ -137,6 +142,7 @@ jobs:
--set authToken="${{ secrets.PX_AUTH_TOKEN }}" \
--set appId=${{ secrets.PX_APP_ID }} \
--set-file enforcerMetadataContent=./px_metadata.json \
--set-file enforcerConfigJsonContent=/tmp/enforcer-config.json \
-f ./ci_files/spec-tests-values.yaml \
--wait \
--timeout 60m0s \
Expand All @@ -145,3 +151,7 @@ jobs:
- name: get tests results
if: ${{ always() }}
run: kubectl logs job/enforcer-spec-tests

- name: get enforcer logs
if: ${{ always() }}
run: kubectl logs deployment/java-enforcer-sample-site
4 changes: 2 additions & 2 deletions .github/workflows/ci_verify_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code - ${{ github.base_ref }}
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.base_ref }}

Expand All @@ -18,7 +18,7 @@ jobs:
run: echo "project=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )" >> "$GITHUB_OUTPUT"

- name: Checkout code - current commit
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Get current SDK versions
id: new-version
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs_enforcement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
version: ${{ steps.version.outputs.value }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '22'
node-version: '22.x'

- name: Get package version
id: version
Expand Down
38 changes: 22 additions & 16 deletions .github/workflows/fuzzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
supported-features: ${{ steps.version.outputs.value }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 'latest'
node-version: '22.x'
- name: Get package version
id: version
run: echo "value=$(node -p -e "require('./px_metadata.json').version")" >> "$GITHUB_OUTPUT"
Expand All @@ -25,8 +25,8 @@ jobs:
Fuzzing:
name: "Fuzzing Test"
env:
MOCK_COLLECTOR_IMAGE_TAG: 1.3.6
FUZZER_TAG: 1.0.4
MOCK_COLLECTOR_IMAGE_TAG: 2.0.6
FUZZER_TAG: 1.1.0
SAMPLE_SITE_IMAGE_TAG: 1.0.0
ENFORCER_TAG: ${{ needs.extract_version.outputs.version }}

Expand All @@ -42,7 +42,7 @@ jobs:
steps:

- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Docker
uses: docker/setup-buildx-action@v3
Expand All @@ -55,32 +55,32 @@ jobs:
docker build . -t localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG && \
docker push localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG

- uses: azure/setup-helm@v3
- uses: azure/setup-helm@v4
with:
version: '3.14.2'
version: '3.19.0'

- name: Clone helm charts repo - mock-collector
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: PerimeterX/connect-helm-charts
token: ${{ secrets.CONNECT_PULL_TOKEN }}
ref: mock-collector-0.1.1
ref: mock-collector-0.1.2
path: ./deploy_charts/mock-collector

- name: Clone helm charts repo - fuzzer
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: PerimeterX/connect-helm-charts
token: ${{ secrets.CONNECT_PULL_TOKEN }}
ref: fuzzer-0.2.0
ref: fuzzer-0.3.1
path: ./deploy_charts/fuzzer

- name: Clone helm charts repo - sample-site
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: PerimeterX/connect-helm-charts
token: ${{ secrets.CONNECT_PULL_TOKEN }}
ref: sample-site-0.5.0
ref: sample-site-0.6.1
path: ./deploy_charts/sample-site

- name: Set up Google Cloud SDK
Expand All @@ -104,14 +104,17 @@ jobs:
helm install mock-collector ./deploy_charts/mock-collector/charts/mock-collector \
--set image.repository=localhost:5001/mock-collector \
--set image.tag=$MOCK_COLLECTOR_IMAGE_TAG \
--set imagePullPolicy=Always --wait
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
--set imagePullPolicy=Always \
--wait

- name: set secrets in enforcer config
run: |
cat ./ci_files/enforcer-config.json |\
jq '.px_app_id="${{ secrets.PX_APP_ID }}"' |\
jq '.px_cookie_secret="${{ secrets.TEST_COOKIE_SECRET }}"' |\
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' > /tmp/enforcer-config.json
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' |\
jq '.px_logger_auth_token="${{ secrets.PX_LOGGER_AUTH_TOKEN }}"' > /tmp/enforcer-config.json

- name: log enforcer config
run: cat /tmp/enforcer-config.json
Expand All @@ -122,6 +125,9 @@ jobs:
-f ./ci_files/enforcer-values.yaml \
--set image.name=localhost:5001/java-enforcer-sample-site \
--set image.tag=$SAMPLE_SITE_IMAGE_TAG \
--set appId=${{ secrets.PX_APP_ID }} \
--set cookieSecret=${{ secrets.TEST_COOKIE_SECRET }} \
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
--set-file enforcerConfig.content=/tmp/enforcer-config.json \
--wait

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ examples/examples.iml
.DS_Store
.classpath
.project
.factorypath
.factorypath
.smarttomcat
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Change Log
## [x.x.x] - YYYY-MM-DD
- Added `px_secured_pxhd_enabled` configuration option to enable secure flag on `pxhd` cookie
- Added `is_sensitive_route` to risk api and async activities
- Added `additional_token_info` to risk api and async activities
- Updated telemetry activity to new format (`static_config` and `active_config`; `remote_config` is not supported)
- Updated telemetry activity to include `request_id`
- Updated captcha page template to newest version
- Updated dependencies minor and patch versions (major versions unchanged)
- Changed custom parameters to be of type `Object` instead of `String` to allow more flexibility
- Changed first party block script in captcha template to end with expected `/captcha.js`
- Fixed possible connection leak issue due to unclosed responses in first party and telemetry requests
- Fixed first party fuzzing errors by returning 400 on first party requests with URL length > 1000 characters

## [v6.15.1](https://github.com/PerimeterX/perimeterx-java-sdk/compare/6.15.1...HEAD) (2025-09-08)
- Added additional updateReason RISK to Telemetry flow
Expand Down
6 changes: 2 additions & 4 deletions ci_files/enforcer-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"px_custom_first_party_xhr_endpoint": "/custom_first_party_xhr_endpoint",
"px_custom_first_party_captcha_endpoint": "/custom_first_party_captcha_endpoint",
"px_custom_first_party_prefix": "/custom_first_party_prefix",
"px_filter_by_route": [
"/filtered_route"
],
"px_monitored_routes": [
"/monitored_route",
"/monitored_route/suffix",
Expand Down Expand Up @@ -116,5 +113,6 @@
],
"px_cors_support_enabled": true,
"px_cors_preflight_request_filter_enabled": true,
"px_url_decode_reserved_characters": true
"px_url_decode_reserved_characters": true,
"px_secured_pxhd_enabled": true
}
6 changes: 6 additions & 0 deletions ci_files/spec-tests-values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
additionalArgs:
- "--retries"
- "3"
- "--retry-delay"
- "10"

internalMockCollectorURL: "http://mock-collector-mock-collector:3001"
siteURL: "http://java-enforcer-sample-site:3000"

Expand Down
Loading