fix(webkey): create webKey handling (#9559)

# Which Problems Are Solved

During the review of #9489 we noticed that the curl example as well as
the HTTP response if they feature flag was not enabled, was wrong.
Additionally, the returned `creationDate` was always a zero value.

# How the Problems Are Solved

Fixed the exampl, response code and mapped the correct date.

# Additional Changes

None

# Additional Context

None
This commit is contained in:
Livio Spring
2025-03-18 13:32:43 +01:00
committed by GitHub
parent 29514961e8
commit d378166d22
2 changed files with 9 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ func (s *Server) CreateWebKey(ctx context.Context, req *webkey.CreateWebKeyReque
return &webkey.CreateWebKeyResponse{
Id: webKey.KeyID,
CreationDate: timestamppb.New(webKey.ObjectDetails.CreationDate),
CreationDate: timestamppb.New(webKey.ObjectDetails.EventDate),
}, nil
}

View File

@@ -140,7 +140,7 @@ service WebKeyService {
}
};
responses: {
key: "409"
key: "400"
value: {
description: "The feature flag `web_key` is not enabled.";
}
@@ -179,15 +179,15 @@ service WebKeyService {
}
};
responses: {
key: "404"
key: "400"
value: {
description: "The web key to active does not exist.";
description: "The feature flag `web_key` is not enabled.";
}
};
responses: {
key: "409"
key: "404"
value: {
description: "The feature flag `web_key` is not enabled.";
description: "The web key to active does not exist.";
}
};
};
@@ -226,7 +226,7 @@ service WebKeyService {
}
};
responses: {
key: "409"
key: "400"
value: {
description: "The feature flag `web_key` is not enabled or the web key is currently active.";
}
@@ -262,7 +262,7 @@ service WebKeyService {
}
};
responses: {
key: "409"
key: "400"
value: {
description: "The feature flag `web_key` is not enabled.";
}
@@ -285,7 +285,7 @@ message CreateWebKeyRequest {
ED25519 ed25519 = 3;
}
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
example: "{\"bits\":\"RSA_BITS_2048\",\"hasher\":\"RSA_HASHER_SHA5256\"}";
example: "{\"rsa\":{\"bits\":\"RSA_BITS_2048\",\"hasher\":\"RSA_HASHER_SHA256\"}}";
};
}