You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "gabriel-farache (via GitHub)" <gi...@apache.org> on 2025/05/19 07:01:28 UTC
[I] Support authentication propagation for CloudEvents [incubator-kie-issues]
gabriel-farache opened a new issue, #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968
When authentication is enabled and configured in a workflow, the incoming request/event is expected to have a header with the authentication data (token, api-key, ...).
Currently, when the workflow is triggered via an event/CloudEvents (either directly by polling Kafka topic or by Knative trigger) the authentication header is not propagated up to the workflow.
This causes a behavioural discrepancy, hence propagating/setting the header in such case should be supported when using events/CloudEvents
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "gmunozfe (via GitHub)" <gi...@apache.org>.
gmunozfe closed issue #1968: Support authentication propagation for CloudEvents
URL: https://github.com/apache/incubator-kie-issues/issues/1968
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2908939065
Ah! In kafka we can access headers from the `ConsumerRecord` and they can be set even with the producer script https://stackoverflow.com/a/73065295
Not sure how it fits with the CloudEvents spec
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2894683290
@gabriel-farache, since you are already working on authentication and token propagation features, would you mind taking this too? Also, have you been able to do any assessment about this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2938985282
To trace the tests I did:
When sending the following CloudEvent:
```
{"specversion":"1.0","id":"db16ff44-5b0b-4abc-88f3-5a71378be171","source":"http://dev.local/","type":"lock-event","datacontenttype":"application/json","time":"2025-03-07T15:04:32.327635-05:00","lockid":"03471a81-310a-47f5-8db3-cceebc63961a","xauthorizationsimple": "TEST_TOKEN", "data":{"name":"The Kraken","id":"03471a81-310a-47f5-8db3-cceebc63961a"}}
```
with
```
quarkus.openapi-generator.simple_server_yaml.auth.SimpleBearerToken.token-propagation=true
quarkus.openapi-generator.simple_server_yaml.auth.SimpleBearerToken.header-name=xauthorizationsimple
```
and spec
```
paths:
/simple:
get:
summary: Send requests to simple server with simple JWT security scheme
description: Send requests to simple server to check the auth header
operationId: getWithSimpleBearerTokenSecurityScheme
responses:
"200":
description: Successful operation
security:
- SimpleBearerToken: []
components:
securitySchemes:
SimpleBearerToken:
type: http
scheme: bearer
```
I got `2025-06-03 20:47:43,537 host-004 DEBUG [org.apache.http.wire:73] (kogito-event-executor-1) http-outgoing-0 >> "Authorization: Bearer null[\r][\n]"` so it appears the header is not extracted and set in the context
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2929897965
@gabriel-farache I opened a thread in Slack. CloudEvent headers should be automatically propagated already
https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/api/kogito-events-core/src/main/java/org/kie/kogito/event/impl/ProcessEventDispatcher.java#L166-L173
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2961850259
@gabriel-farache yes, this was closed automatically by github when merging the quarkiverse PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2909075334
In the CloudEvent spec I see nothing against setting custom headers:
> Many protocols support the ability for senders to include additional metadata, for example as HTTP headers. While a CloudEvents receiver is not mandated to process and pass them along, it is RECOMMENDED that they do so via some mechanism that makes it clear they are non-CloudEvents metadata.
from https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#defining-extensions
For kafka they it is even stated that any metadata must be in the header of the kafka message https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/kafka-protocol-binding.md#323-metadata-headers
So I guess `api/kogito-api/src/main/java/org/kie/kogito/event/DataEvent.java` can be extended to add a `getHeaders` method and that `api/kogito-events-core/src/main/java/org/kie/kogito/event/impl/CloudEventWrapDataEvent.java` wil have to implement the new method.
And of course, every implementations of `api/kogito-events-core/src/main/java/org/kie/kogito/event/EventReceiverFactory.java` will have to extract the headers when possible
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "masayag (via GitHub)" <gi...@apache.org>.
masayag commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2889848391
cc @ricardozanini
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2908915093
@ricardozanini Sure I can take a look.
> Also, have you been able to do any assessment about this one?
No, not yet. My first instinct is to define a common format in the payload; if a defined key is present in the payload object (let's call it `headers` here for clarity), then the runtime will process it as REST headers. The "data" part of the payload should suffer no change so anything currently running will still work seamlessly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado closed issue #1968: Support authentication propagation for CloudEvents
URL: https://github.com/apache/incubator-kie-issues/issues/1968
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] Support authentication propagation for CloudEvents [incubator-kie-issues]
Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache commented on issue #1968:
URL: https://github.com/apache/incubator-kie-issues/issues/1968#issuecomment-2961843790
@fjtirado I think the issue is not yet closed as the openapi generator version must be bumped before it actually works, same it needs your PR (and mine which add test in a lower aspect)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org