Design and Implementation
Sequence Diagram

Implementation Details
HTTP Basic Authentication Flow
-
Connector retrieves the
Authorizationheader from the request. -
If the
Authorizationheader is not present in the request or credentials are not present in this header with the Basic scheme, then the connector retrieves the pre-input boolean parameterKeep_Mashery_Default_Response_Code. -
If
Keep_Mashery_Default_Response_Codeis configured astrue, then the connector responds with a403response code to the client; otherwise, it responds with401Unauthorized along with aWWW-Authenticateheader to the client. -
Connector then retrieves client credentials from the
Authorizationheader value, which is present after the Basic scheme. -
Connector decodes client credentials using the
base64decoder and separatesclient_idandclient_secretby:. -
The
client_idcredentials are usually the Cloud API Management package key. The connector retrieves app developer information usingclient_id. -
If app developer information is not retrieved using
client_id, then the connector responds with a403response to the user client. -
If the connector successfully retrieves app developer information using
client_id, then it also retrieves the app developer'sapi_secret. -
If the connector finds
api_secretfor the app developer, then it also retrievesclient_secretfrom theAuthorizationheader decoded value and matches it withapi_secret. -
If
client_secretis not present in theAuthorizationheader decoded value or does not match withapi_secret, then Connector responds with 403 to the user client. -
If the
client_secretfrom theAuthorizationheader decoded value and the app developer'sapi_secretmatch successfully, the connector sends the request to the client resource along with the HTTP Authorization header.
Business Rules and Assumptions
The Connector should not be configured both as Authenticator and Processor
-
The connector does not support an encrypted API secret if High Security Secret Management (HSSM) support is enabled in Cloud API Management. Refer to Generate Package Key Secrets when High Security Secret Management (HSSM) is Enabled for more information.
-
The connector's default behavior is that if the
Authorizationheader is not present in the request or credentials are not present in this header with the Basic scheme, then a401Unauthorized response is returned. This behavior is compliant with RFC guidelines. -
For backward compatibility, if any customer expects the Cloud API Management default behavior to return a
403response when theAuthorizationheader is not present in the request or when the credentials are not present in this header with the Basic scheme, then configure theKeep_Mashery_Default_Response_Codepre-input parameter totrue.