Skip to content

Commit a951644

Browse files
authored
Merge pull request #415 from PerimeterX/feature/field-alignments
[ENT-19165] Feature/field alignments
2 parents 9624e09 + 52a0445 commit a951644

32 files changed

+434
-205
lines changed

.github/workflows/cd.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
version: ${{ steps.version.outputs.value }}
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515
- name: Setup Node.js
16-
uses: actions/setup-node@v4
16+
uses: actions/setup-node@v6
1717
with:
18-
node-version: '18.x'
18+
node-version: '22.x'
1919
- name: Get package version
2020
id: version
2121
run: echo "value=$(node -p -e "require('./px_metadata.json').version")" >> "$GITHUB_OUTPUT"
@@ -28,7 +28,7 @@ jobs:
2828
contents: write
2929
steps:
3030
- name: Checkout code
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
3232
- run: gh release create v${{ needs.extract_version.outputs.version }} --generate-notes -t "Version ${{ needs.extract_version.outputs.version }}"
3333
env:
3434
GITHUB_TOKEN: ${{ github.TOKEN }}
@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-latest
4343
steps:
4444
- name: Checkout code
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v5
4646

4747
- name: Set up JDK 8
4848
uses: actions/setup-java@v3

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-latest
66
steps:
77
- name: Checkout code
8-
uses: actions/checkout@v2
8+
uses: actions/checkout@v5
99
- name: Set up JDK 8
1010
uses: actions/setup-java@v3
1111
with:

.github/workflows/ci_e2e.yaml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
supported-features: ${{ steps.supported-features.outputs.value }}
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
- name: Setup Node.js
17-
uses: actions/setup-node@v4
17+
uses: actions/setup-node@v6
1818
with:
19-
node-version: '20.x'
19+
node-version: '22.x'
2020
- name: extract supported features
2121
id: supported-features
2222
run: echo "value=$(node -p -e "require('./px_metadata.json').supported_features?.join(' or ') || ''")" >> "$GITHUB_OUTPUT"
@@ -25,9 +25,9 @@ jobs:
2525
CI:
2626
name: "E2E tests"
2727
env:
28-
MOCK_COLLECTOR_IMAGE_TAG: 1.3.5
28+
MOCK_COLLECTOR_IMAGE_TAG: 2.0.6
2929
SAMPLE_SITE_IMAGE_TAG: 1.0.0
30-
ENFORCER_SPEC_TESTS_IMAGE_TAG: 1.8.1
30+
ENFORCER_SPEC_TESTS_IMAGE_TAG: 1.23.3
3131

3232
runs-on: ubuntu-latest
3333
timeout-minutes: 60
@@ -37,7 +37,7 @@ jobs:
3737
steps:
3838

3939
- name: Checkout Repo
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v5
4141

4242
- name: Set up Docker
4343
uses: docker/setup-buildx-action@v3
@@ -50,34 +50,34 @@ jobs:
5050
docker build . -t localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG && \
5151
docker push localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG
5252
53-
- uses: azure/setup-helm@v3
53+
- uses: azure/setup-helm@v4
5454
with:
55-
version: '3.14.1'
55+
version: '3.19.0'
5656

5757
- name: Clone helm charts repo - mock-collector
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@v5
5959
with:
6060
repository: PerimeterX/connect-helm-charts
6161
token: ${{ secrets.CONNECT_PULL_TOKEN }}
62-
ref: mock-collector-0.1.1
62+
ref: mock-collector-0.1.2
6363
path: ./deploy_charts/mock-collector
6464

6565

6666
- name: Clone helm charts repo - enforcer-tests
67-
uses: actions/checkout@v4
67+
uses: actions/checkout@v5
6868
with:
6969
repository: PerimeterX/connect-helm-charts
7070
token: ${{ secrets.CONNECT_PULL_TOKEN }}
71-
ref: enforcer-spec-tests-0.7.1
71+
ref: enforcer-spec-tests-0.9.1
7272
path: ./deploy_charts/enforcer-spec-tests
7373

7474

7575
- name: Clone helm charts repo - sample-site
76-
uses: actions/checkout@v4
76+
uses: actions/checkout@v5
7777
with:
7878
repository: PerimeterX/connect-helm-charts
7979
token: ${{ secrets.CONNECT_PULL_TOKEN }}
80-
ref: sample-site-0.5.0
80+
ref: sample-site-0.6.1
8181
path: ./deploy_charts/sample-site
8282

8383
- name: Set up Google Cloud SDK
@@ -101,14 +101,16 @@ jobs:
101101
helm install mock-collector ./deploy_charts/mock-collector/charts/mock-collector \
102102
--set image.repository=localhost:5001/mock-collector \
103103
--set image.tag=$MOCK_COLLECTOR_IMAGE_TAG \
104+
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
104105
--set imagePullPolicy=Always --wait
105106
106107
- name: set secrets in enforcer config
107108
run: |
108109
cat ./ci_files/enforcer-config.json |\
109110
jq '.px_app_id="${{ secrets.PX_APP_ID }}"' |\
110111
jq '.px_cookie_secret="${{ secrets.TEST_COOKIE_SECRET }}"' |\
111-
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' > /tmp/enforcer-config.json
112+
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' |\
113+
jq '.px_logger_auth_token="${{ secrets.PX_LOGGER_AUTH_TOKEN }}"' > /tmp/enforcer-config.json
112114
113115
- name: log enforcer config
114116
run: cat /tmp/enforcer-config.json
@@ -118,6 +120,9 @@ jobs:
118120
helm install java-enforcer ./deploy_charts/sample-site/charts/sample-site \
119121
-f ./ci_files/enforcer-values.yaml \
120122
--set image.name=localhost:5001/java-enforcer-sample-site \
123+
--set appId=${{ secrets.PX_APP_ID }} \
124+
--set cookieSecret=${{ secrets.TEST_COOKIE_SECRET }} \
125+
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
121126
--set image.tag=$SAMPLE_SITE_IMAGE_TAG \
122127
--set-file enforcerConfig.content=/tmp/enforcer-config.json \
123128
--wait
@@ -137,6 +142,7 @@ jobs:
137142
--set authToken="${{ secrets.PX_AUTH_TOKEN }}" \
138143
--set appId=${{ secrets.PX_APP_ID }} \
139144
--set-file enforcerMetadataContent=./px_metadata.json \
145+
--set-file enforcerConfigJsonContent=/tmp/enforcer-config.json \
140146
-f ./ci_files/spec-tests-values.yaml \
141147
--wait \
142148
--timeout 60m0s \
@@ -145,3 +151,7 @@ jobs:
145151
- name: get tests results
146152
if: ${{ always() }}
147153
run: kubectl logs job/enforcer-spec-tests
154+
155+
- name: get enforcer logs
156+
if: ${{ always() }}
157+
run: kubectl logs deployment/java-enforcer-sample-site

.github/workflows/ci_verify_version.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout code - ${{ github.base_ref }}
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@v5
1313
with:
1414
ref: ${{ github.base_ref }}
1515

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

2020
- name: Checkout code - current commit
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

2323
- name: Get current SDK versions
2424
id: new-version

.github/workflows/docs_enforcement.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
version: ${{ steps.version.outputs.value }}
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
2020

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

2626
- name: Get package version
2727
id: version

.github/workflows/fuzzer.yaml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
supported-features: ${{ steps.version.outputs.value }}
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
- name: Setup Node.js
17-
uses: actions/setup-node@v4
17+
uses: actions/setup-node@v6
1818
with:
19-
node-version: 'latest'
19+
node-version: '22.x'
2020
- name: Get package version
2121
id: version
2222
run: echo "value=$(node -p -e "require('./px_metadata.json').version")" >> "$GITHUB_OUTPUT"
@@ -25,8 +25,8 @@ jobs:
2525
Fuzzing:
2626
name: "Fuzzing Test"
2727
env:
28-
MOCK_COLLECTOR_IMAGE_TAG: 1.3.6
29-
FUZZER_TAG: 1.0.4
28+
MOCK_COLLECTOR_IMAGE_TAG: 2.0.6
29+
FUZZER_TAG: 1.1.0
3030
SAMPLE_SITE_IMAGE_TAG: 1.0.0
3131
ENFORCER_TAG: ${{ needs.extract_version.outputs.version }}
3232

@@ -42,7 +42,7 @@ jobs:
4242
steps:
4343

4444
- name: Checkout Repo
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v5
4646

4747
- name: Set up Docker
4848
uses: docker/setup-buildx-action@v3
@@ -55,32 +55,32 @@ jobs:
5555
docker build . -t localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG && \
5656
docker push localhost:5001/java-enforcer-sample-site:$SAMPLE_SITE_IMAGE_TAG
5757
58-
- uses: azure/setup-helm@v3
58+
- uses: azure/setup-helm@v4
5959
with:
60-
version: '3.14.2'
60+
version: '3.19.0'
6161

6262
- name: Clone helm charts repo - mock-collector
63-
uses: actions/checkout@v4
63+
uses: actions/checkout@v5
6464
with:
6565
repository: PerimeterX/connect-helm-charts
6666
token: ${{ secrets.CONNECT_PULL_TOKEN }}
67-
ref: mock-collector-0.1.1
67+
ref: mock-collector-0.1.2
6868
path: ./deploy_charts/mock-collector
6969

7070
- name: Clone helm charts repo - fuzzer
71-
uses: actions/checkout@v4
71+
uses: actions/checkout@v5
7272
with:
7373
repository: PerimeterX/connect-helm-charts
7474
token: ${{ secrets.CONNECT_PULL_TOKEN }}
75-
ref: fuzzer-0.2.0
75+
ref: fuzzer-0.3.1
7676
path: ./deploy_charts/fuzzer
7777

7878
- name: Clone helm charts repo - sample-site
79-
uses: actions/checkout@v4
79+
uses: actions/checkout@v5
8080
with:
8181
repository: PerimeterX/connect-helm-charts
8282
token: ${{ secrets.CONNECT_PULL_TOKEN }}
83-
ref: sample-site-0.5.0
83+
ref: sample-site-0.6.1
8484
path: ./deploy_charts/sample-site
8585

8686
- name: Set up Google Cloud SDK
@@ -104,14 +104,17 @@ jobs:
104104
helm install mock-collector ./deploy_charts/mock-collector/charts/mock-collector \
105105
--set image.repository=localhost:5001/mock-collector \
106106
--set image.tag=$MOCK_COLLECTOR_IMAGE_TAG \
107-
--set imagePullPolicy=Always --wait
107+
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
108+
--set imagePullPolicy=Always \
109+
--wait
108110
109111
- name: set secrets in enforcer config
110112
run: |
111113
cat ./ci_files/enforcer-config.json |\
112114
jq '.px_app_id="${{ secrets.PX_APP_ID }}"' |\
113115
jq '.px_cookie_secret="${{ secrets.TEST_COOKIE_SECRET }}"' |\
114-
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' > /tmp/enforcer-config.json
116+
jq '.px_auth_token="${{ secrets.PX_AUTH_TOKEN }}"' |\
117+
jq '.px_logger_auth_token="${{ secrets.PX_LOGGER_AUTH_TOKEN }}"' > /tmp/enforcer-config.json
115118
116119
- name: log enforcer config
117120
run: cat /tmp/enforcer-config.json
@@ -122,6 +125,9 @@ jobs:
122125
-f ./ci_files/enforcer-values.yaml \
123126
--set image.name=localhost:5001/java-enforcer-sample-site \
124127
--set image.tag=$SAMPLE_SITE_IMAGE_TAG \
128+
--set appId=${{ secrets.PX_APP_ID }} \
129+
--set cookieSecret=${{ secrets.TEST_COOKIE_SECRET }} \
130+
--set authToken=${{ secrets.PX_AUTH_TOKEN }} \
125131
--set-file enforcerConfig.content=/tmp/enforcer-config.json \
126132
--wait
127133

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ examples/examples.iml
1010
.DS_Store
1111
.classpath
1212
.project
13-
.factorypath
13+
.factorypath
14+
.smarttomcat

CHANGELOG.md

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

315
## [v6.15.1](https://github.com/PerimeterX/perimeterx-java-sdk/compare/6.15.1...HEAD) (2025-09-08)
416
- Added additional updateReason RISK to Telemetry flow

ci_files/enforcer-config.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
"px_custom_first_party_xhr_endpoint": "/custom_first_party_xhr_endpoint",
2020
"px_custom_first_party_captcha_endpoint": "/custom_first_party_captcha_endpoint",
2121
"px_custom_first_party_prefix": "/custom_first_party_prefix",
22-
"px_filter_by_route": [
23-
"/filtered_route"
24-
],
2522
"px_monitored_routes": [
2623
"/monitored_route",
2724
"/monitored_route/suffix",
@@ -116,5 +113,6 @@
116113
],
117114
"px_cors_support_enabled": true,
118115
"px_cors_preflight_request_filter_enabled": true,
119-
"px_url_decode_reserved_characters": true
116+
"px_url_decode_reserved_characters": true,
117+
"px_secured_pxhd_enabled": true
120118
}

ci_files/spec-tests-values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
additionalArgs:
2+
- "--retries"
3+
- "3"
4+
- "--retry-delay"
5+
- "10"
6+
17
internalMockCollectorURL: "http://mock-collector-mock-collector:3001"
28
siteURL: "http://java-enforcer-sample-site:3000"
39

0 commit comments

Comments
 (0)