Skip to content

Conversation

@nanderstabel
Copy link
Contributor

@nanderstabel nanderstabel commented Dec 3, 2025

Description of change

This PR introduces the IssuerMetadataSynchronizationPolicy in the Issuance domain that will listen for specific TemplateEvents from the Library Domain. In a near future update this policy will dispatch ServerConfigCommands in order to update the Credential Issuer Metadata in order to keep the credential_configurations_supported field in sync with the Templates stored in agent_library.

In order to facilitate this, the Policy needs a reference to the IssuanceState:

pub struct IssuerMetadataSynchronizationPolicy {
    // TODO: Actually use this.
    _issuance_state: Arc<IssuanceState>,
}

This meant that ApplicationState cannot have sole ownership anymore over IssuanceState and therefore it has been wrapped into an Arc. The result of that is that many files in agent_api_rest had to be updated in order to wrap the state into Arcs.

This PR also includes a fix for the HTTP Response of the GET /v0/templates/ and GET /v0/templates/<template_id> endpoints that ensures that the responses are returned in camelCase.

Links to any relevant issues

How the change has been tested

  • Since this merely an initialization of the Policy the only real 'proof' of the code working is that it compiles. The actual workings of the Policy will be implemented in feat: derive credential configurations from templates #245
  • camelCase responses are tested through test_template_response_serialization.

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have successfully tested this change in a docker environment

@nanderstabel nanderstabel force-pushed the feat/init-synchronization-policy branch 3 times, most recently from db75666 to 053c66c Compare December 4, 2025 15:23
@nanderstabel nanderstabel changed the title feat: derive Credential Configurations from Templates feat: init IssuerMetadataSynchronizationPolicy Dec 4, 2025
@nanderstabel nanderstabel changed the title feat: init IssuerMetadataSynchronizationPolicy feat: initialize IssuerMetadataSynchronizationPolicy Dec 4, 2025
@nanderstabel nanderstabel self-assigned this Dec 4, 2025
@nanderstabel nanderstabel marked this pull request as ready for review December 4, 2025 15:45
@nanderstabel nanderstabel requested a review from coplat December 4, 2025 15:46
@nanderstabel nanderstabel requested a review from coplat December 11, 2025 21:48
@nanderstabel nanderstabel merged commit 2d0a39b into beta Dec 12, 2025
2 of 5 checks passed
@nanderstabel nanderstabel deleted the feat/init-synchronization-policy branch December 12, 2025 13:06
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.

4 participants