Skip to content

Fix issue #619 - Simplify usage of PrivateKeyJwtCredentials for event notification#633

Open
patrice-conil wants to merge 8 commits into
camaraproject:mainfrom
patrice-conil:fix-issue-619
Open

Fix issue #619 - Simplify usage of PrivateKeyJwtCredentials for event notification#633
patrice-conil wants to merge 8 commits into
camaraproject:mainfrom
patrice-conil:fix-issue-619

Conversation

@patrice-conil
Copy link
Copy Markdown
Contributor

Simplify usage of PrivateKeyJwtCredentials for event notification by adding clientId, tokenUri and jwksUri to PrivateKeyJwtCredentials

What type of PR is this?

  • enhancement/feature

What this PR does / why we need it:

By integrating all the necessary information into PrivateKeyJwtCredentials, it is no longer necessary to specify it via the Operate API. Parameter changes do not require any modification of the contractual data.

Which issue(s) this PR fixes:

Fixes #619

Does this PR introduce a breaking change?

  • Yes
  • No

Special notes for reviewers:

Changelog input

 Add clientId, tokenUri and jwksUri to PrivateKeyJwtCredentials into CAMARA_event_common.yaml (request part)
 Add also sinkCredential of type PrivateKeyJwtCredentials into sample-service-subscriptions.yaml (response part)

Additional documentation

@rartych
Copy link
Copy Markdown
Contributor

rartych commented May 12, 2026

@patrice-conil Thanks for the proposal.
I think the guideline document should be also updated in 4.3.1 Pre-requisites for using credential type PRIVATE_KEY_JWT
and diagram in Appendix A

Comment thread artifacts/common/CAMARA_event_common.yaml
…use in the CAMARA-API-Event-Subscription-and-Notification-Guide.md file and adds the new opt to the sequence diagram.
Comment thread documentation/CAMARA-API-Event-Subscription-and-Notification-Guide.md Outdated
…uide.md

Co-authored-by: Rafal Artych <121048129+rartych@users.noreply.github.com>
Comment thread documentation/CAMARA-API-Event-Subscription-and-Notification-Guide.md Outdated
Comment thread documentation/CAMARA-API-Event-Subscription-and-Notification-Guide.md Outdated
@rartych rartych self-requested a review May 12, 2026 14:17
@rartych
Copy link
Copy Markdown
Contributor

rartych commented May 12, 2026

Probably the sinkCredential needs to be added also in sample-implicit-events.yaml around line 313 (Resource response)

        sinkCredential:
          $ref: "../common/CAMARA_event_common.yaml#/components/schemas/PrivateKeyJWTCredential"

Comment thread documentation/CAMARA-API-Event-Subscription-and-Notification-Guide.md Outdated
@patrice-conil
Copy link
Copy Markdown
Contributor Author

Probably the sinkCredential needs to be added also in sample-implicit-events.yaml around line 313 (Resource response)

        sinkCredential:
          $ref: "../common/CAMARA_event_common.yaml#/components/schemas/PrivateKeyJWTCredential"

Thanks @rartych,
Once again, being fast is not the same as being reliable... property added in sample-implicit-events.yaml.

…uide.md

Co-authored-by: Rafal Artych <121048129+rartych@users.noreply.github.com>
@rartych
Copy link
Copy Markdown
Contributor

rartych commented May 13, 2026

Thanks @patrice-conil for quick reactions!
There is also one suggestion from my side regarding Guide document - fill free to modify it.

…uide.md

Co-authored-by: Rafal Artych <121048129+rartych@users.noreply.github.com>
@rartych
Copy link
Copy Markdown
Contributor

rartych commented May 13, 2026

@m-nahum Please review the changes (somehow I cannot add you to reviewers here)

Comment thread documentation/CAMARA-API-Event-Subscription-and-Notification-Guide.md Outdated
pattern: ^https:\/\/.+$
description: The address to which events shall be delivered using the selected protocol.
example: "https://endpoint.example.com/sink"
sinkCredential:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When renderizing it (e.g. via redocly), it appears as well ACCESSTOKEN option.

Image

Maybe it is better to reference common sinkCredential schema in api-templates responses
(we decided to take out based on data minimization paradigm):

sinkCredential:
  $ref: "../common/CAMARA_event_common.yaml#/components/schemas/sinkCredential"

and control somehow what is returned in case of ACCESSTOKEN option (in the same fashion as Rafal commented for PrivateKeyJWTCredential

Proposal - within "AccessTokenCredential" schema, make writeOnly:

  • accessTokenType
  • accessToken

So as an implementation that decides to return sinkCredential of ACCESSTOKEN (when settled) also provides accessTokenExpiresUtc (if it decides to not return sinkCredential, as per data minimization paradigm, no problem because it is API Consumer info).

In that way, i think makes it easier for validation tools and clearer for developers

Based on that, I can make/define alternative artifact tests to cover both approaches to make it clear for API implementations based on their decision in PR #626

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @PedroDiez,
Suggestions included in new commit

patrice-conil and others added 2 commits May 14, 2026 21:03
…uide.md

Co-authored-by: Pedro Díez García <pedro.diezgarcia@telefonica.com>
@rartych rartych requested a review from PedroDiez May 16, 2026 16:40
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.

Simplify usage of PrivateKeyJwtCredentials for event notification

3 participants