Rancher security documentation

Hey guys!

Is there any documentation (or even a part of the code I could look at) that talks about how rancher handles security? Specifically I’m interested in how the rancher agents know to trust the server and how the ipsec password is transferred and stored.

Thanks!

Topper

Is there an ipsec password pair per host combination or is it a cluster wide pw?

The registration token (long URL in Add Host -> Custom) is used by the agent to connect to the server for the first time and generate an agent account and API key pair. That key pair is then used for all subsequent communication using the same authentication and authorization logic as there is for other kinds of accounts, like environment API keys.

The design is that the agent is untrusted because it is running on outside and potentially hostile (to the server) hardware. So the agent accounts have access to only the resources they need in the API, replies to events are checked that the event was actually sent to that agent, etc. There is not as much in the opposite direction for the agent to verify the host. You’d want to setup TLS (which should work now in 0.30 without those buffer settings :smile:) and the cert will be verified. We plan on making this easier to setup as more of a managed solution option (vs configuring nginx on the side on your own).

The IPSec key is per-environment (the UI term, the drop down in the upper right) generated on the server, stored in the database, and sent to the host as part of the agent registration with the API key pair. The connections are point to point between hosts and AES encrypted, which is accelerated by most modern CPUs and can do at least a couple gbps

@denise I think a documentation section is in order for stuff like this.

1 Like

Thanks for this!

Is the IPsec key ever stored on disk or is it just in memory (on the agent)?

Possible to use SSL RDS connections for the mysql database? https://aws.amazon.com/blogs/aws/amazon-rds-support-for-ssl-connections/