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

gRPC server and client documentation #80

Closed
5 tasks done
fntlnz opened this issue Sep 25, 2019 · 1 comment · Fixed by #88
Closed
5 tasks done

gRPC server and client documentation #80

fntlnz opened this issue Sep 25, 2019 · 1 comment · Fixed by #88

Comments

@fntlnz
Copy link
Contributor

fntlnz commented Sep 25, 2019

/area documentation

What would you like to be added:
We need to document:

  • Falco gRPC server configuration and usage
  • Falco gRPC outputs configuration and usage
  • gRPC API documentation
  • How to generate the certificates for mutual TLS
  • How to use the SDK with examples

Why is this needed:

Because it's a new feature and people will want to use it!

@leodido
Copy link
Member

leodido commented Sep 27, 2019

In order to try out the feature you need to generate the certificates. Atm you can use the following script:

#!/bin/bash

# Generate valid CA
openssl genrsa -passout pass:1234 -des3 -out ca.key 4096
openssl req -passin pass:1234 -new -x509 -days 365 -key ca.key -out ca.crt -subj  "/C=SP/ST=Italy/L=Ornavasso/O=Test/OU=Test/CN=Root CA"

# Generate valid Server Key/Cert
openssl genrsa -passout pass:1234 -des3 -out server.key 4096
openssl req -passin pass:1234 -new -key server.key -out server.csr -subj  "/C=SP/ST=Italy/L=Ornavasso/O=Test/OU=Server/CN=localhost"
openssl x509 -req -passin pass:1234 -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt

# Remove passphrase from the Server Key
openssl rsa -passin pass:1234 -in server.key -out server.key

# Generate valid Client Key/Cert
openssl genrsa -passout pass:1234 -des3 -out client.key 4096
openssl req -passin pass:1234 -new -key client.key -out client.csr -subj  "/C=SP/ST=Italy/L=Ornavasso/O=Test/OU=Client/CN=localhost"
openssl x509 -passin pass:1234 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out client.crt

# Remove passphrase from Client Key
openssl rsa -passin pass:1234 -in client.key -out client.key

I suggest to generate certificates in /tmp to match the go client example paths and then:

  1. modify falco.yaml configuration file to point to /tmp/server.key etc.
  2. use the falcosecurity/client-go example, eg., go run example/output/main.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants