Closed archana-elrod closed 3 years ago
https://github.com/archana-maharjan/grpc-mtls Sample code repository is not available.
Please, make the repository publicly available
@geek96 , @kamilmysliwiec repo is public!
@kamilmysliwiec @geek96 repo's public, and I wonder what other information you require to take a look at the issue. Just in case if you're looking for certificates, then please create "certificates at the root folder and add certificates that is generated using following commands or your own.
Or else you can also generate certificates other way as follow: Note: Please replace Your Country, Your State, Your Organization with appropriate values. // Create certificates.conf file and add following contents in it. [req] default_bits = 4096 prompt = no default_md = sha256 req_extensions = req_ext distinguished_name = dn [dn] C = Your Country ST = Your State O = Your Organization CN = localhost [req_ext] subjectAltName = @alt_names [alt_names] DNS.1 = localhost IP.1 = ::1 IP.2 = 127.0.0.1 // Create Root signing Key -- openssl genrsa -out ca.key 4096 // Generate self-signed Root certificate -- openssl req -new -x509 -key ca.key -sha256 -subj "/C=Your Country/ST=Your State/O=Your Organization" -days 365 -out ca.cert // Create a Key certificate for the Server -- openssl genrsa -out service.key 4096 // Create a signing CSR, note create conf file with -- openssl req -new -key service.key -out service.csr -config certificates.conf // Generate a certificate for the Server -- openssl x509 -req -in service.csr -CA ca.cert -CAkey ca.key -CAcreateserial -out service.pem -days 365 -sha256 -extfile certificates.conf -extensions req_ext
Please let me know if you need more info?
I checked out your repository and it seems that this issue is unrelated to NestJS but rather to the underlying @grpc/grpc-js
package. Please, report this issue in their repository https://github.com/grpc/grpc-node
Thank you!!!
Advance apology, if implementation at my end is causing issue!!!
Bug Report
"credentials" in gRPC options points to GRPC.ServerCredentials, which throws TypeError with message "Channel credentials must be a ChannelCredentials object" error, however, if used GRPC.credentials then throws TypeError with message "creds._getSettings is not a function".
Current behavior
gRPC Doc provides neither good documentation on credentials nor working example.
Input Code
grpc-mtls
Expected behavior
Should provide good documentation on credentials options or a good example, or resolve aforementioned TypeError.
Environment