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

Update crypto library, CryptoJS CVE & deprecation #9350

Merged
merged 27 commits into from
Nov 4, 2023
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4018395
Switch to node:crypto randomBytes generator for secret generator
cannikin Oct 26, 2023
55988e6
Update dbAuth setup to generate key from node:crypto
cannikin Oct 26, 2023
478655c
Remove secure-random-password as a dependency
cannikin Oct 26, 2023
fd00b28
Update hashPassword to use new algorithm, fallback to old algorithm a…
cannikin Oct 26, 2023
3bd1f54
Converts cookie session management to use node:crypto algorithm
cannikin Oct 27, 2023
973f690
Create 32 byte long secrets
cannikin Oct 27, 2023
853ca31
Ports CryptoJS session decryption to node:crypto
cannikin Oct 27, 2023
373e82e
Removes CryptoJS import
cannikin Oct 27, 2023
bfd61ad
Adds type
cannikin Oct 27, 2023
5dda72e
Update graphiql and studio to use encryptSession function
cannikin Oct 27, 2023
0dd2762
Update secret generation tests
cannikin Oct 27, 2023
a4b03c4
Delete SESSION_SECRET completely instead of nullifying
cannikin Oct 27, 2023
e2a8a32
Add function to determine if legacy session cookie
cannikin Oct 27, 2023
8415d57
Re-encrypt session cookie if getToken() is called with a legacy one
cannikin Oct 30, 2023
893f8f9
String.normalize() passwords in case of weird unicode characters
cannikin Oct 30, 2023
a78712c
Merge branch 'main' into rc-dbauth-crypto
cannikin Oct 30, 2023
8152eab
Encodes scrypt difficulty settings into hashed password
cannikin Oct 30, 2023
b1b5e5a
Merge branch 'main' into rc-dbauth-crypto
cannikin Oct 31, 2023
164079f
Added type
cannikin Nov 3, 2023
dde9126
text could be undefined
cannikin Nov 3, 2023
622d792
Need only 32 characters for session secret
cannikin Nov 3, 2023
537c5da
resetTokenExpiresAt not being properly set as DateTime, need to conve…
cannikin Nov 3, 2023
7aed7bf
Revert "resetTokenExpiresAt not being properly set as DateTime, need …
cannikin Nov 3, 2023
4755867
Merge branch 'main' into rc-dbauth-crypto
cannikin Nov 3, 2023
0e8e37d
chore: lint fix; remove TS from JS file to fix parsing
jtoar Nov 3, 2023
7226ae9
remove crypto-js from deps
jtoar Nov 3, 2023
2990e93
try refactoring the authChecks tests
jtoar Nov 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Delete SESSION_SECRET completely instead of nullifying
  • Loading branch information
cannikin committed Oct 27, 2023
commit a4b03c4c750464b9a9fa219957bf6aabfd6f3a26
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('Graphiql generator tests', () => {
})

it('throws an error if auth provider is dbAuth and no supabase env is set', async () => {
process.env.SESSION_SECRET = null
delete process.env.SESSION_SECRET
try {
await graphiqlHelpers.generatePayload('dbAuth', 'user-id-123')
} catch (e) {
Expand Down
Loading