api-manager icon indicating copy to clipboard operation
api-manager copied to clipboard

SHA-256 hashing for database tables

Open RakhithaRR opened this issue 4 months ago • 0 comments

Problem

The following database columns use MD5 checksum values to track changes to policies and service catalog definitions.

  1. AM_SERVICE_CATALOG

    • Column: MD5 VARCHAR(100) NOT NULL
  2. AM_API_SERVICE_MAPPING

    • Column: MD5 VARCHAR(100)
  3. AM_OPERATION_POLICY

    • Column: POLICY_MD5 VARCHAR(45) NOT NULL
  4. AM_OPERATION_POLICY_DEFINITION

    • Column: DEFINITION_MD5 VARCHAR(45) NOT NULL

Even though there are no confidential information stored in those columns, we need to change the hashing algorithm to SHA-256 based on a configuration and save that value in order to preserve the backward compatibility.

Solution

One option would be to save the base64 encoded value of a json in the database.

{ "hash": "sadsfsfdsfdgdfgf", "alg": "s256"}

Affected Component

APIM

Version

4.4.0

Implementation

No response

Related Issues

No response

Suggested Labels

No response

RakhithaRR avatar Oct 03 '24 04:10 RakhithaRR