Remove md5 from seat link
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:
- Start CustomersDot
- tail CDot's development.log
- Start gitlab rails console
-
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 )
- You can observe CDot has received the seat link data, without MD5. The log will also show
Completed 200 OK
- Currently
LicenseSeatLink.last
would then have nillicense_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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #361269 Fix https://gitlab.com/gitlab-org/gitlab/-/issues/366892
Edited by Mark Chao