You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, when a credential is presented, the timestamp for the grant message is taken from the credential's issuance datetime credResult.acdc.ked?.a?.dt. As a result, identical grant messages are generated for every presentation of the credential. This potentially makes Origin susceptible to a reply attack.
This is a function I took from the Chrome DevTools.
export async function multisigGrantCredential(
client: SignifyClient,
groupName: string,
memberName: string,
recipientPrefix: string,
credResult: IssueCredentialResult
) {
const mHab = await client.identifiers().get(memberName)
const gHab = await client.identifiers().get(groupName)
const members = await client.identifiers().members(groupName)
const [grant, gsigs, end] = await client.ipex().grant({
senderName: groupName,
recipient: recipientPrefix,
datetime: credResult.acdc.ked?.a?.dt,
acdc: credResult.acdc,
anc: credResult.anc,
iss: credResult.iss
})
await client
.ipex()
.submitGrant(groupName, grant, gsigs, end, [recipientPrefix])
let mstate = gHab['state']
let sner = new CesrNumber({}, undefined, mstate['ee']['s'])
let seal = [
'SealEvent',
{ i: gHab['prefix'], s: sner.num, d: mstate['ee']['d'] }
]
let sigers = gsigs.map((sig: any) => new signify.Siger({ qb64: sig }))
let ims = signify.d(signify.messagize(grant, sigers, seal))
let atc = ims.substring(grant.size)
atc += end
let gembeds = {
exn: [grant, atc]
}
const recipients = members.signing
.map((m: { aid: string }) => m.aid)
.filter((aid: string) => aid !== mHab.prefix)
if (recipients.length > 0) {
consoleLog(
`Sending join grant credential exn message to other members : `,
recipients
)
await client
.exchanges()
.send(
mHab.name,
'multisig',
mHab,
'/multisig/exn',
{ gid: gHab['prefix'] },
gembeds,
recipients
)
}
}
Describe the solution you'd like
When a credential is presented, a current datetime should be used when the "Present" button is clicked. This datetime must also be propagated to and used by other multisig members (if any) in the notification.
The text was updated successfully, but these errors were encountered:
[from twin in jira]
This issue is being tracked in jira at https://eipi.atlassian.net/browse/DF-2565.
To send new comments there, start them with 'Tell jira:'.
The issue is assigned in jira to Cal Warshaw.
As of 2024-11-04T07:23Z, the status of the issue in jira is 'to do'.
Is your feature request related to a problem? Please describe.
Currently, when a credential is presented, the timestamp for the grant message is taken from the credential's issuance datetime
credResult.acdc.ked?.a?.dt
. As a result, identical grant messages are generated for every presentation of the credential. This potentially makes Origin susceptible to a reply attack.This is a function I took from the Chrome DevTools.
Describe the solution you'd like
When a credential is presented, a current datetime should be used when the "Present" button is clicked. This datetime must also be propagated to and used by other multisig members (if any) in the notification.
The text was updated successfully, but these errors were encountered: