Add SCIM token reset to admin token API
What does this MR do and why?
SCIM tokens can now be reset (replaced with a new value) using the admin token API.
References
- Admin Token API: Reset SCIM Tokens (#605076 - closed)
- Admin Token: Identify SCIM Tokens (#512768 - closed)
- Admin Token API (&15777)
- https://docs.gitlab.com/ee/api/admin/token.html
How to set up and validate locally
How to set up and validate locally
- Follow the instructions on how to test SCIM tokens.
- Create
instanceandgroupscim tokens as described above. - Create a
personal access tokenwithadmin_modeandapicapabilities.Preferences > Access Tokens > Add a new tokento query thetoken information api. - Query the API:
curl -k --request POST \
--url 'https://gdk.test:3443/api/v4/admin/token' \
--header 'Authorization: Bearer <Admin Token>' \
--header 'Content-Type: application/json' \
--data '{"token": "glsoat-from-above"}'- Now reset the token:
curl -k --request DELETE \
--url 'https://gdk.test:3443/api/v4/admin/token' \
--header 'Authorization: Bearer <Admin Token>' \
--header 'Content-Type: application/json' \
--data '{"token": "glsoat-from-above"}'- Query it again like in step 4 with a
POST- you should now get aNOT FOUND.
MR acceptance checklist
MR Checklist ( @nwittstruck)
- Changelog entry added, if necessary
- Documentation created/updated via this MR
- Documentation reviewed by technical writer or follow-up review issue created
- Tests added for this feature/bug
- Tested in all supported browsers
- Conforms to the code review guidelines
- Conforms to the merge request performance guidelines
- Conforms to the style guides
- Conforms to the javascript style guides
- Conforms to the database guides
Related to &15777
Edited by Nicholas Wittstruck