-
Notifications
You must be signed in to change notification settings - Fork 2
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
[api] security hardening for microsoft auth #3803
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,8 @@ assert(process.env.UNIFORM_SUBMISSION_URL); | |
// needed for storing original URL to redirect to in login flow | ||
app.use( | ||
cookieSession({ | ||
maxAge: 24 * 60 * 60 * 100, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. value was previously set at 2.4hrs but I think was supposed to be 24hrs (assuming There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! |
||
// we don't need session to persist for long - it's only required for auth flow | ||
maxAge: 2 * 60 * 60 * 1000, // 2hrs | ||
name: "session", | ||
secret: process.env.SESSION_SECRET, | ||
}), | ||
|
@@ -198,9 +199,9 @@ declare global { | |
} | ||
|
||
namespace Http { | ||
interface IncomingMessageWithSession extends IncomingMessage { | ||
session?: { | ||
nonce: string; | ||
interface IncomingMessageWithCookies extends IncomingMessage { | ||
cookies?: { | ||
"ms-oidc-nonce": string; | ||
}; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not especially clear how to do this using
openid-client
v5x, but they completely rewrote the package for v6 and that might offer a clearer route to fetching the keys and verifying the signatureRelated task in icebox: https://trello.com/c/7BMpYwyt