fix/miss-and-key-parse #39

Merged
christian.keller merged 5 commits from fix/miss-and-key-parse into main 2026-09-02 11:28:33 +00:00
No description provided.
A key part a mapper rejects (int, enum, date, UUID, ...) threw through
unwrapped - e.g. a raw NumberFormatException -> HTTP 500 naming neither
the entity nor the property. The factory now wraps mapper failures into
CrudRestException(400) naming the offending part and property, and
CrudUriService.uriToKey appends the entity and its typed key pattern.
The enum mapper reports the valid constants instead of failing on an
unsafe cast.

Claude-Session: https://claude.ai/code/session_01EpeQsTSU59Ni6tsCLJpk6D
A reference column is written as the id sub-select of the row its
business key points at; a key matching no row wrote NULL, so a not-null
reference column surfaced as a DataIntegrityViolation -> HTTP 500 naming
the column, not the reference the caller got wrong. Insert and update
now translate that violation into a CrudRepoRequestException (-> 400)
naming the reference field, both entity paths and the dangling key.
A miss on a nullable reference column still writes NULL silently
(post-detect only, plan option 1).

Claude-Session: https://claude.ai/code/session_01EpeQsTSU59Ni6tsCLJpk6D
A denied @CrudSecured call threw a bare 'Not permitted to call method' -
nothing named the protected method or what was missing. The exception now
carries the protected method and the missing permission (subject/relation:
entity and operation) as fields; the message stays generic on purpose,
since it is rendered into client-facing responses and would otherwise let
a caller explore the permission space. crudular.security.log-denials
(default off) makes the aspect log the details server-side.

Claude-Session: https://claude.ai/code/session_01EpeQsTSU59Ni6tsCLJpk6D
feat(security): delegate request authorization to @CrudSecured handlers
All checks were successful
/ release (pull_request) Successful in 2m59s
7abb2e5474
A custom endpoint under the CRUD url prefix was held to permissions its
URL merely resembles (a POST with key parts demands CREATE, an
unclassifiable route the op-less ALL set) even when its handler carries
its own @CrudSecured check. The request manager now detects such handler
methods via Spring MVC's handler registry (CrudSecuredHandlerScanner,
lazy first-use scan, class- and method-level annotations both enforced)
and decides from those declarations through the CrudPermissionChecker
shared with the aspect - fail-closed at the filter instead of abstaining,
per docs/plans/request-authorization-delegation.md option 2. Generic
CRUDular endpoints (functional handlers) and consumer RouterFunctions
stay on the URL check. Supersedes the ObjectProvider aspect-gate draft on
crudRequestAuthorizationManager.

Claude-Session: https://claude.ai/code/session_01EpeQsTSU59Ni6tsCLJpk6D
fix: review findings
All checks were successful
/ release (pull_request) Successful in 3m11s
5a03be379a
christian.keller deleted branch fix/miss-and-key-parse 2026-09-02 11:28:33 +00:00
christian.keller referenced this pull request from a commit 2026-09-02 11:28:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DenktMit-OSS/lt-crudular!39
No description provided.