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

docs: add howto to setup TLS connections #2553

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

igaw
Copy link
Collaborator

@igaw igaw commented Oct 30, 2024

There are couple of step necessary to get TLS working nicely. Document it how this is done.

--hostnqn nqn.2014-08.org.nvmexpress:uuid:befdec4c-2234-11b2-a85c-ca77c773af36 \
--subsysnqn nqn.io-1 --identity 1 \
--keydata NVMeTLSkey-1:01:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACtVQoZ: \
--insert --keyfile /etc/nvme/tls-keys
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the --keyfile option is currently not available for check-tls-key, but only for gen-tls-key.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just added this new option yesterday :)

@igaw
Copy link
Collaborator Author

igaw commented Oct 31, 2024

I've added some more content to it, e.g. the debugging tips. I've spend some time to figure them all out. Maybe it helps others to shortcut if something isn't working.

@igaw igaw force-pushed the add-tls-doc branch 3 times, most recently from 904a646 to c2c6157 Compare November 4, 2024 09:48
@igaw
Copy link
Collaborator Author

igaw commented Nov 4, 2024

@martin-gpy do miss something or is my wording difficult to understand? I tried to write down everything I learned in the last few weeks on this topic. But don't expect too much from me, I am not a technical doc writer :)

### Recommendation for Handling TLS Keys

The `nvme connect` command also allows passing a TLS key directly via the
command line or a JSON config file. Avoid this method in production
Copy link
Contributor

@martin-gpy martin-gpy Nov 8, 2024

Choose a reason for hiding this comment

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

Are we saying passing the TLS keys via the config JSON file is also a security risk, and should be avoided in production environments? Concern is the only way we can connect using different TLS keys (as well as different dhchap keys) to different subsystems at one go is via the config JSON file alone.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we should state this. Generally, mixing configuration with authentication/security tokens is discourage by the security folks. This doesn't mean it is insecure per se. If no one has access to config file except root and nvme-cli, it's propably okay? I heard that the aim should be to remove/hide the tokens from the FS after it has been used. So given this I'd say it better to say it's not recommended to do so.

@martin-gpy
Copy link
Contributor

@martin-gpy do miss something or is my wording difficult to understand? I tried to write down everything I learned in the last few weeks on this topic. But don't expect too much from me, I am not a technical doc writer :)

Just had a few minor review comments. This looks quite good now. Thanks for getting this done.

There are couple of step necessary to get TLS working nicely. Document
it how this is done.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
@igaw igaw merged commit b96cd2d into linux-nvme:master Nov 11, 2024
16 of 17 checks passed
@igaw igaw deleted the add-tls-doc branch November 11, 2024 12:41
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.

2 participants