Skip to content

Add Kryoptic user guide#443

Merged
simo5 merged 3 commits intolatchset:mainfrom
simo5:userguide
Apr 24, 2026
Merged

Add Kryoptic user guide#443
simo5 merged 3 commits intolatchset:mainfrom
simo5:userguide

Conversation

@simo5
Copy link
Copy Markdown
Member

@simo5 simo5 commented Apr 14, 2026

Description

Adds a new user guide (doc/User_Guide.md) to document the configuration and usage of the Kryoptic PKCS#11 soft token.

This documentation is added to provide users with a centralized reference for interacting with the library. It explains supported environment variables, TOML configuration structures (including global and slot-specific options), and provides practical examples for initializing tokens via pkcs11-tool and integrating with OpenSSL.

Fixes #441

Checklist

  • Test suite updated
  • Rustdoc string were added or updated
  • CHANGELOG and/or other documentation added or updated
  • This is not a code change

Reviewer's checklist:

  • Any issues marked for closing are fully addressed
  • There is a test suite reasonably covering new functionality or modifications
  • This feature/change has adequate documentation added
  • A changelog entry is added if the change is significant
  • Code conform to coding style that today cannot yet be enforced via the check style test
  • Commits have short titles and sensible text
  • Doc string are properly updated

Adds a new user guide (`doc/User_Guide.md`) to document the configuration and
usage of the Kryoptic PKCS#11 soft token.

This documentation is added to provide users with a centralized reference for
interacting with the library. It explains supported environment variables,
TOML configuration structures (including global and slot-specific options),
and provides practical examples for initializing tokens via `pkcs11-tool` and
integrating with OpenSSL.

Co-authored-by: Gemini <gemini@google.com>
Signed-off-by: Simo Sorce <simo@redhat.com>
@simo5 simo5 requested a review from Jakuje April 14, 2026 18:17
@abbra
Copy link
Copy Markdown

abbra commented Apr 15, 2026

Thank you, this looks great. LGTM

@Jakuje
Copy link
Copy Markdown
Contributor

Jakuje commented Apr 15, 2026

Looks good! The only though I have if we should convert this to manual page so its directly accessible for Fedora users rather than having just upstream documentation or some documentation which is hard to discover.

@abbra
Copy link
Copy Markdown

abbra commented Apr 15, 2026

I have some code in IPA that turns markdown to man pages

@simo5
Copy link
Copy Markdown
Member Author

simo5 commented Apr 15, 2026

I think there is a pandoc filter for md -> grof, lemme see if I can easily add something here, the main question is how to integrate this with cargo doc ? Or should we do this only in the Fedora spec file and not through cargo ?

@abbra
Copy link
Copy Markdown

abbra commented Apr 15, 2026

You can do that with mdbook renderers: https://rust-lang.github.io/mdBook/format/configuration/renderers.html#custom-backend-commands.

I have this in Akamu:
https://codeberg.org/abbra/akamu/src/branch/main/docs/book.toml

...
[output.rustdoc]
command = "python3 ../../scripts/mdbook-copy-api.py"

The renderer script copies rustdoc output into mdbook's output. It can do whatever you want

@Jakuje
Copy link
Copy Markdown
Contributor

Jakuje commented Apr 15, 2026

Thinking a bit furhter, the manual pages should be more specifc. I think there should be a generic one for kryoptic (libkryptic_pkcs11?), separate for kryoptic.conf and eventually manuals for the tools (but it looks like we do not install these in Fedora?)/

@simo5
Copy link
Copy Markdown
Member Author

simo5 commented Apr 15, 2026

Thinking a bit furhter, the manual pages should be more specifc. I think there should be a generic one for kryoptic (libkryptic_pkcs11?), separate for kryoptic.conf and eventually manuals for the tools (but it looks like we do not install these in Fedora?)/

Yeah we do not install the tools in fedora, they are mostly for testing, except the softhsm migration one.

I can create manpages for them I guess, but should we do it in this PR?

@simo5
Copy link
Copy Markdown
Member Author

simo5 commented Apr 15, 2026

@Jakuje It took me little to generate three manpages, let me know if these go in the direction we need

@simo5 simo5 force-pushed the userguide branch 3 times, most recently from 4284181 to f7a7469 Compare April 15, 2026 22:22
Comment thread doc/kryoptic.conf.man.md Outdated
simo5 and others added 2 commits April 24, 2026 13:53
This adds markdown-formatted manual pages for the Kryoptic project to provide
clear, user-facing documentation for the module and its utilities.

The new documentation includes:
- kryoptic(7): General overview, initialization, and environment variables.
- kryoptic.conf(5): Configuration syntax, global options, and slot setup.
- softhsm_migrate(1): Command-line options and usage for the SoftHSM v2
migration tool.

Adding these files ensures users have the necessary reference material to
successfully configure the PKCS#11 token, understand its runtime behavior, and
migrate existing keys from SoftHSM.

Co-authored-by: Gemini <gemini@google.com>
Signed-off-by: Simo Sorce <simo@redhat.com>
This adds man page generation from markdown sources for kryoptic, its
configuration, and the softhsm_migrate tool to provide system documentation
for users. The Makefile and RPM spec file are updated to build these pages
using pandoc and package them. Additionally, a new Cargo build script using
mandown is introduced to generate the tool man pages during the Rust build
process.

Co-authored-by: Gemini <gemini@google.com>
Signed-off-by: Simo Sorce <simo@redhat.com>
@simo5 simo5 merged commit 4511397 into latchset:main Apr 24, 2026
50 checks passed
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.

Document kryoptic usage from user's point of view

3 participants