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

Create Example app #633

Open
jku opened this issue Sep 1, 2023 · 1 comment
Open

Create Example app #633

jku opened this issue Sep 1, 2023 · 1 comment
Labels
contribfest Issues for KubeCon EU contribfest docs

Comments

@jku
Copy link
Collaborator

jku commented Sep 1, 2023

We should have example code and maybe a high level user manual in addition to the API reference.

I would suggest starting with an example app:

  • as minimal and easy to understand signer/verifier CLI as possible (maybe a single app or two)
  • should use Signer API best practices
  • I suggest supporting file based keys first (while making it clear it's a demo: we do not recommend ever storing private keys on disk). This means that this issue is likely blocked by signer: Improved the "file-based signer" #617
  • it would be cool to be able to demo other keytypes as well (like a yubikey) but since most people don't have one that should be optional

Things I'd like to showcase:

  • choosing the right signing key with private key uri
  • verifying the signature

TODO:

  • expand on the above

References

@jku jku changed the title Example and/or User manual Create Example app and/or User manual Sep 1, 2023
@lukpueh lukpueh added the docs label Nov 2, 2023
@lukpueh lukpueh added the contribfest Issues for KubeCon EU contribfest label Mar 14, 2024
@jku jku changed the title Create Example app and/or User manual Create Example app Mar 14, 2024
@jku
Copy link
Collaborator Author

jku commented Apr 25, 2024

securesystemslib example app

Rough sketch:

example uses two working directories

  • private/ -- this is where signing config is stored (and private key material for file keys)
  • public/ -- this is where signatures and public keys are "published" (this is the equivalent of TUF repository)

example contains 2 separate apps, one has two commands:

  • signer add-key -- adds a new signing key
    • default is file based, --hsm uses a yubikey
    • publishes the new public key in public/<keyid>.json
    • stores signer uri in private/signers (and the private key content for file based keys in private/<keyid>.pem)
  • signer sign -- sign with all current keys
    • loops through list of signer uris in private/signers.json, signs predefined content with each
    • publishes the signatures in public/signatures.json
  • verify -- verify with all current public keys
    • loops through public/<keyid>.json, verifies the predefined content with each key

app state can be cleared by deleting private/ and public/

@jku jku mentioned this issue Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribfest Issues for KubeCon EU contribfest docs
Projects
None yet
Development

No branches or pull requests

2 participants