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

Remove pepper, read secret from file and minimise the number of secrets #1844

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

corrideat
Copy link
Member

No description provided.

@corrideat corrideat requested a review from taoeffect February 12, 2024 17:20
Copy link

cypress bot commented Feb 12, 2024

Passing run #1865 ↗︎

0 110 8 0 Flakiness 0

Details:

Merge 15e17a2 into e2295fe...
Project: group-income Commit: 913d925c5d ℹ️
Status: Passed Duration: 10:45 💡
Started: Feb 12, 2024 7:48 PM Ended: Feb 12, 2024 7:59 PM

Review all test suite changes for PR #1844 ↗︎

@corrideat corrideat force-pushed the remove-pepper branch 3 times, most recently from ac568ae to c05231d Compare February 12, 2024 17:39
Copy link
Member

@taoeffect taoeffect left a comment

Choose a reason for hiding this comment

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

Review ready!

backend/zkppSalt.js Outdated Show resolved Hide resolved
shared/domains/chelonia/db.js Outdated Show resolved Hide resolved
backend/zkppSalt.js Outdated Show resolved Hide resolved
backend/zkppSalt.js Outdated Show resolved Hide resolved
}

return Boom.internal('internal error')
})

route.GET('/zkpp/{contract}/auth_hash', {
route.GET('/zkpp/{contractID}/auth_hash', {
Copy link
Member

Choose a reason for hiding this comment

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

Nice job on renaming these from contract to contractID 👍

// is not implemented.
// b. Alternatively, migration can be done without migrating password salt
// records. This requires user interaction to create new salt records
// on the new server.
Copy link
Member

Choose a reason for hiding this comment

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

Really well written and clear comment 👏, well done, thanks @corrideat!

Comment on lines 53 to 57
const recordSecret = IkmPromise.then(IKM => Buffer.from(hashStringArray('private/recordSecret', IKM)).toString('base64'))
// corresponds to the key for the keyed Hash function in "Log in / session establishment"
const challengeSecret = 'secret' // TODO: generate randomly and store in DB under private prefix
const challengeSecret = IkmPromise.then(IKM => Buffer.from(hashStringArray('private/challengeSecret', IKM)).toString('base64'))
// corresponds to a component of s in Step 3 of "Salt registration"
const registrationSecret = 'secret' // TODO: generate randomly and store in DB under private prefix
const registrationSecret = IkmPromise.then(IKM => Buffer.from(hashStringArray('private/registrationSecret', IKM)).toString('base64'))
Copy link
Member

Choose a reason for hiding this comment

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

These values can be set in a initZkpp() function that gets called from database.js (see bottom of that file)

Copy link
Member

@taoeffect taoeffect left a comment

Choose a reason for hiding this comment

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

Great work!

@taoeffect taoeffect merged commit b29d8dd into master Feb 12, 2024
4 checks passed
@taoeffect taoeffect deleted the remove-pepper branch February 12, 2024 20:03
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