Skip to content

HBX-2996 New module containing natural language building blocks #5184

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

mbladel
Copy link
Member

@mbladel mbladel commented May 29, 2025

https://hibernate.atlassian.net/browse/HBX-2996

This introduces the basic components, as well as some first very simple test cases. It will most likely need some refinement, but it starts making these building blocks available for other projects to play around with. cc @yrodiere

@mbladel mbladel requested a review from koentsje May 29, 2025 15:19
@mbladel mbladel force-pushed the language-tools branch 2 times, most recently from 995fc74 to 95b1da2 Compare May 29, 2025 15:32
@mbladel mbladel force-pushed the language-tools branch 3 times, most recently from 9a4e85a to 2a612cc Compare May 30, 2025 10:21
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks nice! I added a few comments below.

* It leverages Hibernate ORM's mapping models, query language, cross-platform support and
* enhanced security features to make access to information stored in relational databases
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be very careful about security claims. We know exposing this to end users gives them extensive access to the database. We think it's limited to reads and to the parts of the DB schema that are actually mapped, but a simple eval(<SQL>) function in HQL could bring the whole "security" down.

So, IMO we need to:

  1. Document potential security risks, and clarify this is meant to be exposed in "back-office" scenarios.
  2. Plan for a (future) security assessment.
  3. Be conservative in our security-related claims in the meantime.
Suggested change
* It leverages Hibernate ORM's mapping models, query language, cross-platform support and
* enhanced security features to make access to information stored in relational databases
* It leverages Hibernate ORM's mapping models, query language, cross-platform support and
* read/write separation to make access to information stored in relational databases

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the sentiment here. Though I believe read/write separation isn't the right language, what I mean is it leverages Hibernate-specific features that improve security: restricted access to mapped objects, intrinsic validation of HQL queries, existing filters/restriction on data, et.al. Not sure how to express that in a "catchy" and concise way, maybe "built-in data restrictions"?

So, IMO we need to:

  1. Document potential security risks, and clarify this is meant to be exposed in "back-office" scenarios.
  2. Plan for a (future) security assessment.
  3. Be conservative in our security-related claims in the meantime.

Sure, so the only actionable point here is 1. Where would we put such documentation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

features that improve security: restricted access to mapped objects, intrinsic validation of HQL queries, existing filters/restriction on data, et.al. Not sure how to express that in a "catchy" and concise way, maybe "built-in data restrictions"?

Works for me.

Sure, so the only actionable point here is 1. Where would we put such documentation?

I'd say in the Hibernate Tools docs? Problem is, @koentsje is still working on moving that back from JBoss Tools. So you'll probably need to handle that in a follow-up PR.

In the meantime, Koen, would it be possible for you to merge an initial version of that documentation, so that we can build on it? It can be almost empty and populated afterwards, that's not a problem IMO.

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

* It leverages Hibernate ORM's mapping models, query language, cross-platform support and
* enhanced security features to make access to information stored in relational databases
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

features that improve security: restricted access to mapped objects, intrinsic validation of HQL queries, existing filters/restriction on data, et.al. Not sure how to express that in a "catchy" and concise way, maybe "built-in data restrictions"?

Works for me.

Sure, so the only actionable point here is 1. Where would we put such documentation?

I'd say in the Hibernate Tools docs? Problem is, @koentsje is still working on moving that back from JBoss Tools. So you'll probably need to handle that in a follow-up PR.

In the meantime, Koen, would it be possible for you to merge an initial version of that documentation, so that we can build on it? It can be almost empty and populated afterwards, that's not a problem IMO.

@mbladel mbladel force-pushed the language-tools branch 3 times, most recently from b08d818 to 2d1b8f0 Compare June 3, 2025 10:30
@mbladel mbladel merged commit 4b37da0 into hibernate:main Jun 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants