diff --git a/.github/workflows/circleci.yml b/.github/workflows/circleci.yml index b5c65f781..cab9bd955 100644 --- a/.github/workflows/circleci.yml +++ b/.github/workflows/circleci.yml @@ -1,5 +1,5 @@ -name: celo-monorepo -run-name: celo-monorepo tests +name: social connect +run-name: social connect tests # Dockefile for the self-hosted runner: # https://github.com/celo-org/infrastructure/blob/master/terraform/root-modules/gcp/integration-tests-gke/files/github-arc/Dockerfile-monorepo @@ -7,10 +7,14 @@ run-name: celo-monorepo tests on: push: branches: - - master + - main + paths-ignore: + - '**/*.md' pull_request: branches: - - master + - main + paths-ignore: + - '**/*.md' concurrency: group: circle-ci-${{ github.ref }} diff --git a/docs/privacy.md b/docs/privacy.md index 7ed58efe6..b913c663d 100644 --- a/docs/privacy.md +++ b/docs/privacy.md @@ -31,12 +31,12 @@ Below describes the steps to derive the *obfuscated identifier*, which is public |**pepper**| Unique secret, obtained by taking the first 13 characters of the sha256 hash of the *unblinded signature*| |**obfuscated identifier**| Identifier used for on-chain attestations, obtained by hashing the *plaintext identifier*, *identifier prefix*, and *pepper* using this schema: `sha3(sha3({prefix}://{plaintextIdentifier})__{pepper})`. For backwards compatibility, identifiers that are phone numbers use this schema: `sha3({prefix}://{plaintextIdentifier}__{pepper})`| -You can see these steps implemented in the `@celo/identity` sdk [here](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/identifier.ts). +You can see these steps implemented in the `@celo/identity` sdk [here](https://github.com/celo-org/socialconnect/blob/main/packages/sdk/identity/src/odis/identifier.ts). Here is a concrete example: - **Alice's phone number**: `+12345678901` -- The ODIS pepper for Alice's phone number: `SqXDxoTdBpKH2` +- The ODIS pepper for Alice's phone number: `SqXDxoTdBpKH2` - The obfuscation pattern: `sha3({prefix}://{plaintextIdentifier}__{pepper})` - The actual obfuscation: `sha3('tel://+123456789__SqXDxoTdBpKH2')` = `0x8b578f2053a41113066b8410ca2d952a27b5f4531838ff54ca68e7c5cc7caf47` - **Alice's obfuscated phone number**: `0x8b578f2053a41113066b8410ca2d952a27b5f4531838ff54ca68e7c5cc7caf47` @@ -47,7 +47,7 @@ Each identifier type has a corresponding prefix that is appended before the blin These are the prefixes currently defined in the SDK. We are using [DID methods](https://w3c.github.io/did-spec-registries/#did-methods) as prefixes when they exist. We welcome PRs here and [in the SDK](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/odis/identifier.ts#L27-L34) if you'd like to add a new identifier type and prefix! You can also cast an arbitrary string as your prefix if you would like. -| Type | Prefix | +| Type | Prefix | |---------|--------| | Phone numbers | `tel` | | Twitter handles | `twit` | @@ -78,11 +78,11 @@ sequenceDiagram actor user participant issuer participant ODIS - + user -->> issuer: provide plaintext identifier issuer -->> issuer: blind plaintext identifier issuer -->> ODIS: get blinded signature - ODIS -->> issuer: + ODIS -->> issuer: issuer -->> issuer: unblind signature and derive pepper and obfuscated identifier ``` @@ -95,14 +95,14 @@ However, for extra privacy, the user can also blind the identifier before they s ```mermaid %%{init: { "sequence": { "useMaxWidth": true } } }%% sequenceDiagram - actor user - participant issuer - participant ODIS + actor user + participant issuer + participant ODIS - user -->> user: blind plaintext identifier - user -->> issuer: provide blinded identifier + user -->> user: blind plaintext identifier + user -->> issuer: provide blinded identifier issuer -->> ODIS: get blinded signature - ODIS -->> issuer: + ODIS -->> issuer: issuer -->> user: forward blinded signature user -->> user: unblind signature and derive pepper and obfuscated identifier ``` @@ -132,13 +132,13 @@ The most important function is `getObfuscatedIdentifier`, which completes the en `signer` | AuthSigner | object describing the authentication method and providing authentication key, see [Authentication](#authentication) `context` | ServiceContext | object providing the ODIS context, see [Service Context](#service-context) `blindingFactor` (optional) | string | secret seed used for blinding/unblinding the identifier, by default a one-time random seed is used in the blinding client -`clientVersion` (optional) | string | +`clientVersion` (optional) | string | `blsBlindingClient` (optional) | BlsBlindingClient | the default blinding client used only works server-side, see [Runtime Environments](#runtime-environments) for alternatives -`sessionID` (optional) | string | -`keyVersion` (optional) | number | -`endpoint` (optional) | | +`sessionID` (optional) | string | +`keyVersion` (optional) | number | +`endpoint` (optional) | | -#### Returns: +#### Returns: `Promise‹IdentifierHashDetails›` ```typescript diff --git a/packages/sdk/encrypted-backup/package.json b/packages/sdk/encrypted-backup/package.json index cf45ea32c..2a2337517 100644 --- a/packages/sdk/encrypted-backup/package.json +++ b/packages/sdk/encrypted-backup/package.json @@ -7,7 +7,7 @@ "author": "Celo", "license": "Apache-2.0", "homepage": "https://celo-sdk-docs.readthedocs.io/en/latest/encrypted-backup", - "repository": "https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk/encrypted-backup", + "repository": "https://github.com/celo-org/social-connect/tree/main/packages/sdk/encrypted-backup", "keywords": [ "celo", "blockchain", diff --git a/packages/sdk/identity/package.json b/packages/sdk/identity/package.json index 6b39e8a28..9037b8bba 100644 --- a/packages/sdk/identity/package.json +++ b/packages/sdk/identity/package.json @@ -7,7 +7,7 @@ "author": "Celo", "license": "Apache-2.0", "homepage": "https://celo-sdk-docs.readthedocs.io/en/latest/identity", - "repository": "https://github.com/celo-org/celo-monorepo/tree/master/packages/sdk/identity", + "repository": "https://github.com/celo-org/social-connect/tree/main/packages/sdk/identity", "keywords": [ "celo", "blockchain", diff --git a/yarn.lock b/yarn.lock index 2ab633a7c..a13483b8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4667,28 +4667,6 @@ dependencies: "@types/superagent" "*" -"@types/tar-fs@*": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@types/tar-fs/-/tar-fs-2.0.2.tgz#d10b844cc1fcfa87de990a7cec350ee3d168c48b" - integrity sha512-XuZRAvdo7FbDfgQCNkc8NOdSae5XtG+of2mTSgJ85G4OG0miN4E8BTGT+JBTLO87RQ7iCwsIDCqCsHnf2IaSXA== - dependencies: - "@types/node" "*" - "@types/tar-stream" "*" - -"@types/tar-stream@*": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/tar-stream/-/tar-stream-3.1.0.tgz#b67783c27135d21ed6a29e1f9e4a49f32debf741" - integrity sha512-U05c7l6K5VdO1ZV+j3E0NJOX1hfJB497M1+QT2rXx2QqyMbEQJqBw3Utk9eUVnWPyLLqYKt5Ja1kPV1ejm6cZw== - dependencies: - "@types/node" "*" - -"@types/targz@^1.0.0": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/targz/-/targz-1.0.2.tgz#485b00f5bcbc0f0d878862e0f0bdcd293bd4610f" - integrity sha512-dp4IVKAWNbwG6y/qGlphwq6cd5S1f6BTc95TIRZrvJ8grsDnreKicfil5DvY7LRXAjD2ZR3uvXS2TLfHOC+NcQ== - dependencies: - "@types/tar-fs" "*" - "@types/tedious@^4.0.6": version "4.0.9" resolved "https://registry.npmjs.org/@types/tedious/-/tedious-4.0.9.tgz" @@ -4696,11 +4674,6 @@ dependencies: "@types/node" "*" -"@types/tmp@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.1.0.tgz#19cf73a7bcf641965485119726397a096f0049bd" - integrity sha512-6IwZ9HzWbCq6XoQWhxLpDjuADodH/MKXRUIDFudvgjcVdjFknvmR+DNsoUeer4XPrEnrZs04Jj+kfV9pFsrhmA== - "@types/triple-beam@^1.3.2": version "1.3.3" resolved "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.3.tgz" @@ -4721,13 +4694,6 @@ resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== -"@types/yargs@^13.0.2": - version "13.0.12" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.12.tgz#d895a88c703b78af0465a9de88aa92c61430b092" - integrity sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ== - dependencies: - "@types/yargs-parser" "*" - "@types/yargs@^17.0.8": version "17.0.24" resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz"