Skip to content

cli: support for authenticating with private keys and certificates stored in PKCS #11 backend#771

Merged
daniel-weisse merged 8 commits into
masterfrom
dw/cli/pkcs11-certs
Dec 10, 2024
Merged

cli: support for authenticating with private keys and certificates stored in PKCS #11 backend#771
daniel-weisse merged 8 commits into
masterfrom
dw/cli/pkcs11-certs

Conversation

@daniel-weisse
Copy link
Copy Markdown
Member

Proposed changes

Allow users to authenticate themselves with private keys and certificates stored in a PKCS#11 compatible backend.
This removes the need for storing private keys on disk, and instead manage them in a HSM, YubiKey, or any other PKCS#11 compatible device.
Support is implemented through the crypto11 library by Thales.

To initialize the PKCS#11 library, a configuration file with the Token Label/Serial/Slot, Pin of the token, and path to the PKCS#11 library has to be provided.

  • Alternatively, we could forgo the need for a config file and instead let users provide flags for token label, pin and library path

Additionally, users have to specify the ID and/or label of the key and certificate stored in the token to use for authentication.

Additional info

  • AB#4683

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 2, 2024

Deploy Preview for marblerun-docs ready!

Name Link
🔨 Latest commit 96f709e
🔍 Latest deploy log https://app.netlify.com/sites/marblerun-docs/deploys/67570fdd4fea20000850425b
😎 Deploy Preview https://deploy-preview-771--marblerun-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Comment thread cli/internal/cmd/manifestUpdate.go Outdated
Comment thread cli/internal/cmd/manifestUpdate.go Outdated
Comment thread cli/internal/pkcs11/pkcs11_integration_test.go Outdated
Comment thread docs/docs/workflows/user-authentication.md
Comment thread docs/docs/workflows/user-authentication.md Outdated
Comment thread docs/docs/workflows/user-authentication.md Outdated
Comment thread docs/docs/workflows/user-authentication.md Outdated
Comment thread docs/docs/workflows/user-authentication.md Outdated
Comment thread docs/docs/workflows/user-authentication.md Outdated
Comment thread docs/docs/workflows/user-authentication.md Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Alternatively, we could forgo the need for a config file and instead let users provide flags

I'd stick with config file approach

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
}
```

Assuming the key and certificate have the label `marblerun-key` and `marblerun-cert` respectively, invoked the CLI as follows:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Assuming the key and certificate have the label `marblerun-key` and `marblerun-cert` respectively, invoked the CLI as follows:
Assuming the key and certificate have the label `marblerun-key` and `marblerun-cert` respectively, invoke the CLI as follows:

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
@daniel-weisse daniel-weisse changed the title cli: support for authenticating with private keys and certificates stored in PKCS#11 backend cli: support for authenticating with private keys and certificates stored in PKCS #11 backend Dec 10, 2024
@daniel-weisse daniel-weisse merged commit 62bacea into master Dec 10, 2024
@daniel-weisse daniel-weisse deleted the dw/cli/pkcs11-certs branch December 10, 2024 07:55
@daniel-weisse daniel-weisse added the feature This change introduces new functionality label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature This change introduces new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants