Commit graph

37 commits

Author SHA1 Message Date
Ram Narayan Balaji
339b3dfb18
fix(security): upgrade Java dependencies to resolve CRITICAL and HIGH CVEs (#27940)
* fix(security): upgrade Java dependencies to resolve CRITICAL and HIGH CVEs

- jetty-http: 12.1.6 → 12.1.7 (HTTP Request Smuggling, CRITICAL)
- bcpkix/bcprov/bcutil-jdk18on: 1.80 → 1.84 (Crypto Signature Bypass + Timing Attack)
- postgresql: 42.7.7 → 42.7.11 (SCRAM-SHA-256 DoS)
- httpcore5-h2: pinned to 5.3.5 (HTTP/2 stream reset DoS)
- commons-compress: pinned to 1.26.0 (Infinite Loop DoS)
- jackson-core: 2.18.6 → 2.19.0 (async parser resource exhaustion)
- maven-shade-plugin: 3.5.1 → 3.6.0 (supports Java 22 MR-JAR in jackson-core 2.19.0)
- openapi-generator template override: jackson-version 2.17.1 → 2.19.0 in generated swagger pom

* fix(security): upgrade spring-web 6.2.11 → 6.2.18

* fix(security): align jackson-dataformat-yaml, feign, gson, logback versions

- jackson-dataformat-yaml: 2.17.2 → ${jackson.version} (2.19.0)
- feign-core: 13.2.1 → 13.5 (in openapi-gen template)
- gson: 2.10.1 → 2.11.0 (in openapi-gen template)
- logback-classic: 1.3.13 → 1.5.25 (in openapi-gen template)

* fix(security): use jackson 2.18.7 — highest clean 2.x with full ecosystem

2.19.0-2.21.0 all carry a HIGH (CVSS 8.7) vulnerability per Sonatype.
2.18.7 is the latest clean patch where all Jackson modules are released.

* fix(security): remove hardcoded jackson 2.17.2 override in k8s-operator, inherit 2.18.7 from root

* fix(security): upgrade gson 2.11.0 → 2.13.1 (Medium CVE)

* fix(security): replace 436-line pom.mustache with minimal stub

The openapi-generator-maven-plugin writes target/generated-sources/swagger/pom.xml
at build time with hardcoded jackson 2.17.1. Snyk --all-projects picks up every
pom.xml on disk and flags it as HIGH.

The generated pom.xml is never packaged into any JAR or Docker image — it is a
generator artefact. The actual runtime jackson version comes from the module pom
inheriting jackson.version=2.18.7 from the root. Replace the 436-line verbatim
upstream template (maintained just to change 2 version lines) with a 10-line
coordinate-only stub. The generated pom.xml will have no <dependencies> block,
so Snyk finds nothing to flag.
2026-05-07 09:19:10 +00:00
Sriharsha Chintalapani
79513803f6
Deprecate OpenMetadata Java client in favor of new Java SDK (#26388)
Mark all hand-written classes in openmetadata-java-client as
@Deprecated(since="1.12.0", forRemoval=true). Skip sonar analysis
for openmetadata-java-client and openmetadata-dist modules.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:30:39 -07:00
Ross Andreucetti
5d368fdba5
feat: Add extraHeaders support to Java client (#24236)
* feat: Add extraHeaders support to Java client

The Java client was missing extraHeaders functionality that exists
in the Python SDK. This prevented users from adding custom headers
like X-Caller-Service to identify upstream services in logs.

This implementation:
- Adds extraHeaders processing in OpenMetadata.java initClient()
- Implements template substitution for header values using %(HeaderName)s syntax
- Ensures auth interceptor runs before extra headers interceptor for proper header reference
- Matches Python SDK behavior from client.py lines 199-202

Users can now set extraHeaders in OpenMetadataConnection:
  connection.setExtraHeaders(
    new ExtraHeaders().withAdditionalProperty("X-Caller-Service", "my-service")
  )

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Restore apiClient.addAuthorization call

The previous commit incorrectly removed the addAuthorization call
which is needed for the ApiClient to properly register the auth
interceptor. Now both addAuthorization and the extra headers
interceptor work together.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Simplify extraHeaders to static values only

Remove template substitution feature (regex pattern matching) that
was copied from Python SDK but not actually used anywhere. The
simpler implementation:

- Removed Pattern/Matcher imports and regex logic (~40 lines)
- Removed extractCurrentHeaders and resolveTemplateValue helpers
- Now just sets static header values directly
- Matches actual usage patterns (no template substitution needed)

This keeps the implementation focused on the real use case:
  extraHeaders.put("X-Caller-Service", "my-service")

Template substitution can be added later if actually needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update OpenMetadata.java

---------

Co-authored-by: randreucetti <randreucetti@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-24 10:15:44 -08:00
Ross Andreucetti
1cacd09d0a
Fix authentication for entities with 'version' in name (#24719)
Replace overly broad substring check that was skipping auth headers
for any URL containing 'version' (including entity names like
'data-conversion-service'). Now only skips auth for the specific
/system/version endpoint.

Fixes #24718

Co-authored-by: randreucetti <randreucetti@users.noreply.github.com>
Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com>
2025-12-09 06:54:18 -08:00
Sriharsha Chintalapani
62c0ef09e9
Fix #19103: Search Settings with Ranking config (#19962)
* Search Settings with Ranking config

* Fix #19103: Search Settings with Ranking config

* feat: search setting based on entity

* refactor: css and address review comments

* test: add unit tests

* test: e2e test for update search setting

* update searchSettings.json

* Refactor search builder

* Refactor search builder

* Integrate it into SearchClients

* Integrate it into SearchClients

* Integrate it into SearchClients

* Add preview endpoint

* Add preview endpoint

* test: fix and add unit tests

* test: add playwright tests

* style: fix minor styles

* fix: search preview on reload page

* Fix merge conflicts

* refactor: address PR comments

* style: term boost and icons

* fix: route for entity search page

* Fix fqn search, store search settings, add validation

* Fix SearchSettings tests

* Refactor the code to remove duplication; fix aggregation to have only unique field names

* Fix preview calls, common aggregations

* Fix search ranking

* Fix search relevancy

* Remove useNaturalLanguageSearch

* fix: style, delete field and tests

* Add text fields for tags, tier, certification

* Fix java style

* fix: style variables

* fix: localisation and styles

* fix merge conflicts

* Fix failing test due to same aggrgation name coming from the asset configuration and global

* Fix Hierarchy Tests

* Fix Test Case failures

* Add NLQ integration interfaces

* disable NLS by default

* Fix Glossary and Glossary Term Resource Tests

* revert openmetadata

* fix path for json search settings

* fix playwright failure

* Fix failing test

* add tag and search index

---------

Co-authored-by: Pranita <pfulsundar8@gmail.com>
Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com>
Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com>
2025-03-18 23:12:23 +05:30
Suresh Srinivas
5cef8e5e7c
Clean up code warnings flagged by IDE (#17679)
* Remove unnecessary imports and throws

* Make members final

* User more performant array/list operations

* Migrate to newer java language level

* Remove verbose or redundant code constructs
2024-09-03 18:31:18 -07:00
Jin Won, Park
bb240fe800
Fixes #15499: Fix the OpenMetadata(Client) constructor bug - ApiClient null check. (re-commit) (#16661)
* bugfix: change the ApiClient init task.

* style: run `mvn spotless:apply`
2024-06-17 10:12:10 -07:00
Jin Won, Park
eb327ca68f
bugfix: change the ApiClient init task. (#15500)
Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com>
2024-03-17 23:06:36 -07:00
Pere Miquel Brull
e16ad3c5dc
MINOR - Clean ingestion ES code and auth providers (#14358)
* MINOR - Clean ingestion ES code and auth providers

* clean parser

* Clean security config for the client

* Clean security config for the client

* Improve class conversion exceptions

* Fix tests

* Clean up java client

* Clean up java client

* clean parser

* Fix test

* Fix test

* fix NO_AUTH error

* Fix test

* Format

---------

Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
2023-12-19 12:08:48 +01:00
Sriharsha Chintalapani
1294f93e15
Minor: Migrate to latest google code style library to support Java 17 and beyond (#14429)
* Minor: add spotless and use simplecontext

* Remove context from rule evaluaiton

* Fix EventSubscription tests

* Minor: Migrate to latest google code style library to support Java 17 and beyond

* Minor: Ignore code style migration from git blame
2023-12-18 12:56:17 -08:00
Andro Wijaya
5f88c8ce9d
ISSUE-14095: added overloaded method for method initClient to accept Feign.Builder as one of the method's parameter. (#14175)
Co-authored-by: Teddy <teddy.crepineau@gmail.com>
2023-12-04 12:16:34 +01:00
Sriharsha Chintalapani
67b68a70c9
Fix #7712: Align AuthProvider values in the JSON schema definition (#11508)
* Fix #7712: Align AuthProvider values in the JSON schema definition

* Fix ingestion bot initialization, create jwt token if there is no authMechanism pre-configured

* Fix ingestion bot initialization, create jwt token if there is no authMechanism pre-configured

* Handle new providers

* Lint

* Fix #7712: Align AuthProvider values in the JSON schema definition

* Handle new providers

* Fix ingestion bot initialization, create jwt token if there is no authMechanism pre-configured

* Fix ingestion bot initialization, create jwt token if there is no authMechanism pre-configured

* Lint

* fix rebase

* Fix test

* Fix test

* Fix Usage of Auth Provider in User Resource

* remove unused function

---------

Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com>
Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com>
Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com>
2023-07-26 11:34:58 -07:00
Suresh Srinivas
1990ac56d9
10041 Part1 - Refactor and clean up System APIs (#10042)
* 10041 Part1 - Refactor and clean up System APIs

* Update the config resource endpoint url
2023-02-03 16:25:40 -08:00
Mohit Yadav
edd260ab66
Updated Client to use OpenApi , updated feign dependencies, added Ela… (#10069)
* Updated Client to use OpenApi , updated feign dependencies, added Elasticsearch Api Client

* review comments

* checkstyle
2023-02-02 20:20:03 +05:30
Suresh Srinivas
dbdd4a13cb
Code cleanup of IDE flagged issues (#9715) 2023-01-12 18:40:50 -08:00
Mohit Yadav
c7591eefc2
Alert improvements (#9374)
* AlertAction update sould apply to all alert using alertActions + added api to get all action of alert with status

* update endpoint

* Added matchAnyField Function + removed usageSummary from activityFeed
2022-12-17 17:48:08 +05:30
Suresh Srinivas
1430e7e9c0
Code cleanup changes (#9361) 2022-12-16 16:14:40 -08:00
Mohit Yadav
4dc24b904f
python fix circular import (#8670)
python fix circular import (#8670)
2022-11-11 17:03:43 +01:00
Sajitha
a731b3fdfd
Fix sonar issues (#8421)
* Fix sonar issue

* Remove duplicate constant
2022-10-30 12:32:45 +01:00
Shivam Shrey
0babaa52e0
ISSUE-7848: Fix variable names as per naming convention (#8228)
* ISSUE-7848: Rename local variables to match regular expression for camel case

* ISSUE-7848: Refactor package name as per naming convention
2022-10-26 05:54:40 -07:00
Suresh Srinivas
6b5a788d2b
Sonar.2 oct22 (#7860)
* Fix of variable names according to the naming convention (#7855)

* Changed the fields to final static

* correct the java checkstyle

* Changed the naming of packages according to the naming conventions

* Fixing warnings in the code

Co-authored-by: Shivam Purohit <91889807+shivam-Purohit@users.noreply.github.com>
2022-10-02 18:43:34 -07:00
Shivam Purohit
a52e18611c
Fix of variable names according to the naming convention (#7855)
* Changed the fields to final static

* correct the java checkstyle

* Changed the naming of packages according to the naming conventions
2022-10-01 16:04:28 -07:00
Shivam Purohit
4e0a56786a
Fix final fields static (#7852) 2022-10-01 12:56:12 -07:00
Suresh Srinivas
b2c2369d9a
Addressing a few sonar cloud flagged issues (#7800) 2022-09-29 10:57:57 -07:00
Sriharsha Chintalapani
656b50dd3a
Fix #7469: Refactor OpenMetadata code modules (#7474) 2022-09-14 23:14:02 -07:00
mohitdeuex
6005cdf435
[Backend][JavaClientFix] Java Client Fix (#6726)
* [Backend][JavaClientFix] Updated package for generated code , use lombok annotation for logging, fixed code as per standards

* [Backend][JavaClientFix] Added core and client

* [Backend][JavaClientFix] Checkstyle fix
2022-08-15 11:05:49 +05:30
Parth Panchal
99453279c0
Sonar cloud findings fix (#6709)
* Sonar cloud findings fix

* Sonar cloud findings fix

* Sonar cloud findings fix

* Sonar cloud findings fix
2022-08-12 22:15:57 +05:30
mohitdeuex
1d3e876121
[Backend][Java SDK] Version Validation Fix (#6472) 2022-08-01 06:58:47 -07:00
Parth Panchal
686e715341
added config to publish to maven repository in catalog pom.xml (#5870)
* added config to publish to maven repository in catalog pom.xml

* addressing java checkstyle

* empty-commit

* signing commit

* signing commit test

* signing commit test with different key

* moving plugins
2022-07-06 13:06:49 +05:30
Parth Panchal
418a5a4724
added event error and fernet classes to openmetadata-core (#5799) 2022-07-05 10:34:17 +05:30
mohitdeuex
4606700e04
[Backend][Java SDK] Fix Json Patch issue with HttpURLConnection #5791 (#5795) 2022-06-30 06:29:05 -07:00
Parth Panchal
88ffca764f
added generic method to list entities (#5570) 2022-06-23 12:04:35 +05:30
Parth Panchal
9b93149fd3
Fixed#5490: added support for Custom sso (#5491) 2022-06-16 20:31:42 +05:30
Parth Panchal
1c6046cf8e
Fixed#5461: added support for OMD sso (#5462) 2022-06-15 15:26:13 +05:30
Parth Panchal
9357c131a5
Fixed#5428: added support for auth0 sso (#5429) 2022-06-14 13:48:45 +05:30
Parth Panchal
515a88fe1f
Fixed#5364: added support for azure sso (#5365) 2022-06-13 17:15:19 +05:30
mohitdeuex
a299cfbc86
[Backend] Java Client SDK [WIP] (#5149)
* [Backend] Java Client SDK #4961 [WIP]

* [Backend] Java Client SDK #4961 ..Fix the OpenMetadata[lowercase d] added version plugin

* [Backend] Java Client SDK #4961 ..Add Version utils to core and Using Custom Interceptor to modify request body as per OMD supported JSON Schema

* [Backend] Using exclude nulls to modify request

* [Backend] Google SSO changes tested and fixed for Service Credentials

* [Backend] Okta SSO added
2022-06-06 11:22:43 +05:30