Skip to content

CTM-384 Fix miscalculated "expires in" value - #4928

Open
aednichols wants to merge 7 commits into
developfrom
aen_ctm_384
Open

CTM-384 Fix miscalculated "expires in" value#4928
aednichols wants to merge 7 commits into
developfrom
aen_ctm_384

Conversation

@aednichols

Copy link
Copy Markdown
Contributor

Infosec flagged this as a cookie that lasts too long, and it's the result of a semantics issue with expiration.

I am separately looking into where OIDC_CLAIM_expires_in gets set upstream, as this may affect lots of apps and it would be good to fix it at the source.

Also tried to robustify a test that failed on my previous merge to Dev with #4927 (flakey tests suck).

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.86%. Comparing base (854d476) to head (b892da1).

Files with missing lines Patch % Lines
...leonardo/http/api/StandardUserInfoDirectives.scala 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4928      +/-   ##
===========================================
- Coverage    73.87%   73.86%   -0.01%     
===========================================
  Files          131      131              
  Lines        11207    11208       +1     
  Branches       957      924      -33     
===========================================
  Hits          8279     8279              
- Misses        2928     2929       +1     
Files with missing lines Coverage Δ
...leonardo/http/api/StandardUserInfoDirectives.scala 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 854d476...b892da1. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// test(googleProject, createAppRequest(AppType.Galaxy, "Galaxy-Workshop-ASHG_2020_GWAS_Demo", None), true, true)
// }

"create CROMWELL app, delete it and re-create it with same disk" taggedAs (Tags.SmokeTest, Retryable) in {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not really part of this PR, but while you are at it am I good with removing the Rstudio test below too since we no longer support it, or I can do it as part of my biker GKE/AKS cleanup later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done!

override def requireUserInfo: Directive1[UserInfo] =
override def requireUserInfo: Directive1[UserInfo] = {

// `expires_in` has undefined behavior from upstream and can mean expires AT (absolute)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wait what? 😆

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah we take a JWT absolute timestamp exp and relabel it as a relative duration oidc_claim_expires_in.

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.

2 participants