Skip to content

Commit 4e718d8

Browse files
committed
Applying PR feedback
1 parent e3bd984 commit 4e718d8

File tree

3 files changed

+64
-52
lines changed

3 files changed

+64
-52
lines changed

source/includes/k8s/file-transfer-protocol-k8s.rst

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ MinIO supports the following authentication providers:
5353
- :ref:`MinIO IDP <minio-internal-idp>` users and their service accounts
5454
- :ref:`Active Directory/LDAP <minio-external-identity-management-ad-ldap>` users and their service accounts
5555
- :ref:`OpenID/OIDC <minio-external-identity-management-openid>` service accounts
56+
- :ref:`Certificate Key File <minio-certificate-key-file-sftp-k8s>`
5657

5758
:ref:`STS <minio-security-token-service>` credentials **cannot** access buckets or objects over SFTP.
5859

@@ -165,53 +166,60 @@ If SFTP is enabled, the output resembles the following:
165166
166167
enableSFTP: true
167168
169+
.. _minio-certificate-key-file-sftp-k8s
170+
168171
Connect to MinIO Using SFTP with a Certificate Key File
169172
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170173

171174
.. versionadded:: RELEASE.2024-05-07T06-41-25Z
172175

173-
MinIO supports user certificate based authentication on SFTP.
174176

175-
This example adds a certificate signature for the MinIO user ``sftp-ca-user1``.
176-
The signature remains valid for one week after creation.
177+
MinIO supports mutual TLS (mTLS) certificate-based authentication on SFTP, where both the server and the client verify the authenticity of each other.
177178

178-
Before beginning, the following prerequisites must be met:
179+
This type of authentication requires the following public key files:
179180

180-
- Create a trusted user Certificate Authority, such as with ``ssh-keygen -f user_ca``
181-
- Start or restart the MinIO server to support this CA by including the following flag in the command string:
181+
1. Trusted certificate authority
182+
2. MinIO Server signed by the certificate authority
183+
3. User signed by the certificate authority for the client connecting by SFTP and located in the user's ``.ssh`` folder or equivalent for the operating system
182184

183-
.. code-block:: bash
184-
:class: copyable
185+
The keys must include a `principals list <https://man.openbsd.org/ssh-keygen#CERTIFICATES>`__ of the user(s) that can authenticate with the key:
186+
187+
.. code-block:: console
188+
:class: copyable
185189
186-
--sftp=trusted-user-ca-key=/path/to/.ssh/user_ca.pub
190+
ssh-keygen -s ~/.ssh/ca_user_key -I miniouser -n miniouser -V +1h -z 1 miniouser1.pub
187191
188-
Repeat the following steps for each user who accesses the MinIO Server by SFTP with a user CA key file:
192+
- ``-s`` specifies the path to the certificate authority public key to use for generating this key.
193+
The specified public key must have a ``principals`` list that includes this user.
194+
- ``-I`` specifies the key identity for the public key.
195+
- ``-n`` creates the ``user principals`` list for which this key is valid.
196+
You must include the user for which this key is valid, and the user must match the username in MinIO.
197+
- ``-V`` limits the duration for which the generated key is valid.
198+
In this example, the key is valid for one hour.
199+
Adjust the duration for your requirements.
200+
- ``-z`` adds a serial number to the key to distinguish this generated public key from other keys signed by the same certificate authority public key.
189201

190-
1. Create user public key in client PC (testuser1 in this example) ssh-keygen
191-
2. Provide copy of /home/testuser1/.ssh/id_rsa.pub to CA server.
192-
3. Create a signature for the identity ``sftp-ca-user1``.
193-
(The name must match the username in MinIO).
194-
In this example, the signature is valid for one week.
195-
196-
.. code-block:: bash
197-
:class: copyable
202+
MinIO requires specifying the Certificate Authority used to sign the certificates for SFTP access.
203+
Start or restart the MinIO Server and specify the path to the trusted certificate authority's public key using an ``--sftp="trusted-user-ca-key=PATH"`` flag:
198204

199-
ssh-keygen -s /home/miniouser/.ssh/user_ca -I sftp=ca-user1-2024-05-03 -n sftp-ca-user1 -V +1w id_rsa.pub
205+
.. code-block:: console
206+
:class: copyable
200207
201-
4. Copy ``id_rsa-cert.pub`` to ``/home/sftp-ca-user1/.ssh/id_rsa-cert.pub`` on the client PC.
208+
minio server {path-to-server} --sftp="trusted-user-ca-key=/path/to/.ssh/ca_user_key.pub" {...other flags}
202209
203-
After the certificate expires, repeat steps 3 and 4.
204-
Alternatively, leave out the -V +1w argument when creating the signature to to add a certificate that doesn't expire.
210+
When connecting to the MinIO Server with SFTP, the client verifies the MinIO Server's certificate.
211+
The client then passes its own certificate to the MinIO Server.
212+
The MinIO Server verifies the key created above by comparing its value to the the known public key from the certificate authority provided at server startup.
205213

206-
Once completed the trusted user can connect to the MinIO server over SFTP:
214+
Once the MinIO Server verifies the client's certificate, the user can connect to the MinIO server over SFTP:
207215

208216
.. code-block:: bash
209217
:class: copyable:
210218
211219
sftp -P <SFTP port> <server IP>
212220
213-
Force use of service account or ldap for authentication
214-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221+
Require service account or LDAP for authentication
222+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215223

216224
To force authentication to SFTP using LDAP or service account credentials, append a suffix to the username.
217225
Valid suffixes are either ``=ldap`` or ``=svc``.

source/includes/linux/file-transfer-protocol-not-k8s.rst

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -228,49 +228,53 @@ Connect to MinIO Using SFTP with a Certificate Key File
228228

229229
.. versionadded:: RELEASE.2024-05-07T06-41-25Z
230230

231-
MinIO supports user certificate based authentication on SFTP.
232231

233-
This example adds a certificate signature for the MinIO user ``sftp-ca-user1``.
234-
The signature remains valid for one week after creation.
232+
MinIO supports mutual TLS (mTLS) certificate-based authentication on SFTP, where both the server and the client verify the authenticity of each other.
235233

236-
Before beginning, the following prerequisites must be met:
234+
This type of authentication requires the following public key files:
237235

238-
- Create a trusted user Certificate Authority, such as with ``ssh-keygen -f user_ca``
239-
- Start or restart the MinIO server to support this CA by including the following flag in the command string:
236+
1. Trusted certificate authority
237+
2. MinIO Server signed by the certificate authority
238+
3. User signed by the certificate authority for the client connecting by SFTP and located in the user's ``.ssh`` folder or equivalent for the operating system
240239

241-
.. code-block:: bash
242-
:class: copyable
240+
The keys must include a `principals list <https://man.openbsd.org/ssh-keygen#CERTIFICATES>`__ of the user(s) that can authenticate with the key:
243241

244-
--sftp=trusted-user-ca-key=/path/to/.ssh/user_ca.pub
242+
.. code-block:: console
243+
:class: copyable
245244
246-
Repeat the following steps for each user who accesses the MinIO Server by SFTP with a user CA key file:
245+
ssh-keygen -s ~/.ssh/ca_user_key -I miniouser -n miniouser -V +1h -z 1 miniouser1.pub
247246
248-
1. Create user public key in client PC (testuser1 in this example) ssh-keygen
249-
2. Provide copy of /home/testuser1/.ssh/id_rsa.pub to CA server.
250-
3. Create a signature for the identity ``sftp-ca-user1``.
251-
(The name must match the username in MinIO).
252-
In this example, the signature is valid for one week.
253-
254-
.. code-block:: bash
255-
:class: copyable
247+
- ``-s`` specifies the path to the certificate authority public key to use for generating this key.
248+
The specified public key must have a ``principals`` list that includes this user.
249+
- ``-I`` specifies the key identity for the public key.
250+
- ``-n`` creates the ``user principals`` list for which this key is valid.
251+
You must include the user for which this key is valid, and the user must match the username in MinIO.
252+
- ``-V`` limits the duration for which the generated key is valid.
253+
In this example, the key is valid for one hour.
254+
Adjust the duration for your requirements.
255+
- ``-z`` adds a serial number to the key to distinguish this generated public key from other keys signed by the same certificate authority public key.
256256

257-
ssh-keygen -s /home/miniouser/.ssh/user_ca -I sftp=ca-user1-2024-05-03 -n sftp-ca-user1 -V +1w id_rsa.pub
257+
MinIO requires specifying the Certificate Authority used to sign the certificates for SFTP access.
258+
Start or restart the MinIO Server and specify the path to the trusted certificate authority's public key using an ``--sftp="trusted-user-ca-key=PATH"`` flag:
258259

259-
4. Copy ``id_rsa-cert.pub`` to ``/home/sftp-ca-user1/.ssh/id_rsa-cert.pub`` on the client PC.
260+
.. code-block:: console
261+
:class: copyable
262+
263+
minio server {path-to-server} --sftp="trusted-user-ca-key=/path/to/.ssh/ca_user_key.pub" {...other flags}
260264
261-
After the certificate expires, repeat steps 3 and 4.
262-
Alternatively, leave out the -V +1w argument when creating the signature to to add a certificate that doesn't expire.
265+
When connecting to the MinIO Server with SFTP, the client verifies the MinIO Server's certificate.
266+
The client then passes its own certificate to the MinIO Server.
267+
The MinIO Server verifies the key created above by comparing its value to the the known public key from the certificate authority provided at server startup.
263268

264-
Once completed the trusted user can connect to the MinIO server over SFTP:
269+
Once the MinIO Server verifies the client's certificate, the user can connect to the MinIO server over SFTP:
265270

266271
.. code-block:: bash
267272
:class: copyable:
268273
269274
sftp -P <SFTP port> <server IP>
270275
271-
272-
Force use of service account or ldap for authentication
273-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276+
Require service account or LDAP for authentication
277+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
274278

275279
To force authentication to SFTP using LDAP or service account credentials, append a suffix to the username.
276280
Valid suffixes are either ``=ldap`` or ``=svc``.

source/reference/minio-server/minio-server.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ The command accepts the following arguments:
194194

195195
* - ``trusted-user-ca-key``
196196
- Specifies a file containing public key of a certificate authority that is trusted to sign user certificates for authentication.
197-
The file must contain a user principals list, and the list must include the user that is authenticating.
197+
The file must contain a `user principals list <https://man.openbsd.org/ssh-keygen#CERTIFICATES>`__, and the list must include the user(s) that can authenticate with the key.
198198
- Absolute path or relative path from current location to the user's trusted certificate authority public key file.
199199

200200
* - ``pub-key-algos``

0 commit comments

Comments
 (0)