fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.12k stars 431 forks source link

created_at and updated_at timestamps in response for POST /api/v1/fleet/users/admin endpoint are incorrect #22387

Closed ddribeiro closed 6 days ago

ddribeiro commented 1 month ago

Fleet version: 4.57


💥  Actual behavior

When using the Create a user account without an invitation (POST /api/v1/fleet/users/admin) endpoint, the created_at and updated_at timestamps both have values of 0001-01-01T00:00:00Z, which is incorrect.

Screenshot 2024-09-25 at 11 54 47 AM

🧑‍💻  Steps to reproduce

  1. Use the POST /api/v1/fleet/users/admin API endpoint to create a user.
  2. Observe the details for the newly created user in the response body. The created_at and updated_at timestamps are both 0001-01-01T00:00:00Z

🕯️ More info (optional)

The timestamps are correct when retrieving the user using the Get user information endpoint.

JoStableford commented 1 month ago

Linked to Unthread ticket:

Request to Create API Only Users via API #3032)

PezHub commented 1 month ago

QA Notes:

Confirmed - Screenshot 2024-09-25 at 11 34 08 AM

Get info is correct as Dale mentioned Screenshot 2024-09-25 at 11 36 59 AM

sharon-fdm commented 1 month ago

Hey team! Please add your planning poker estimate with Zenhub @iansltx @mostlikelee

iansltx commented 1 month ago

Test plan:

  1. Open the user creation modal in Fleet
  2. Start looking at the Network tab in Chrome Dev Tools
  3. Create (not invite) a user
  4. Check timestamps for created_at/updated_at in the API call fired in step 3
fleet-release commented 6 days ago

Timestamps wrong, like fog, Fleet clears it, brings dawn's light, Truth in data's sight.