Skip to content

fix: accept 204 when the IssuerService revokes a credential - #235

Open
ma3u wants to merge 1 commit into
eclipse-cfm:mainfrom
ma3u:fix/revoke-accepts-204
Open

ma3u wants to merge 1 commit into
eclipse-cfm:mainfrom
ma3u:fix/revoke-accepts-204

Conversation

@ma3u

@ma3u ma3u commented Nov 12, 2026

Copy link
Copy Markdown

Summary

Since #233 the onboarding agent revokes the participant's credentials when a VPA is disposed. The IssuerService answers the revocation with 204 No Content: revokeCredential in its admin API is a void JAX-RS method (IssuerCredentialsAdminApiController, L78-L86).

HttpApiClient.RevokeCredential accepts only 200. So the credential is revoked, but the client reports received status code 204 with message [], the offboarding activity fails, and the participant profile ends disposed with an error.

The client now accepts 200 and 204, with a test for 204.

How it was found

We onboarded and disposed a participant through the Tenant Manager on an EDC 1.0.0-RC6 stack (Connector, IdentityHub, IssuerService). With v0.0.8, dispose failed in the offboarding activity as described above. With this change the dispose completes, and the IssuerService reports the credential as revoked.

The onboarding agent's dispose revokes the participant's credentials. The
IssuerService (EDC 1.0) answers a revocation with 204, which the client
reported as a failure, so the offboarding activity failed and the dispose
ended in error although the credential was revoked.

200 and 204 both mean revoked.

func TestHttpApiClient_RevokeCredential_NoContent(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/v1/participants/test-issuer/credentials/test-credential-id/revoke" && r.Method == http.MethodPost {

@paullatzelsperger paullatzelsperger Nov 13, 2026 •

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.

magic string - please either use a variable for test-credential-id or a wildcard (cf TestHttpApiClient_CreateHolder_ApiReturnsError)

@paullatzelsperger

Copy link
Copy Markdown
Contributor

@ma3u you need to sign the ECA, otherwise we can't accept the PR

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.

2 participants