openBackhaul / ApplicationPattern

Pattern for REST servers
Apache License 2.0
6 stars 15 forks source link

To make the response of the callback BasicAuthRequestCausesInquiryForAuthentication backward compatible #937

Closed PrathibaJee closed 9 months ago

PrathibaJee commented 10 months ago

In the new ApplicationPattern version 2.1.0 , the new callback BasicAuthRequestCausesInquiryForAuthentication replaced the old callback OamRequestCausesInquiryForAuthentication.

The request body of this new callback BasicAuthRequestCausesInquiryForAuthentication is backward compatible. Means , the following request-body specified in this callback will be accepted by both AccessAdministration://v1/approve-basic-auth-request and AdministratorAdministration://v1/approve-oam-request.

Authorization
application-name
release-number
method

operation-name // since additionalProperty:false is not defined in the AdministratorAdministration://v1/approve-oam-request , sending this attribute would be fine(but it will not be used)

But , the response-body is not backward compatible. The following attributes specified in the response body, supports the response from AccessAdministration://v1/approve-basic-auth-request , but not the AdministratorAdministration://v1/approve-oam-request.

basic-auth-request-is-approved
reason-of-objection

Proposal : To support the response from AdministratorAdministration://v1/approve-oam-request , requesting to include the following response body as oneOf the response

oam-request-is-approved
reason-of-objection
openBackhaul commented 9 months ago

The response of AdministratorAdministration://v1/approve-oam-request has been added as oneOf response at the callback BasicAuthRequestCausesInquiryForAuthentication.

but ... The callback BasicAuthRequestCausesInquiryForAuthentication is applied twice. Once at the path /v1/inquire-oam-request-approvals and once at the path /v1/inquire-basic-auth-approval. The response of AdministratorAdministration://v1/approve-oam-request has just been added to the path /v1/inquire-oam-request-approvals, but not at the path /v1/inquire-basic-auth-approval.

PrathibaJee commented 9 months ago

Thanks for doing the needful and the details.