From 2fccfb15d4c18aca7ff0ff1b4541e4f86bfcf00d Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Sat, 23 Mar 2024 21:05:28 -0400 Subject: [PATCH] chore: deprecate ICv1 and PPv1 Signed-off-by: Daniel Bluhm --- aries_cloudagent/config/logging.py | 22 +++++++++---- aries_cloudagent/core/dispatcher.py | 4 +-- .../protocols/issue_credential/v1_0/routes.py | 13 ++++++++ .../protocols/present_proof/v1_0/routes.py | 31 ++++++++++++++++--- 4 files changed, 58 insertions(+), 12 deletions(-) diff --git a/aries_cloudagent/config/logging.py b/aries_cloudagent/config/logging.py index 0318c52550..99a9e27517 100644 --- a/aries_cloudagent/config/logging.py +++ b/aries_cloudagent/config/logging.py @@ -336,18 +336,28 @@ def print_notices(cls, settings: Settings): "https://aca-py.org/main/deploying/IndySDKtoAskarMigration/", ) banner.hr() - banner.print( - "Aries RFC 0160: Connection Protocol is deprecated and support will be " - "removed in a future version; use RFC 0023: DID Exchange instead." - ) - banner.hr() banner.print( "Receiving a core DIDComm protocol with the " "`did:sov:BzCbsNYhMrjHiqZDTUASHg;spec` prefix is deprecated. All parties " "sending this prefix should be notified that support for receiving such " - "messages will be removed in an upcoming ACA-Py release. " + "messages will be removed in a future release. " "Use https://didcomm.org/ instead." ) + banner.hr() + banner.print( + "Aries RFC 0160: Connection Protocol is deprecated and support will be " + "removed in a future release; use RFC 0023: DID Exchange instead." + ) + banner.hr() + banner.print( + "Aries RFC 0036: Issue Credential 1.0 is deprecated and support will be " + "removed in a future release; use RFC 0453: Issue Credential 2.0 instead." + ) + banner.hr() + banner.print( + "Aries RFC 0037: Present Proof 1.0 is deprecated and support will be " + "removed in a future release; use RFC 0454: Present Proof 2.0 instead." + ) print() diff --git a/aries_cloudagent/core/dispatcher.py b/aries_cloudagent/core/dispatcher.py index 3d5209a0e1..c0b6e2ad3e 100644 --- a/aries_cloudagent/core/dispatcher.py +++ b/aries_cloudagent/core/dispatcher.py @@ -292,14 +292,14 @@ async def make_message( "Received a core DIDComm protocol with the deprecated " "`did:sov:BzCbsNYhMrjHiqZDTUASHg;spec` prefix. The sending party should " "be notified that support for receiving such messages will be removed in " - "an upcoming ACA-Py release. Use https://didcomm.org/ instead.", + "a future release. Use https://didcomm.org/ instead.", DeprecationWarning, ) self.logger.warning( "Received a core DIDComm protocol with the deprecated " "`did:sov:BzCbsNYhMrjHiqZDTUASHg;spec` prefix. The sending party should " "be notified that support for receiving such messages will be removed in " - "an upcoming ACA-Py release. Use https://didcomm.org/ instead.", + "a future release. Use https://didcomm.org/ instead.", ) message_type_rec_version = get_version_from_message_type(message_type) diff --git a/aries_cloudagent/protocols/issue_credential/v1_0/routes.py b/aries_cloudagent/protocols/issue_credential/v1_0/routes.py index 78fc20efcc..3d3b68c3d9 100644 --- a/aries_cloudagent/protocols/issue_credential/v1_0/routes.py +++ b/aries_cloudagent/protocols/issue_credential/v1_0/routes.py @@ -377,6 +377,7 @@ class V10CredentialExchangeAutoRemoveRequestSchema(OpenAPISchema): @docs( tags=["issue-credential v1.0"], summary="Fetch all credential exchange records", + deprecated=True, ) @querystring_schema(V10CredentialExchangeListQueryStringSchema) @response_schema(V10CredentialExchangeListResultSchema(), 200, description="") @@ -417,6 +418,7 @@ async def credential_exchange_list(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Fetch a single credential exchange record", + deprecated=True, ) @match_info_schema(CredExIdMatchInfoSchema()) @response_schema(V10CredentialExchangeSchema(), 200, description="") @@ -463,6 +465,7 @@ async def credential_exchange_retrieve(request: web.BaseRequest): "Create a credential record without " "sending (generally for use with Out-Of-Band)" ), + deprecated=True, ) @request_schema(V10CredentialCreateSchema()) @response_schema(V10CredentialExchangeSchema(), 200, description="") @@ -541,6 +544,7 @@ async def credential_exchange_create(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Send holder a credential, automating entire flow", + deprecated=True, ) @request_schema(V10CredentialProposalRequestMandSchema()) @response_schema(V10CredentialExchangeSchema(), 200, description="") @@ -642,6 +646,7 @@ async def credential_exchange_send(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Send issuer a credential proposal", + deprecated=True, ) @request_schema(V10CredentialProposalRequestOptSchema()) @response_schema(V10CredentialExchangeSchema(), 200, description="") @@ -764,6 +769,7 @@ async def _create_free_offer( @docs( tags=["issue-credential v1.0"], summary="Create a credential offer, independent of any proposal or connection", + deprecated=True, ) @request_schema(V10CredentialConnFreeOfferRequestSchema()) @response_schema(V10CredentialExchangeSchema(), 200, description="") @@ -837,6 +843,7 @@ async def credential_exchange_create_free_offer(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Send holder a credential offer, independent of any proposal", + deprecated=True, ) @request_schema(V10CredentialFreeOfferRequestSchema()) @response_schema(V10CredentialExchangeSchema(), 200, description="") @@ -925,6 +932,7 @@ async def credential_exchange_send_free_offer(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Send holder a credential offer in reference to a proposal with preview", + deprecated=True, ) @match_info_schema(CredExIdMatchInfoSchema()) @request_schema(V10CredentialBoundOfferRequestSchema()) @@ -1024,6 +1032,7 @@ async def credential_exchange_send_bound_offer(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Send issuer a credential request", + deprecated=True, ) @match_info_schema(CredExIdMatchInfoSchema()) @request_schema(V10CredentialExchangeAutoRemoveRequestSchema()) @@ -1139,6 +1148,7 @@ async def credential_exchange_send_request(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Send holder a credential", + deprecated=True, ) @match_info_schema(CredExIdMatchInfoSchema()) @request_schema(V10CredentialIssueRequestSchema()) @@ -1234,6 +1244,7 @@ async def credential_exchange_issue(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Store a received credential", + deprecated=True, ) @match_info_schema(CredExIdMatchInfoSchema()) @request_schema(V10CredentialStoreRequestSchema()) @@ -1338,6 +1349,7 @@ async def credential_exchange_store(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Send a problem report for credential exchange", + deprecated=True, ) @match_info_schema(CredExIdMatchInfoSchema()) @request_schema(V10CredentialProblemReportRequestSchema()) @@ -1384,6 +1396,7 @@ async def credential_exchange_problem_report(request: web.BaseRequest): @docs( tags=["issue-credential v1.0"], summary="Remove an existing credential exchange record", + deprecated=True, ) @match_info_schema(CredExIdMatchInfoSchema()) @response_schema(IssueCredentialModuleResponseSchema(), 200, description="") diff --git a/aries_cloudagent/protocols/present_proof/v1_0/routes.py b/aries_cloudagent/protocols/present_proof/v1_0/routes.py index a42e1feef1..a606e0ff89 100644 --- a/aries_cloudagent/protocols/present_proof/v1_0/routes.py +++ b/aries_cloudagent/protocols/present_proof/v1_0/routes.py @@ -282,7 +282,11 @@ class V10PresExIdMatchInfoSchema(OpenAPISchema): ) -@docs(tags=["present-proof v1.0"], summary="Fetch all present-proof exchange records") +@docs( + tags=["present-proof v1.0"], + summary="Fetch all present-proof exchange records", + deprecated=True, +) @querystring_schema(V10PresentationExchangeListQueryStringSchema) @response_schema(V10PresentationExchangeListSchema(), 200, description="") async def presentation_exchange_list(request: web.BaseRequest): @@ -322,6 +326,7 @@ async def presentation_exchange_list(request: web.BaseRequest): @docs( tags=["present-proof v1.0"], summary="Fetch a single presentation exchange record", + deprecated=True, ) @match_info_schema(V10PresExIdMatchInfoSchema()) @response_schema(V10PresentationExchangeSchema(), 200, description="") @@ -369,6 +374,7 @@ async def presentation_exchange_retrieve(request: web.BaseRequest): @docs( tags=["present-proof v1.0"], summary="Fetch credentials for a presentation request from wallet", + deprecated=True, ) @match_info_schema(V10PresExIdMatchInfoSchema()) @querystring_schema(CredentialsFetchQueryStringSchema()) @@ -446,7 +452,11 @@ async def presentation_exchange_credentials_list(request: web.BaseRequest): return web.json_response(credentials) -@docs(tags=["present-proof v1.0"], summary="Sends a presentation proposal") +@docs( + tags=["present-proof v1.0"], + summary="Sends a presentation proposal", + deprecated=True, +) @request_schema(V10PresentationProposalRequestSchema()) @response_schema(V10PresentationExchangeSchema(), 200, description="") async def presentation_exchange_send_proposal(request: web.BaseRequest): @@ -529,6 +539,7 @@ async def presentation_exchange_send_proposal(request: web.BaseRequest): @docs( tags=["present-proof v1.0"], summary="Creates a presentation request not bound to any proposal or connection", + deprecated=True, ) @request_schema(V10PresentationCreateRequestRequestSchema()) @response_schema(V10PresentationExchangeSchema(), 200, description="") @@ -606,6 +617,7 @@ async def presentation_exchange_create_request(request: web.BaseRequest): @docs( tags=["present-proof v1.0"], summary="Sends a free presentation request not bound to any proposal", + deprecated=True, ) @request_schema(V10PresentationSendRequestRequestSchema()) @response_schema(V10PresentationExchangeSchema(), 200, description="") @@ -693,6 +705,7 @@ async def presentation_exchange_send_free_request(request: web.BaseRequest): @docs( tags=["present-proof v1.0"], summary="Sends a presentation request in reference to a proposal", + deprecated=True, ) @match_info_schema(V10PresExIdMatchInfoSchema()) @request_schema(V10PresentationSendRequestToProposalSchema()) @@ -785,7 +798,11 @@ async def presentation_exchange_send_bound_request(request: web.BaseRequest): return web.json_response(result) -@docs(tags=["present-proof v1.0"], summary="Sends a proof presentation") +@docs( + tags=["present-proof v1.0"], + summary="Sends a proof presentation", + deprecated=True, +) @match_info_schema(V10PresExIdMatchInfoSchema()) @request_schema(V10PresentationSendRequestSchema()) @response_schema(V10PresentationExchangeSchema(), description="") @@ -899,7 +916,11 @@ async def presentation_exchange_send_presentation(request: web.BaseRequest): return web.json_response(result) -@docs(tags=["present-proof v1.0"], summary="Verify a received presentation") +@docs( + tags=["present-proof v1.0"], + summary="Verify a received presentation", + deprecated=True, +) @match_info_schema(V10PresExIdMatchInfoSchema()) @response_schema(V10PresentationExchangeSchema(), description="") async def presentation_exchange_verify_presentation(request: web.BaseRequest): @@ -972,6 +993,7 @@ async def presentation_exchange_verify_presentation(request: web.BaseRequest): @docs( tags=["present-proof v1.0"], summary="Send a problem report for presentation exchange", + deprecated=True, ) @match_info_schema(V10PresExIdMatchInfoSchema()) @request_schema(V10PresentationProblemReportRequestSchema()) @@ -1013,6 +1035,7 @@ async def presentation_exchange_problem_report(request: web.BaseRequest): @docs( tags=["present-proof v1.0"], summary="Remove an existing presentation exchange record", + deprecated=True, ) @match_info_schema(V10PresExIdMatchInfoSchema()) @response_schema(V10PresentProofModuleResponseSchema(), description="")