Skip to content

Remove md5 from seat link

Mark Chao requested to merge 361269-md into master

What does this MR do and why?

Remove md5 from seat link.

Add sha256 to usage ping.

How to set up and validate locally

Assuming your dev instance has seat linked with local customersDot in the past:

  1. Start CustomersDot
  2. tail CDot's development.log
  3. Start gitlab rails console
  4.   seat_link_data ||= Gitlab::SeatLinkData.new
      SyncSeatLinkRequestWorker.new.perform(
       seat_link_data.timestamp.iso8601,
       seat_link_data.key,
       seat_link_data.max_users,
       seat_link_data.billable_users_count
     )
  5. You can observe CDot has received the seat link data, without MD5. The log will also show Completed 200 OK
  6. Currently LicenseSeatLink.last would then have nil license_md5 value. Further MR will dealt with this so don't worry about it.

Sample request params CDot received:

Processing by Api::V1::SeatLinksController#create as HTML
  Parameters: {"gitlab_version"=>"15.2.0-pre", "timestamp"=>"2022-06-27T12:00:09Z", "license_key"=>"[FILTERED]", "max_historical_user_count"=>88, "billable_users_count
"=>88, "hostname"=>"127.0.0.1", "instance_id"=>"9b092da5-9d56-4b9e-8449-d5485a3bc73e", "seat_link"=>{"gitlab_version"=>"15.2.0-pre", "timestamp"=>"2022-06-27T12:00:09Z
", "license_key"=>"[FILTERED]", "max_historical_user_count"=>88, "billable_users_count"=>88, "hostname"=>"127.0.0.1", "instance_id"=>"9b092da5-9d56-4b9e-8449-d5485a3bc
73e"}}

In rails console run Gitlab::UsageData.license_usage_data, you will see sha256 being part of the payload.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #361269 Fix https://gitlab.com/gitlab-org/gitlab/-/issues/366892

Edited by Mark Chao

Merge request reports

Loading