trident icon indicating copy to clipboard operation
trident copied to clipboard

trident backend config to large to apply with ca signed certificates

Open shader1 opened this issue 4 years ago • 4 comments

unable to update/create backend json/yaml file with a ca signed certificate. it works with shorter shelf signed certificates or user/pw auth combi.

root@123 /d/t/trident-installer [1]# kubectl exec trident-csi-xxxx-klb72 -n trident -c trident-main -- tridentctl  version
+----------------+----------------+
| SERVER VERSION | CLIENT VERSION |
+----------------+----------------+
| 22.01.1        | 22.01.1        |
+----------------+----------------+


root@123 /d/t/trident-installer [1]# ./tridentctl create backend -f mu7_cert_backend.json -n trident
error: unable to upgrade connection: <html>
<head><title>414 Request-URI Too Large</title></head>
<body>
<center><h1>414 Request-URI Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>


root@musxl0266 /d/t/trident-installer# ./tridentctl update backend -f mu7_cert_backend.json -n trident
error: unable to upgrade connection: <html>
<head><title>414 Request-URI Too Large</title></head>
<body>
<center><h1>414 Request-URI Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>


root@123 /d/t/trident-installer [1]# kubectl exec trident-csi-84c64f57c5-klb72 -n trident -c trident-main -- tridentctl --debug update backend --base64 ....8804 chars here.. ==
error: unable to upgrade connection: <html>
<head><title>414 Request-URI Too Large</title></head>
<body>
<center><h1>414 Request-URI Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>


root@123 /d/t/trident-installer [1]# cat mu7_cert_backend.yaml
apiVersion: trident.netapp.io/v1
kind: TridentBackendConfig
metadata:
  name: nas-backend
spec:
  version: 1
  backendName: nas-backend
  storageDriverName: ontap-nas
  managementLIF: 10.216.96.10
  #dataLIF: 10.0.0.2
  svm: mu7s
  clientCertificate: xxx
  clientPrivateKey: xxx
  trustedCACertificate: xxx

shader1 avatar Apr 13 '22 12:04 shader1

Hi @shader1 ,

when configuring CERT backends with YAML, as far as I know, the correct process is the following:

  • create a Trident SECRET with the clientPrivateKey
  • create a Trident TBC with the clientCertificate field & a credentials category referring to the previous object

(I have never tried with the trustedCACertificate, but it should be in either the TBC or the secret...)

example:

apiVersion: v1
kind: Secret
metadata:
  name: ontap-nfs-svm-secret-cert
type: Opaque
stringData:
  clientPrivateKey: >-
    copy_and_paste_the_content_of_the_encoded_key_base64_file
---
apiVersion: trident.netapp.io/v1
kind: TridentBackendConfig
metadata:
  name: backend-tbc-ontap-nas-cert
spec:
  version: 1
  backendName: nas-cert
  storageDriverName: ontap-nas
  managementLIF: 192.168.0.135
  credentials:
    name: ontap-nfs-svm-secret-cert
  clientCertificate: >-
    copy_and_paste_the_content_of_the_encoded_cert_base64_file

YvosOnTheHub avatar Apr 13 '22 12:04 YvosOnTheHub

@shader1 have you been able to resolve this issue on your side ?

sjpeeris avatar Oct 23 '24 14:10 sjpeeris

Closing. Please re-open if you notice this issue with newer versions of Trident.

sjpeeris avatar Nov 06 '24 03:11 sjpeeris

Please re-open if you notice this issue with newer versions of Trident.

Hi, I'm using Trident 25.10, and I would like to authenticate on SVM using certifcates. I have to configure my TridentBackendConfigs (I'm using YAML files and I want not to use tridentctl) according to @YvosOnTheHub post.

I also advise that official documentation is not clear about certificate authentication: I tooks me 2 days to configure it, until I did not found this issue. Moreover, I think I would be "less ugly" if I could put clientCertificate on Secret instead TBC.

fabfabbar avatar Feb 05 '26 13:02 fabfabbar