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

Release CSEC Java Agent Version 1.3.0 #252

Merged
merged 186 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
25aebee
API-Endpoint support for sun-net-httpserver
IshikaDawda Jan 4, 2024
f886876
added API-Endpoint unit tests for sun-net-httpserver
IshikaDawda Jan 4, 2024
f28fbe8
added play framework API endpoint support
IshikaDawda Jan 16, 2024
491513e
API endpoint support for CXF Jax-rs
IshikaDawda Jan 21, 2024
1b9f53e
UTs for API endpoint support for CXF Jax-RS
IshikaDawda Feb 12, 2024
9a624ef
enabled posting data to SE
IshikaDawda Feb 14, 2024
5b575c4
enabled API endpoint support
IshikaDawda Feb 14, 2024
746b63b
Unit Tests for API endpoint support for play-2.6
IshikaDawda Feb 15, 2024
6c0d9aa
Unit Tests for API endpoint support for play-2.13_2.7
IshikaDawda Feb 15, 2024
c9c7669
API endpoint support for jetty server
IshikaDawda Feb 19, 2024
02b623f
Unit tests for jetty server API endpoint support
IshikaDawda Feb 19, 2024
2f99ae6
Spray Http incoming request interception
lovesh-ap Feb 21, 2024
15b91fb
Spray Http request body interception &
lovesh-ap Feb 21, 2024
2b276ae
Spray Http response body interception &
lovesh-ap Feb 21, 2024
c51f67a
Spray Http request header extraction
IshikaDawda Feb 22, 2024
d25b90b
Fix incorrect protocol
lovesh-ap Feb 22, 2024
e93efbe
add protocol from incoming request uri
IshikaDawda Feb 22, 2024
da892ab
set tracing header into meta deta
lovesh-ap Feb 22, 2024
f6795a8
updated locking attribute for spray response
IshikaDawda Feb 22, 2024
4a07678
Added Logging message constants
IshikaDawda Feb 22, 2024
0fb2089
code cleanup
IshikaDawda Feb 22, 2024
e662a44
updated comment
IshikaDawda Feb 23, 2024
6d99381
Extract server port info for spray can
lovesh-ap Feb 23, 2024
af84562
unit tests for spray-http support
IshikaDawda Feb 23, 2024
da213dd
added applicationUUID to ApplicationURLMappings Json
IshikaDawda Feb 23, 2024
b3ca3a5
Spray server request instrumentation
lovesh-ap Feb 26, 2024
a898d4b
Spray-Can response body interception &
IshikaDawda Feb 26, 2024
a4562e9
add critical logging for spray-can instrumentation
IshikaDawda Feb 26, 2024
f47cd69
removed Weaver callOriginal() from constructor
IshikaDawda Feb 26, 2024
a401e55
Fix for NR-232224
IshikaDawda Feb 26, 2024
c4750fd
gRPC: Added reason in the critical logs fuzz request failed
monu-k2io Feb 26, 2024
5c86ae6
Spray client outgoing request interception
IshikaDawda Feb 26, 2024
bda3948
Spray client adding CSEC headers to outgoing request
IshikaDawda Feb 26, 2024
389085e
Unit tests for Spray client support
IshikaDawda Feb 26, 2024
ae57406
Merge branch 'feature/NR-222163' into feature/NR-211181/api-endpoint/cxf
lovesh-ap Feb 26, 2024
b6c10e6
Merge pull request #154 from newrelic/feature/NR-211181/api-endpoint/…
IshikaDawda Feb 26, 2024
16f78d6
Merge pull request #173 from newrelic/feature/NR-211181/api-endpoint/cxf
IshikaDawda Feb 26, 2024
e37cb94
Merge branch 'feature/NR-222163' into feature/NR-211181/api-endpoint/…
IshikaDawda Feb 26, 2024
a8bea21
Merge pull request #163 from newrelic/feature/NR-211181/api-endpoint/…
IshikaDawda Feb 26, 2024
9ae73e8
[NR-222166] Unit tests & fixes for API endpoint support (#185)
IshikaDawda Feb 26, 2024
a902915
Merge pull request #189 from newrelic/feature/NR-229978/jetty
IshikaDawda Feb 26, 2024
951496f
[NR-223398] API endpoint support & unit tests for Embed Apache-Tomcat
IshikaDawda Feb 26, 2024
07cc256
update imports
IshikaDawda Feb 26, 2024
6a957b8
Remove dispatcher true from wevaved methods
lovesh-ap Feb 27, 2024
b19332a
Merge branch 'develop' into support/spray-http
lovesh-ap Feb 27, 2024
c56d947
Merge branch 'support/spray-http' into support/spray-client
IshikaDawda Feb 27, 2024
aa66829
Merge branch 'support/spray-http' into support/spray-can
IshikaDawda Feb 27, 2024
2851d19
Merge branch 'support/spray-can' into support/spray-client
IshikaDawda Feb 27, 2024
a00c23d
Merge branch 'develop' into feature/NR-222163
IshikaDawda Feb 28, 2024
8c23638
Merge branch 'develop' into feature/NR-222163
IshikaDawda Feb 28, 2024
c370c9c
API endpoint support for Mule server (#196)
IshikaDawda Feb 28, 2024
9295b95
add config security.is_home_app
lovesh-ap Feb 28, 2024
5eb59de
Fix for issue NR-233188
IshikaDawda Feb 28, 2024
e2daadd
Disabled jersey tests
IshikaDawda Feb 28, 2024
0a6179f
updated UTs for apache-tomcat
IshikaDawda Feb 28, 2024
4070ca8
NR-223811 Extract server port from websphere applications
lovesh-ap Mar 1, 2024
e0c2d59
Fix: API Endpoint Support Servlet 3 (#197)
IshikaDawda Mar 1, 2024
f62c901
updated packaging for play
IshikaDawda Mar 1, 2024
c5af849
Enable netty instrumentation
lovesh-ap Mar 4, 2024
724bc73
NR-234865 : Fix misleading operational lock for request and response
IshikaDawda Mar 4, 2024
8f83af5
NR-234868 : add instrumentation to SimpleChannelInboundHandler#channe…
lovesh-ap Mar 4, 2024
56ff83c
NR-234868 : add call to original and fix content type setter
lovesh-ap Mar 4, 2024
cce8e62
Add critical logging to netty support
IshikaDawda Mar 4, 2024
bb24c9e
remove lamda function to fix class circularity error
lovesh-ap Mar 4, 2024
4cfba3d
Drop CSEC generated events
lovesh-ap Mar 4, 2024
232c2ba
Fix for SSL Exception with missing port detection
lovesh-ap Mar 4, 2024
4738cb5
Add checks to operational lock mechanism
IshikaDawda Mar 4, 2024
55ef6e4
NR-234865 : Fixed request processing checks & protocol name
IshikaDawda Mar 4, 2024
5b4ec28
NR-234863 : Fixed and add more unit tests to netty support
IshikaDawda Mar 4, 2024
b3b8d92
NR-234867 : Fixed response processing checks
IshikaDawda Mar 5, 2024
2eec873
NR-238324 : detect netty server port on startup
lovesh-ap Mar 5, 2024
f62791f
NR-238324 : separate instrumentation modules for 4.0.0 and 4.0.8
lovesh-ap Mar 5, 2024
e3db960
Updated build.gradle
IshikaDawda Mar 5, 2024
294b59c
Fix for incorrect user class and stack trace in RXSS events
lovesh-ap Mar 6, 2024
b0026f1
Fix NPE generated due to getCustomAttribute(String, java.lang.Class)
lovesh-ap Mar 6, 2024
5dbd3dc
NR-234900 : Add instrumentation to setObject of prepared statement
lovesh-ap Mar 11, 2024
a4d7b5a
NR-234900 : Add instrumentation to remaining setters of PreparedState…
IshikaDawda Mar 15, 2024
b3edf93
Add reason to critical logging for fuzz fail request
IshikaDawda Mar 18, 2024
a424643
Merge branch 'develop' into feature/NR-222163
IshikaDawda Mar 19, 2024
a8133ef
NR-234880 : Revamp user class deetction technique by the help of API …
lovesh-ap Mar 19, 2024
6c82a9c
add null checks to ApplicationURLMapping
IshikaDawda Mar 19, 2024
02a44f6
fix checks for user class detection using API endpoint handlers
IshikaDawda Mar 19, 2024
8a090bc
add annotated UserLevelService Method true for jax-rs
IshikaDawda Mar 20, 2024
99f3914
updated Unit tests for spring and jax-rs support
IshikaDawda Mar 20, 2024
4e28185
Merge branch 'test/home-grown-apps' into enhancments/revamp-234880
IshikaDawda Mar 20, 2024
226791c
Added Logging message constants for App Endpoint
IshikaDawda Mar 26, 2024
5a05f5b
Merge pull request #191 from newrelic/fix/critical-logging
lovesh-ap Mar 27, 2024
b615bcb
Cleanup : removed unused POJO elemnts
lovesh-ap Mar 28, 2024
33353f6
Fix for NR-234411 (#206)
IshikaDawda Mar 28, 2024
0e839fe
Fix for NR-234390 (#208)
IshikaDawda Mar 28, 2024
60f1304
Merge branch 'main' into feature/NR-222163
IshikaDawda Mar 28, 2024
cce0fbe
Merge branch 'support/Netty-NR-234864' into ut/Netty-NR-234863
IshikaDawda Mar 29, 2024
3f30691
Add more UTs to netty support
IshikaDawda Mar 29, 2024
3977441
Merge remote-tracking branch 'origin/main' into release/v1.2.1
IshikaDawda Mar 29, 2024
a0f1d15
Enabled jCache support
IshikaDawda Mar 29, 2024
fb37167
Merge branch 'main' into develop
lovesh-ap Apr 1, 2024
d069b11
Merge branch 'develop' into release/v1.2.1
lovesh-ap Apr 1, 2024
24ca654
Merge pull request #193 from newrelic/support/spray-http
lovesh-ap Apr 1, 2024
26f2447
Merge pull request #195 from newrelic/support/spray-can
IshikaDawda Apr 1, 2024
363cf9e
Merge pull request #221 from newrelic/support/spray-client
lovesh-ap Apr 1, 2024
0556190
Merge pull request #202 from newrelic/support/Netty-NR-234864
lovesh-ap Apr 1, 2024
649766d
Merge pull request #200 from newrelic/ut/Netty-NR-234863
IshikaDawda Apr 1, 2024
2b7bb44
Merge branch 'develop' into feature/NR-222163
lovesh-ap Apr 1, 2024
18972b3
Merge pull request #186 from newrelic/feature/NR-222163
IshikaDawda Apr 1, 2024
e82b0d7
Merge branch 'develop' into release/v1.2.1
lovesh-ap Apr 1, 2024
baf5a01
Exclude milestore release for JAX RX
lovesh-ap Apr 1, 2024
b9f295c
CSEC version bump to 1.2.1
lovesh-ap Apr 1, 2024
0edc984
Merge pull request #222 from newrelic/release/jax-rx-verifier-fix
lovesh-ap Apr 1, 2024
feae0af
Fix unit tests (#224)
IshikaDawda Apr 2, 2024
0e7068a
Merge branch 'develop' into test/home-grown-apps
lovesh-ap Apr 2, 2024
0a2e32d
Fix compile time errors
lovesh-ap Apr 2, 2024
172c072
NR-218653 : Fix FileAlreadyExistsException
lovesh-ap Apr 2, 2024
5da868f
Fixed User Class Detection in Sun-net-httpserver
IshikaDawda Apr 2, 2024
00a6089
Changelogs for Release v1.2.1
IshikaDawda Apr 3, 2024
64485e9
Update README
IshikaDawda Apr 3, 2024
6e66f83
Merge branch 'release/v1.2.1' into fix/NR-232657
IshikaDawda Apr 5, 2024
3db4c89
NR-256007 - Fix NoClassDefFoundError raised in javax packages
lovesh-ap Apr 5, 2024
134b878
Version Bump to 1.2.2
lovesh-ap Apr 5, 2024
3e0d255
Merge branch 'develop' into fix/NCDFE-NR-256007
lovesh-ap Apr 5, 2024
3851c49
Fix for NR-232663
IshikaDawda Apr 8, 2024
5c87476
NR-258894 : Spring weblcient initial support version 5.x & 6.x
lovesh-ap Apr 15, 2024
95329b1
Merge branch 'main' into develop
lovesh-ap Apr 19, 2024
6d3470f
Merge branch 'develop' into test/home-grown-apps
lovesh-ap Apr 19, 2024
b86f442
Merge pull request #219 from newrelic/test/home-grown-apps
lovesh-ap Apr 19, 2024
e48b2fa
Merge branch 'develop' into enhancments/revamp-234880
lovesh-ap Apr 19, 2024
59483f4
Merge branch 'develop' into fix/NR-232657
lovesh-ap Apr 19, 2024
747be23
Merge branch 'develop' into release/v1.2.1
lovesh-ap Apr 19, 2024
10912c3
Merge branch 'release/v1.2.1' into fix/NR-232657
lovesh-ap Apr 19, 2024
155cf94
remove nr internal packages from checks
lovesh-ap Apr 22, 2024
7948e7d
Merge pull request #218 from newrelic/fix/NR-232657
lovesh-ap Apr 22, 2024
343e528
Revert "Support for instrumentation of setObject method in prepared s…
lovesh-ap Apr 22, 2024
d0c2ec4
Merge pull request #234 from newrelic/revert-218-fix/NR-232657
IshikaDawda Apr 22, 2024
211bfb3
Merge branch 'refs/heads/develop' into fix/user-class-detection
IshikaDawda Apr 22, 2024
18969ec
User class detection in sun-net-httpserver
IshikaDawda Apr 22, 2024
2e801dd
Fix for duplicate HTTP_REQUEST events in spring-webClient
IshikaDawda Apr 23, 2024
47d70b5
NR-220283 : add missing commands to list
lovesh-ap Apr 24, 2024
b5e0789
NR-220289 : fix type and command values in event generation.
lovesh-ap Apr 24, 2024
62523cb
Fix top level stack trace from all the registered operations
lovesh-ap Apr 24, 2024
bda7ee0
Add missing fields to AgentMetaData constructor
IshikaDawda Apr 24, 2024
5e00b67
Merge pull request #237 from newrelic/fix/user-class-detection
IshikaDawda Apr 29, 2024
3c30217
Merge remote-tracking branch 'refs/remotes/origin/develop' into enhan…
IshikaDawda Apr 29, 2024
b70f1ca
Fixed failing UTs
IshikaDawda Apr 29, 2024
729734c
Fixed failing UTs
IshikaDawda Apr 29, 2024
99772eb
Merge pull request #225 from newrelic/fix/NR-218653-FileAlreadyExists…
lovesh-ap Apr 30, 2024
1fc00be
Merge pull request #226 from newrelic/fix/NCDFE-NR-256007
lovesh-ap Apr 30, 2024
98c8703
Merge branch 'develop' into fix/NR-232663-grails
lovesh-ap Apr 30, 2024
86eb27e
CSEC agent home path fallback to AGENT_JAR_LOCATION
lovesh-ap Apr 30, 2024
37ff23d
Verify CSEC_HOME creation is successful.
lovesh-ap Apr 30, 2024
54e7380
add checks to register media type wrt content-type reflected in CC
lovesh-ap May 3, 2024
2b3088a
Merge pull request #233 from newrelic/fix/NR-232663-grails
IshikaDawda May 7, 2024
0955160
Merge branch 'develop' into support/spring-webclient
IshikaDawda May 8, 2024
2f01f26
remove sys-out
IshikaDawda May 10, 2024
ad8439a
[NR-249812] Support For Netty Reactor Server (#220)
IshikaDawda May 10, 2024
f4aabf5
code cleanup
IshikaDawda May 10, 2024
9b15994
Merge branch 'refs/heads/develop' into support/spring-webclient
IshikaDawda May 10, 2024
332d090
Merge pull request #244 from newrelic/fix/form-urlencoded-NR-259579
lovesh-ap May 13, 2024
f07a1d1
Fix regression in File Integrity Event generation
lovesh-ap May 13, 2024
372bbf2
Refine fuzzing endpoints before replay
lovesh-ap May 13, 2024
e1712bd
Merge pull request #239 from newrelic/support/spring-webclient
lovesh-ap May 13, 2024
488c695
Merge branch 'refs/heads/develop' into fix/FILE_INTEGRITY/NR-265194
IshikaDawda May 13, 2024
988488a
Add fallback to log file creation if, file permissions are not presen…
lovesh-ap May 13, 2024
54ea9f5
Merge branch 'develop' into NR-223811-websphere-8
lovesh-ap May 14, 2024
3de6420
Merge pull request #198 from newrelic/NR-223811-websphere-8
lovesh-ap May 14, 2024
a8927a2
Merge pull request #217 from newrelic/enhancments/revamp-234880
lovesh-ap May 14, 2024
4b4440b
Remove exception log on std err
lovesh-ap May 14, 2024
97810b3
Merge pull request #243 from newrelic/Improvement/nr-csec-home-260723
lovesh-ap May 14, 2024
edb3af7
Merge pull request #249 from newrelic/Improvement/NR-265527/refine-re…
lovesh-ap May 14, 2024
769b1f2
CSEC version bump to 2.0.0
IshikaDawda May 14, 2024
39608c4
Merge pull request #248 from newrelic/fix/FILE_INTEGRITY/NR-265194
IshikaDawda May 14, 2024
3c85521
Updated Changelogs, README for Release 2.0.0
IshikaDawda May 14, 2024
754e369
Merge branch 'refs/heads/develop' into release/v2.0.0
IshikaDawda May 14, 2024
8d9b480
Schema update for ServerConnectionConfiguration
lovesh-ap May 15, 2024
4687827
Change release version to 1.3.0, following https://semver.org/#semant…
lovesh-ap May 15, 2024
8b26550
add NR_CSEC_JAVA_HEAD_REQUEST to security metadata
lovesh-ap May 15, 2024
c8c87cc
Merge pull request #250 from newrelic/fix/replay-refine
lovesh-ap May 15, 2024
75fdc95
Fix for NPE occurring in AgentMetaData
IshikaDawda May 15, 2024
e1c004c
Fixed the null entry in case of HEAD request in endpoints list
lovesh-ap May 15, 2024
308ff71
disabled spymemcache support
IshikaDawda May 15, 2024
c94da8f
Support for instrumentation of setObject method in prepared statement
IshikaDawda May 16, 2024
9061edd
Merge pull request #251 from newrelic/fix/NPE-NR-262449
IshikaDawda May 16, 2024
15b507a
Update changelog and add the release date
lovesh-ap May 16, 2024
bb60d41
Close all the connections from the pool after HEAD firing
IshikaDawda May 16, 2024
9d15ee5
Acquire Thread Lock while performing IAST file creation and deletion
lovesh-ap May 16, 2024
9005ffd
Fix PreparedStatement UTs
IshikaDawda May 16, 2024
74de024
Update change log remove fix for multiple rxss event generation
lovesh-ap May 17, 2024
a280632
Update change log add Revamp user class detection technique
lovesh-ap May 17, 2024
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
29 changes: 29 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ Noteworthy changes to the agent are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.0] - 2024-5-16
### Changes
- [PR-186](https://github.com/newrelic/csec-java-agent/pull/186) Feature to detect API Endpoint of the Application [NR-222163](https://new-relic.atlassian.net/browse/NR-222163)
- [PR-132](https://github.com/newrelic/csec-java-agent/pull/132) JCache Support : The security agent now also supports jCache 1.0.0 and above [NR-175383](https://new-relic.atlassian.net/browse/NR-175383)
- [PR-193](https://github.com/newrelic/csec-java-agent/pull/193) Spray HTTP Server Support : The security agent now also supports Spray HTTP Server version 1.3.1 and above (with scala 2.11 and above) [NR-230246](https://new-relic.atlassian.net/browse/NR-230246), [NR-230248](https://new-relic.atlassian.net/browse/NR-230248)
- [PR-195](https://github.com/newrelic/csec-java-agent/pull/195) Spray Can Server Support : The security agent now also supports Spray Can Server version 1.3.1 and above (with scala 2.11 and above) [NR-230246](https://new-relic.atlassian.net/browse/NR-230246), [NR-230248](https://new-relic.atlassian.net/browse/NR-230248)
- [PR-194](https://github.com/newrelic/csec-java-agent/pull/194) Spray Client Support : The security agent now also supports Spray Client version 1.3.1 and above (with scala 2.11 and above) [NR-230243](https://new-relic.atlassian.net/browse/NR-230243), [NR-230245](https://new-relic.atlassian.net/browse/NR-230245)
- [PR-202](https://github.com/newrelic/csec-java-agent/pull/202) Netty Server support : The security agent now also supports Netty Server version 4.0.0.Final and above. [NR-234864](https://new-relic.atlassian.net/browse/NR-234864)
- [PR-220](https://github.com/newrelic/csec-java-agent/pull/220) Netty Reactor Server support : The security agent now also supports Netty Reactor Server version 0.7.0.RELEASE and above. [NR-249812](https://new-relic.atlassian.net/browse/NR-249812)
- [PR-239](https://github.com/newrelic/csec-java-agent/pull/239) Spring WebClient Support : The security agent now also supports Spring WebClient version 5.0.0.RELEASE and above. [NR-258894](https://new-relic.atlassian.net/browse/NR-258894), [NR-258895](https://new-relic.atlassian.net/browse/NR-258895)
- [PR-219](https://github.com/newrelic/csec-java-agent/pull/219) Enable functionality to scan NewRelic applications using `security.is_home_app` config, default value is false
- [PR-217](https://github.com/newrelic/csec-java-agent/pull/217) Revamp user class detection technique, use server level endpoints. [NR-211161](https://new-relic.atlassian.net/browse/NR-211161)
- Resin Support : The security agent now also supports resin server [NR-171577](https://new-relic.atlassian.net/browse/NR-171577)
- Anorm Support : The security agent now also supports Anorm Datastore version 2.0 to 2.5 [NR-171575](https://new-relic.atlassian.net/browse/NR-171575)

### Fixes
- [PR-202](https://github.com/newrelic/csec-java-agent/pull/202) Extract Server Configuration to resolve IAST localhost connection with application for Netty server. [NR-238324](https://new-relic.atlassian.net/browse/NR-238324)
- [PR-237](https://github.com/newrelic/csec-java-agent/pull/237) Fix for Correct User Class Detection in Sun-Net-HttpServer [NR-254564](https://new-relic.atlassian.net/browse/NR-254564)
- [PR-243](https://github.com/newrelic/csec-java-agent/pull/243) Improvement in fallback mechanism for NR_CSEC_HOME [NR-260723](https://new-relic.atlassian.net/browse/NR-260723)
- [PR-248](https://github.com/newrelic/csec-java-agent/pull/248) Fix for Regression in File Integrity Event Generation [NR-267172](https://new-relic.atlassian.net/browse/NR-267172)
- [PR-249](https://github.com/newrelic/csec-java-agent/pull/249), [PR-244](https://github.com/newrelic/csec-java-agent/pull/244) Improvements in IAST Replay [NR-267169](https://new-relic.atlassian.net/browse/NR-267169), [NR-265208](https://new-relic.atlassian.net/browse/NR-265208)
- [PR-235](https://github.com/newrelic/csec-java-agent/pull/235) Fix for NullPointerException observed in JDBC-GENERIC [NR-232657](https://new-relic.atlassian.net/browse/NR-232657)
- [PR-226](https://github.com/newrelic/csec-java-agent/pull/226) Fix for NoClassDefFoundError observed in JAVAX-JNDI Instrumentation [NR-254566](https://new-relic.atlassian.net/browse/NR-254566)
- [PR-225](https://github.com/newrelic/csec-java-agent/pull/225) Fix for FileAlreadyExistException observed in IAST Replay [NR-254565](https://new-relic.atlassian.net/browse/NR-254565)
- [PR-222](https://github.com/newrelic/csec-java-agent/pull/222) Exclude Milestone Release for Jax-RS, due to release of version 4.0.0-M2 on 9th March 2024 [NR-256459](https://new-relic.atlassian.net/browse/NR-256459)
- [PR-232](https://github.com/newrelic/csec-java-agent/pull/232) Exclude Latest Release version 12.7.0 for mssql-jdbc released on 08th April 2024 [NR-256461](https://new-relic.atlassian.net/browse/NR-256461)
- [PR-247](https://github.com/newrelic/csec-java-agent/pull/247) Exclude Latest Release version 1.7.14 for Rhino-JS-Engine released on 29th April 2024 [NR-265206](https://new-relic.atlassian.net/browse/NR-265206)
- [PR-219](https://github.com/newrelic/csec-java-agent/pull/219) Fixed an issue where lambda functions were causing class circularity errors [NR-239192](https://new-relic.atlassian.net/browse/NR-239192)

## [1.2.1] - 2024-4-19
### Fixes
- [NR-259467](https://new-relic.atlassian.net/browse/NR-259467) Fix issue of nested event generation from CSEC's agent itself [PR-230](https://github.com/newrelic/csec-java-agent/pull/230)
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ The agent automatically instruments the following frameworks.
- Mule ESB 3.6 to 3.9.x
- gRPC 1.4.0 to latest**
- Jersey 2.0 to latest
- Akka Server 10.0 to latest (with scala 2.11 and above)
- Spray Can 1.3.1 to latest (with scala 2.11 and above)
- Akka HTTP Server 10.0 to latest (with scala 2.11 and above)
- Spray HTTP 1.3.1 to latest (with scala 2.11 and above)
- Netty Server 4.0.0.Final to latest
- Netty Reactor Server 0.7.0.RELEASE to latest

** IAST for **gRPC** requires the dependency [protobuf-java-util](https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java-util) for IAST request replay.

Expand Down Expand Up @@ -66,6 +72,9 @@ The agent automatically instruments the following HTTP clients and messaging ser
- Xalan XPATH 2.1.0 to latest
- Async Http Client from 2.0 to latest
- Ning Async HTTP Client 1.0.0 to latest
- Akka Client 10.0 to latest (with scala 2.11 and above)
- Spray Can Client 1.3.1 to latest (with scala 2.11 and above)
- Spring WebClient 5.0.0.RELEASE to latest

### Datastores

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The agent version.
agentVersion=1.2.1
agentVersion=1.3.0
jsonVersion=1.2.1
# Updated exposed NR APM API version.
nrAPIVersion=8.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.newrelic.api.agent.Token;
import com.newrelic.api.agent.security.NewRelicSecurity;
import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ICsecApiConstants;
import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper;
import com.newrelic.api.agent.security.schema.AgentMetaData;
Expand Down Expand Up @@ -61,7 +62,7 @@ public static boolean acquireServletLockIfPossible() {
public static void postProcessHttpRequest(Boolean isServletLockAcquired, StringBuilder responseBody, String contentType, String className, String methodName, Token token) {
try {
token.linkAndExpire();
if(!isServletLockAcquired || !NewRelicSecurity.isHookProcessingActive()){
if(!isServletLockAcquired || !NewRelicSecurity.isHookProcessingActive() || Boolean.TRUE.equals(NewRelicSecurity.getAgent().getSecurityMetaData().getCustomAttribute("RXSS_PROCESSED", Boolean.class))){
return;
}
NewRelicSecurity.getAgent().getSecurityMetaData().getResponse().setResponseContentType(contentType);
Expand Down Expand Up @@ -123,7 +124,7 @@ public static void preProcessHttpRequest (Boolean isServletLockAcquired, HttpReq
try {
queryString = httpRequest.getUri().rawQueryString().get();
} catch (NoSuchElementException ignored) {
// ignore NoSuchElementException there is no value present in rawQueryString
// ignore NoSuchElementException there is no value present in rawQueryString
} finally {
if (queryString != null && !queryString.trim().isEmpty()) {
securityRequest.setUrl(securityRequest.getUrl() + QUESTION_MARK + queryString);
Expand Down Expand Up @@ -180,6 +181,9 @@ public static void processHttpRequestHeader(HttpRequest request, com.newrelic.ap
} else if(GenericHelper.CSEC_PARENT_ID.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(GenericHelper.CSEC_PARENT_ID, request.getHeader(headerKey).get().value());
} else if (ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST, true);
}
String headerFullValue = nextHeader.value();
if (headerFullValue != null && !headerFullValue.trim().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.newrelic.api.agent.Token;
import com.newrelic.api.agent.security.NewRelicSecurity;
import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ICsecApiConstants;
import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper;
import com.newrelic.api.agent.security.schema.AgentMetaData;
Expand Down Expand Up @@ -183,6 +184,9 @@ public static void processHttpRequestHeader(HttpRequest request, com.newrelic.ap
} else if(GenericHelper.CSEC_PARENT_ID.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(GenericHelper.CSEC_PARENT_ID, request.getHeader(headerKey).get().value());
} else if (ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST, true);
}
String headerFullValue = nextHeader.value();
if (headerFullValue != null && !headerFullValue.trim().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.newrelic.api.agent.Token;
import com.newrelic.api.agent.security.NewRelicSecurity;
import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ICsecApiConstants;
import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper;
import com.newrelic.api.agent.security.schema.AgentMetaData;
Expand Down Expand Up @@ -183,6 +184,9 @@ public static void processHttpRequestHeader(HttpRequest request, com.newrelic.ap
} else if(GenericHelper.CSEC_PARENT_ID.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(GenericHelper.CSEC_PARENT_ID, request.getHeader(headerKey).get().value());
} else if (ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST, true);
}
String headerFullValue = nextHeader.value();
if (headerFullValue != null && !headerFullValue.trim().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.newrelic.api.agent.Token;
import com.newrelic.api.agent.security.NewRelicSecurity;
import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ICsecApiConstants;
import com.newrelic.api.agent.security.instrumentation.helpers.LowSeverityHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.ServletHelper;
import com.newrelic.api.agent.security.schema.AgentMetaData;
Expand Down Expand Up @@ -193,6 +194,9 @@ public static void processHttpRequestHeader(HttpRequest request, com.newrelic.ap
} else if(GenericHelper.CSEC_PARENT_ID.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(GenericHelper.CSEC_PARENT_ID, request.getHeader(headerKey).get().value());
} else if (ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST.equals(headerKey)) {
NewRelicSecurity.getAgent().getSecurityMetaData()
.addCustomAttribute(ICsecApiConstants.NR_CSEC_JAVA_HEAD_REQUEST, true);
}
String headerFullValue = nextHeader.value();
if (headerFullValue != null && !headerFullValue.trim().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nr.instrumentation.security.apache.struts2;
package com.newrelic.agent.security.instrumentation.apache.struts2;

import com.newrelic.api.agent.security.schema.ApplicationURLMapping;
import com.newrelic.api.agent.security.instrumentation.helpers.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.newrelic.api.agent.weaver.MatchType;
import com.newrelic.api.agent.weaver.Weave;
import com.newrelic.api.agent.weaver.Weaver;
import com.nr.instrumentation.security.apache.struts2.StrutsHelper;
import com.newrelic.agent.security.instrumentation.apache.struts2.StrutsHelper;
import java.util.List;

@Weave(type = MatchType.Interface, originalName = "com.opensymphony.xwork2.config.Configuration")
Expand Down
22 changes: 22 additions & 0 deletions instrumentation-security/apache-tomcat-10/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
dependencies {
implementation(project(":newrelic-security-api"))
implementation("com.newrelic.agent.java:newrelic-weaver-api:${nrAPIVersion}")
implementation("com.newrelic.agent.java:newrelic-api:${nrAPIVersion}")
implementation("org.apache.tomcat.embed:tomcat-embed-core:10.0.0")
implementation("org.apache.tomcat:tomcat-juli:10.0.0")
}

jar {
manifest { attributes 'Implementation-Title': 'com.newrelic.instrumentation.security.apache-tomcat-10' }
}

verifyInstrumentation {
passesOnly('org.apache.tomcat.embed:tomcat-embed-core:[10.0.0-M1,)')
fails('org.apache.tomcat.embed:tomcat-embed-core:[7.0.0,10.0.0-M1)')
excludeRegex '.*-(b|gfa|beta|RC)[0-9]*'
}

site {
title 'Tomcat'
type 'Appserver'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package com.newrelic.agent.security.instrumentation.apache.tomcat10;

import com.newrelic.api.agent.security.NewRelicSecurity;
import com.newrelic.api.agent.security.instrumentation.helpers.GenericHelper;
import com.newrelic.api.agent.security.instrumentation.helpers.URLMappingsHelper;
import com.newrelic.api.agent.security.schema.ApplicationURLMapping;
import com.newrelic.api.agent.security.utils.logging.LogLevel;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletRegistration;
import java.util.Collection;
import java.util.Map;

public class HttpServletHelper {
private static final String EMPTY = "";
private static final String WILDCARD = "*";
private static final String SEPARATOR = "/";
public static final String APACHE_TOMCAT_10 = "APACHE-TOMCAT-10";

public static void gatherURLMappings(ServletContext servletContext) {
try {
Map<String, ? extends ServletRegistration> servletRegistrations = servletContext.getServletRegistrations();
getJSPMappings(servletContext, SEPARATOR);

for (ServletRegistration servletRegistration : servletRegistrations.values()) {
for (String mapping : servletRegistration.getMappings()) {
String path = (mapping.startsWith(SEPARATOR) ? EMPTY : SEPARATOR) + mapping;
URLMappingsHelper.addApplicationURLMapping(new ApplicationURLMapping(WILDCARD, path, servletRegistration.getClassName()));
}
}
} catch (Exception e){
NewRelicSecurity.getAgent().log(LogLevel.WARNING, String.format(GenericHelper.ERROR_WHILE_GETTING_APP_ENDPOINTS, APACHE_TOMCAT_10, e.getMessage()), e, HttpServletHelper.class.getName());
}
}

private static void getJSPMappings(ServletContext servletContext, String dir) {
try {
if(dir.endsWith(SEPARATOR)){
Collection<String> resourcePaths = servletContext.getResourcePaths(dir);
for (String path : resourcePaths) {
if(path.endsWith(SEPARATOR)) {
getJSPMappings(servletContext, path);
}
else if(path.endsWith(".jsp") || path.endsWith(".jspx") || path.endsWith(".JSP") || path.endsWith(".JSPX")) {
URLMappingsHelper.addApplicationURLMapping(new ApplicationURLMapping(WILDCARD, (path.startsWith(SEPARATOR) ? EMPTY : SEPARATOR) + path));
}
}
}
} catch (Exception e){
NewRelicSecurity.getAgent().log(LogLevel.WARNING, String.format(GenericHelper.ERROR_WHILE_GETTING_APP_ENDPOINTS, APACHE_TOMCAT_10, e.getMessage()), e, HttpServletHelper.class.getName());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.newrelic.agent.security.instrumentation.apache.tomcat10;

import com.newrelic.api.agent.weaver.MatchType;
import com.newrelic.api.agent.weaver.Weave;
import com.newrelic.api.agent.weaver.Weaver;
import org.apache.catalina.LifecycleException;

import jakarta.servlet.ServletContext;

@Weave(type = MatchType.ExactClass, originalName = "org.apache.catalina.core.StandardContext")
public abstract class StandardContext_Instrumentation {

public abstract ServletContext getServletContext();

protected synchronized void startInternal() throws LifecycleException {
try {
Weaver.callOriginal();
} finally {
HttpServletHelper.gatherURLMappings(getServletContext());
}
}
}
Loading
Loading