You will only have to follow these steps once per environment. If you have already set up your IRS test user in the desired environment, proceed to Generating an API Token for Your IRS Test User.
- Install the
oathtool
utility:brew install oath-toolkit
- Setup the environment switcher with a
.env
file for the desired environment.- Be sure to populate the
IRS_SUPERUSER_EMAIL
value like so:IRS_SUPERUSER_EMAIL="[email protected]"
- Refer to the example if you are not sure where to put this value.
- Be sure to populate the
- Use the environment switcher to point your local session to the desired environment:
. scripts/env/set-env.zsh myenv
- Create a user in the desired environment's IRS Cognito pool:
aws cognito-idp admin-create-user \ --user-pool-id "$COGNITO_IRS_USER_POOL" \ --username "$IRS_SUPERUSER_EMAIL" \ --temporary-password "$DEFAULT_ACCOUNT_PASS" \ --user-attributes Name="name",Value="${IRS_SUPERUSER_EMAIL}" Name="custom:role",Value="irsSuperuser"
- Run the
irs-super-user.ts
script to enroll your IRS test user in MFA:npx ts-node --transpile-only scripts/irs-super-user.ts
- Find your IRS test user's MFA secret in the script's output and use it to populate the
IRS_SUPERUSER_MFA_SECRET
value in the.env
file you edited on step 2. Save the file before continuing. - In a separate shell session:
- Enter the
ef-cms
directory - Point this shell session to the desired environment:
. scripts/env/set-env.zsh myenv
- Use
oathtool
to generate your MFA code:oathtool -b --totp "$IRS_SUPERUSER_MFA_SECRET"
- Enter the
- Back in the first shell session, enter the MFA code you just generated. This enrolls your test user in MFA.
- You will now be asked for a second MFA code. Run
oathtool
again in the second shell session to generate the code, then paste it into the first session. This verifies the MFA enrollment.
- Open two new shell sessions, switch to the
ef-cms
directory in both, and point both sessions to the desired environment:. scripts/env/set-env.zsh myenv
- In the first shell session, run the
irs-super-user.ts
script:npx ts-node --transpile-only scripts/irs-super-user.ts
- In the second shell session, use
oathtool
to generate your MFA code:oathtool -b --totp "$IRS_SUPERUSER_MFA_SECRET"
- Back in the first shell session, enter the MFA code you just generated.
- Copy the
IdToken
value from the output to your clipboard.
Be sure to replace ID_TOKEN
in the authorization header with a valid API token.
Replace today
with a specific date if nothing has been served today.
GET https://api.myenv/v2/reconciliation-report/today
Authorization: Bearer ID_TOKEN
Replace DOCKET_NUMBER
with the desired docket number.
GET https://api.myenv/v2/cases/DOCKET_NUMBER
Authorization: Bearer ID_TOKEN
Replace DOCKET_NUMBER
with the desired docket number, and replace DOCKET_ENTRY_ID
with a valid docket entry id belonging to the desired case.
GET https://api.myenv/v2/cases/DOCKET_NUMBER/entries/DOCKET_ENTRY_ID/document-download-url
Authorization: Bearer ID_TOKEN