cleargraph icon indicating copy to clipboard operation
cleargraph copied to clipboard

Implement registerKeyPair() flow in API

Open kern opened this issue 7 years ago • 3 comments


type Query {
  keyPairChallenge(publicKey: String!): String!
  keyPair(publicKey: String!, network: ETHEREUM_NETWORK): KeyPair
}

type Mutation {
  registerKeyPair(
    publicKey: String!
    name: String
    deviceType: DEVICE_TYPE
    challenge: String!
    signature: String!
  ): KeyPair!
}


type KeyPair {
  publicKey: String!
  name: String
  deviceType: DEVICE_TYPE
}

enum DEVICE_TYPE {
  DESKTOP
  IOS
  ANDROID
  OTHER
}

kern avatar Jun 08 '18 21:06 kern

concern: everyone can read everyone else's key pair information, which is obviously not ideal. perhaps there's an access token system that uses the key pair challenge, which can be used to detect if a key pair should be accessible or not? or perhaps if the key pair's metadata is accessible?

kern avatar Jun 08 '18 21:06 kern

possible solution: whenever registering a keypair, associate it with an identity contract as well. that way, each keypair is only associated with the intended identity, as opposed to any identity (which could lead to information leakage).

kern avatar Jun 18 '18 18:06 kern

putting this on the backlog until we have better support for multi-device identities

kern avatar Jun 19 '18 22:06 kern