department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
284 stars 206 forks source link

vets-api EKS upgrade effort Postman - third token discovery #86371

Open IGallupSoCo opened 5 months ago

IGallupSoCo commented 5 months ago

Description

Given the promise that the internal Postman spike has delivered, we need to ascertain the why and how of a third token that the current PM collection does not capture. Per Trevor Bosaw on the Identity team, the X-CSRF-Token may be required for PUT actions.

Tasks

Acceptance Criteria

IGallupSoCo commented 5 months ago

I have captured the X-Csrf-Token with a request that Eric helped me to clarify.

However, leveraging that token for PUT or other non-GET requests is yet to pan out. I have been attempting to ascertain what is missing for authentication purposes, while also preparing the collection for handoff to Peter for the upcoming sprint.

IGallupSoCo commented 5 months ago

curl 'https://dev-api.va.gov/v0/user' \ -X 'GET' \ -H 'Cookie: vagov_access_token=eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ2YS5nb3Ygc2lnbiBpbiIsImF1ZCI6WyJ2YW1vYmlsZSIsInZhd2ViIl0sImNsaWVudF9pZCI6InZhd2ViIiwianRpIjoiZWVlZDdlNmEtNDk3Yi00Yjc2LWI1ZmMtMjFhZGFiYTRlMTUzIiwic3ViIjoiZWJmMmU2ZWQtNTNiNi00MDlkLWEzMGEtY2M5OGFlMmFkYzAxIiwiZXhwIjoxNzE4Mzg4MTc1LCJpYXQiOjE3MTgzODc4NzUsInNlc3Npb25faGFuZGxlIjoiNzZlMGJkNTMtNmI2Ny00MGY5LWI4YjMtZGY4ZTYyZjUwYTdlIiwicmVmcmVzaF90b2tlbl9oYXNoIjoiMzYxOTlmOGMwNTliMGFjMTZiZGQ0MDBkYTI2YWQ5ZjY2YjEwYTZmNjk0NjgxZDZhYjU0ZmI1NGZkZWUwMDE1MiIsImRldmljZV9zZWNyZXRfaGFzaCI6bnVsbCwicGFyZW50X3JlZnJlc2hfdG9rZW5faGFzaCI6IjI4MDRhZWQ0NDRlMGYwNGJkM2RiYjhkZWU3NjMzYTY3M2ZhZmIwYTU4YTk2MTU2MjY2ZGE5ZDBjMmViZTRiMjEiLCJhbnRpX2NzcmZfdG9rZW4iOiIzYjhmNTcyZWZlYjI0NTZhNTRhMTI5ZjFkOTRmYTFmZiIsImxhc3RfcmVnZW5lcmF0aW9uX3RpbWUiOjE3MTgzODc4NzQsInZlcnNpb24iOiJWMCIsInVzZXJfYXR0cmlidXRlcyI6e319.BwJdw_CrBvYqObE22ADy1ABuYyT9XPAnkHutcCjeNwmLv_QOz4TUEMJrxpFumVvsFfiEzcInt6DhctTuQCpWTtQULSmXuuCtwZ2Wcve2cEshgiYfKO-d_R8p0UL5nsIzI0woU9N4a6adJThU130Cf2yeV3PeAXhOF4I4bWvW2T4TNmT8QxU27D-HfKAp06kLZbZy5qucAdQ9sQXwCDNBCVPmfiO1VuHuhZQ8U13Snu0cSzId4_AmUtgPvrRtpneyxVAC_z0vpRFmCLT_THA4aHNyu-6fWeWB4NqHbSNQU8CA7BFIyUXNGu46SBbHmrbR3kBn3CtkNsR2q3zl0YQUfg; vagov_anti_csrf_token=3b8f572efeb2456a54a129f1d94fa1ff' \ -H 'X-CSRF-Token: bJ0PQfULWmGZxc07F5L-kWXuTak9o8dUpVcx_YwmBw5z8XpFGwmNcaysUuItv_zhC7amVRBVXoCwIv6_1p-gYQ'

IGallupSoCo commented 5 months ago

The above is an example request made using the previously-acquired tokens and the additional token, as supplied to me by Tervor Bosaw of the Identity Team. I have been attempting to leverage the captured X-CSRF-Token as a header, in the same way in Postman: as a header.

IGallupSoCo commented 5 months ago

Here's at least a partial list that Eric provided to me for endpoints that should require the X-CSRF token:

pjhill commented 5 months ago

We are currently expecting this effort to need to continue into the next sprint.

JoeTice commented 5 months ago

SPRINT 4 UPDATE - IN PROGRESS - The troubleshooting of endpoint issues that are being encountered are turning out to be more involved than expected to resolve. This work will continue into next sprint as @IGallupSoCo moves onto support, and @pjhill takes over the primary focus on this role. We expect to be able to close out this ticket, and will likely create more focused tickets to deal with specific issues being encountered here.

JoeTice commented 4 months ago

SPRINT 5 UPDATE - This task was deprioritized in Sprint 5