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

Design TokenScript for attestation tokens #435

Open
AW-STJ opened this issue Nov 9, 2021 · 8 comments
Open

Design TokenScript for attestation tokens #435

AW-STJ opened this issue Nov 9, 2021 · 8 comments
Assignees

Comments

@AW-STJ
Copy link
Contributor

AW-STJ commented Nov 9, 2021

@oleggrib - can you share your requirement for TokenScript

@oleggrib
Copy link
Contributor

oleggrib commented Nov 10, 2021

List of the properties to describe in TokenScript:

  • TokenName
  • TokenDescription
  • TokenWebsiteURL
  • Token schema (property->type)
  • attestationOrigin
  • AttestorPublicKey
  • tokenOrigin
  • magicLinkParamsSchema (token, secret, pok ,id, type)
  • localStorageDBName
  • localStorageTokenItemName
  • localStorageEthKeyItemName
  • tokenUniqueIdParam
  • IssuerPublicKey
  • WhiteListDomainNames
  • CryptoVerifyServerAPIEndpopint
  • DomainsWhiteList
  • DomainsBlackList

@nicktaras , do you need some additional properties in the TokenScript to describe specific token?

@AW-STJ AW-STJ changed the title Design for TokenScript for attestation tokens Design TokenScript for attestation tokens (TokenScript Config) Nov 28, 2021
@oleggrib
Copy link
Contributor

I can see config data in the Readme.md in the https://github.com/TokenScript/token-negotiator

those data must be syncronized with backend validator, other services who use this token etc.

Also webster have to know some tech info about this Token and can make mistake somewhere.

In case if we finish this task then we can pass just tokenName to the Negotiator, other data can be fetched from remote XML file.

Lets do next:

@nicktaras @micwallace @foxgem @AW-STJ

@micwallace
Copy link

Yep 100% agree Oleh. As soon as we get this into TokenScript we can take advantage of the TokenScript signing security.

@oleggrib
Copy link
Contributor

@micwallace , @nicktaras do you work on this issue?
if no then lets make simple JSON file (as forst draft) in specific location and read it from there. ok? I can do the PR.

@oleggrib
Copy link
Contributor

@micwallace , @nicktaras will we still duplicate config? out backend should validate it too, so we need aligned config. With more duplication more chanses make mistake.

@AW-STJ
Copy link
Contributor Author

AW-STJ commented Jun 28, 2022

I will escalate this with @weiwu-zhang. We had discussed this recently as well.

If we are hitting this issue again, and is related to attestation.id as well, then its high time to decide on the config before moving forward

@oleggrib
Copy link
Contributor

If we are hitting this issue again, and is related to attestation.id as well, then its high time to decide on the config before moving forward

@AW-STJ , This questions is not related to attestation.id (we use OTP email verification, so attestation.id completely separated from token), but related to tokenNegotiator.Client, tokenNegotiator.Client, crypto-verify and hotelBogota_backend(in case if third party website validate data without API)

@SmartLayer SmartLayer transferred this issue from SmartTokenLabs/attestation Jul 4, 2022
@SmartLayer SmartLayer changed the title Design TokenScript for attestation tokens (TokenScript Config) Design TokenScript for attestation tokens Jul 6, 2022
@micwallace
Copy link

micwallace commented Jul 26, 2022

Some redundant field have been removed from the negotiator interfaces. Defaults are still set in Outlet but can be overridden. Currently, here is what is required in both client and outlet:

export interface OffChainTokenConfig {
    title: string;
    image: string;
    tokenOrigin: string;
    unEndPoint: string;
    attestationOrigin: string;
    tokenParser?: any; // Note: This will be changed to tokenSchema, which will be embedded in the XML
    base64senderPublicKeys: {[devconId: string]: string};
    base64attestorPubKey: string;
}

I have created a dynamic schema parser that works with asn1-schema library to parse & serialize asn1 based on a JSON schema definition. This can be used to parse an arbitrary token schema defined within XML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress: TokenScript
Development

No branches or pull requests

4 participants