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

Are examples realistic? #116

Open
laurencelundblade opened this issue Sep 17, 2024 · 2 comments
Open

Are examples realistic? #116

laurencelundblade opened this issue Sep 17, 2024 · 2 comments

Comments

@laurencelundblade
Copy link

laurencelundblade commented Sep 17, 2024

In the following, I don't think the example tokens are either real b64-encoded tokens or CBOR-encoded tokens. They probably should be to help people understand. For example, I don't know what 4c693475 is.

It would be a lot of work, but you could import EAT CDDL and use the .b64 and .cbor control operators to validate into them with the cddl tool. I did that with EAT and was able to make some useful corrections to my examples.

{
  "attester A": [
    30001,
    h'2347da55',
    4
  ],
  "attester B": 1668576818(h'2347da55'),
  "attester C": [
    "application/eat+jwt",
    h'4c693475',
    8
  ]
}
@thomas-fossati
Copy link
Collaborator

thomas-fossati commented Sep 18, 2024

For example, I don't know what 4c693475 is.

it's ... base-64 encoded, i.e., the JWT delimiters.

To present something more realistic, we could replace it with the JSON claims-set from EAT's intro, sign it with HS256 and have:

eyJhbGciOiJIUzI1NiJ9.eyJlYXRfbm9uY2UiOiJNSURCTkgyOGlpb2lzalB5IiwidWVpZCI6IkFnQUVpenJLM1EiLCJvZW1pZCI6NzY1NDMsInN3bmFtZSI6IkFjbWUgSW9UIE9TIiwic3d2ZXJzaW9uIjoiMy4xLjQifQ.m_nRRsJIyNq_VT4qeL2SMfgOowkfi-34QtnjeglCU3w

It would be a lot of work, but you could import EAT CDDL and use the .b64 and .cbor control operators to validate into them with the cddl tool. I did that with EAT and was able to make some useful corrections to my examples.

I'd like to minimise this kind of work at this stage.

@laurencelundblade
Copy link
Author

The b64 decoders I tried, two of them, don't decode 4c693475 to ... Encoding ... gives Li4uC

I know it's a lot of work (and you have many docs to worry about!). I did all this work for EAT.

If you don't do this, probably adding a note to indicate what they are so people don't try to interpret and get confused like I did.

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

No branches or pull requests

2 participants