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

Fix piv-tool generate-key command in TOKENS doc #1850

Merged
merged 1 commit into from
May 7, 2022

Conversation

nealmcb
Copy link
Contributor

@nealmcb nealmcb commented May 6, 2022

Summary

cosign/TOKENS.md at main · sigstore/cosign says:

... run the cosign generate-key command ...

Which yields this error:

$ cosign generate-key
Error: unknown command "generate-key" for "cosign"

The documentation is simply missing the piv-tool sub-command.

Ticket Link

Resolves: #1849

Signed-off-by: Neal McBurnett [email protected]

Release Note

NONE

dlorenc
dlorenc previously approved these changes May 6, 2022
@nealmcb
Copy link
Contributor Author

nealmcb commented May 7, 2022

I also found and fixed a mistake in the make cosign-pivkey command. Now should be make cosign-pivkey-pkcs11key

TOKENS.md Outdated
@@ -2,7 +2,7 @@

The `cosign` command line tool optionally supports hardware tokens for signing and key management.
This support is enabled through the [PIV protocol](https://csrc.nist.gov/projects/piv/piv-standards-and-supporting-documentation)
and the [go-piv](https://github.com/go-piv/piv-go) library, which is not included in the standard release. Use [`make cosign-pivkey`](https://github.com/sigstore/cosign/blob/a8d1cc1132d4a019a62ff515b9375c8c5b98a5c5/Makefile#L52), or `go build -tags=pivkey`, to build `cosign` with support for hardware tokens.
and the [go-piv](https://github.com/go-piv/piv-go) library, which is not included in the standard release. Use `make cosign-pivkey-pkcs11key`, or `cd cmd/cosign; go build -tags=pivkey`, to build `cosign` with support for hardware tokens.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of the cd cmd/cosign would use

go build -tags=pivkey,pkcs11key -o cosign ./cmd/cosign

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Done, though I left out the -o cosign which seems optional. Make sense?

[cosign/TOKENS\.md at main · sigstore/cosign](https://github.com/sigstore/cosign/blob/main/TOKENS.md) says:

... *run the* `cosign generate-key` *command* ...

Which yields this error:

```
$ cosign generate-key
Error: unknown command "generate-key" for "cosign"
```

The documentation is simply missing the `piv-tool` sub-command.

Resolves: sigstore#1849

Also fix make target for custom build: was make cosign-pivkey
now make cosign-pivkey-pkcs11key.
Drop old, brittle reference to line in Makefile.

Also make `go build` also work the same way, from the root directory.

See also: sigstore#1853

Signed-off-by: Neal McBurnett <[email protected]>
@dlorenc dlorenc merged commit b54fa3a into sigstore:main May 7, 2022
@github-actions github-actions bot added this to the v1.9.0 milestone May 7, 2022
@nealmcb nealmcb deleted the piv-tool-doc branch May 8, 2022 19:17
pxp928 pushed a commit to pxp928/cosign that referenced this pull request May 12, 2022
[cosign/TOKENS\.md at main · sigstore/cosign](https://github.com/sigstore/cosign/blob/main/TOKENS.md) says:

... *run the* `cosign generate-key` *command* ...

Which yields this error:

```
$ cosign generate-key
Error: unknown command "generate-key" for "cosign"
```

The documentation is simply missing the `piv-tool` sub-command.

Resolves: sigstore#1849

Also fix make target for custom build: was make cosign-pivkey
now make cosign-pivkey-pkcs11key.
Drop old, brittle reference to line in Makefile.

Also make `go build` also work the same way, from the root directory.

See also: sigstore#1853

Signed-off-by: Neal McBurnett <[email protected]>
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

Successfully merging this pull request may close these issues.

Hardware Tokens doc missing subcommand piv-tool
3 participants