Skip to content

Conversation

@fjtirado
Copy link
Collaborator

Fix #952

Signed-off-by: fjtirado <ftirados@redhat.com>
@fjtirado fjtirado marked this pull request as draft November 14, 2025 17:25
@fjtirado fjtirado force-pushed the Fix_#952 branch 2 times, most recently from c46fe9b to 2356235 Compare November 14, 2025 18:07
@fjtirado fjtirado requested a review from treblereel November 14, 2025 18:09
@fjtirado fjtirado marked this pull request as ready for review November 14, 2025 18:09
import java.util.Map;
import java.util.ServiceLoader;

public class AccessTokenProvider {
Copy link
Member

Choose a reason for hiding this comment

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

Can we replace this provider in the extension? For this feature, we will be using the Quarkus OIDC Client, which we will likely be using.

Copy link
Collaborator Author

@fjtirado fjtirado Nov 17, 2025

Choose a reason for hiding this comment

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

The Provider suffix here is kind of misleading, but I keep the original because lack of better alternative (Im terrible with naming). This class is just an aggregation of the info that is needed to perform the call, using JaxRS, to retrieve the token.
If in future we use Quarkus OIDC client, probably it will be better to write a new HTTP task (which can be done, base on the quarkus stack, in the quarkus extension)

import java.util.Map;

public class OAuthRequestBuilder extends AbstractAuthRequestBuilder {
public class OAuthRequestBuilder
Copy link
Member

Choose a reason for hiding this comment

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

We may even consider this lightweight dep: https://www.pac4j.org/docs/clients/openid-connect.html (maybe as an optional library impl-http-oidc)

Copy link
Collaborator Author

@fjtirado fjtirado Nov 17, 2025

Choose a reason for hiding this comment

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

There is not need to add the dependency right now, the call to retrieve the token is based on JaxRS and seems to be working fine.

Copy link
Member

Choose a reason for hiding this comment

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

But the role OIDC API is complex to implement, have we already done it? cc @treblereel

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But its not in the spec schema, isnt it?

Copy link
Member

Choose a reason for hiding this comment

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

To acquire the token, you need to come back and forth the token server.

The specification includes the scheme to control the endpoints where you'd get the token:
https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#oauth2-authentication

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, this partially implemented, I will open PR for completion

Signed-off-by: fjtirado <ftirados@redhat.com>
@fjtirado fjtirado merged commit 9a16384 into serverlessworkflow:main Nov 17, 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.

Add secret support for Oauth2 and OpenID

2 participants