Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLA-873 #6

Merged
merged 17 commits into from
Jan 17, 2023
Merged

PLA-873 #6

merged 17 commits into from
Jan 17, 2023

Conversation

lucas-soranzo
Copy link
Contributor

No description provided.

@lucas-soranzo lucas-soranzo self-assigned this Jan 11, 2023
@jakemwood jakemwood changed the title Pla 873 PLA-873 Jan 12, 2023
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
test("a JWT that tries to be sneaky and change the audience", async () => {
const request = new TestBoxUseCaseRequest(USE_CASE_REQUEST_BODY);
const jwtToken =
"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlRPTTRycTdySlNNdk5Gang2eEVIVXJScmVqU0lJcC9MZWtVWjhjVXhpaGs5bXh2T1FocGFaK1RQTUs5MkhYZFpvOTdmRzVqTHJUeHJRajFuZkdEVUhRPT0ifQ.eyJzdWIiOiIxMjM0NTY3ODkwIiwidHJpYWxfaWQiOiJjMzVkZDkxOS02ZGYzLTQ5Y2EtOTZkMC1kMzBlMTBkYmE0NDIiLCJhdWQiOiJ1bml0LXRlc3QtYnJva2VuIn0.F3-i0vXNUq4uDBX3YgSswiBSbqByPR0KxSrwuTBYdA1t8EWfPyFMXpxplIsXxCe26OrizIUoReuxKM_aAk9FTtWAuVmXYBKrSei77KpW2Vsp71SjglPgFFY6Wj_1BkTp2C1Z3iAjVBpfJOw5R0hNp18BrLBcg-iZ4XZL6LGUR2YHWPK2MqLDg6Yant_ZP_gIzPcW16UEleJFTGlbfh3Jsl47dQwisuWwiCUJb-7XO8bEQY6SFKZul36NQ4wU9qHnOiG27oEUwBR9LdXuqbJc3C3RLoPlDLS4SKjxAfp0SkejjuRqxPqFmSVJF9YbhrB_8gNwqWIEEffS2gUoIU3e4w";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these JWTs have expiries? If they do, they might cause these tests to fail later on. We may need to live generate them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didnt find anything in the token or checking for expiration, so I would say they dont.

Also the tests for trial request had been running with fixed tokens for a while now.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

app.use(bodyParser.json());

app.post("/api/testbox/trial", async (req, res) => {
const trialRequest = await TestBoxTrialRequest.fromExpressRequest(req);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to change -- but since we have configured TestBox to be EXPRESS above, we would want this to just be TestBoxTrialRequest.fromRequest(request) or even just TestBoxTrialRequest(req)

@lucas-soranzo lucas-soranzo merged commit 3973a16 into main Jan 17, 2023
@lucas-soranzo lucas-soranzo deleted the PLA-873 branch January 17, 2023 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants