Validate task's auth being referencing a not defined use.authentications#1491
Open
mcruzdev wants to merge 1 commit into
Open
Validate task's auth being referencing a not defined use.authentications#1491mcruzdev wants to merge 1 commit into
mcruzdev wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a fail-fast validation for workflows that reference an authentication by name via authentication.use when that name is not defined under use.authentications, addressing issue #1490’s “silent unauthenticated request” behavior.
Changes:
- Add a regression test asserting an undefined authentication reference throws an
IllegalArgumentExceptionduring workflow definition build. - Add validation in the HTTP callable task executor builder to verify referenced authentication names exist in
use.authentications.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| impl/test/src/test/java/io/serverlessworkflow/impl/test/UndefinedAuthReferenceTest.java | Adds a regression test covering undefined authentication.use references for HTTP call tasks. |
| impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/CallableTaskHttpExecutorBuilder.java | Introduces validation to reject undefined authentication references before configuring HTTP task execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9494478 to
bab60b2
Compare
bab60b2 to
9c4c253
Compare
9c4c253 to
8736cd1
Compare
Comment on lines
+23
to
+28
| public class AuthenticationUtils { | ||
|
|
||
| private AuthenticationUtils() {} | ||
|
|
||
| public static void checkAuthentication( | ||
| Workflow workflow, ReferenceableAuthenticationPolicy auth) { |
fjtirado
reviewed
Jun 26, 2026
1be6855 to
c47dc3d
Compare
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
c47dc3d to
e8242d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
Special notes for reviewers:
Additional information (if needed):
Closes #1490