Security in Load balancing
Who may do what with a load balancer (IAM), what is audited, where certificate keys are kept, and how targets can tell your load balancer's traffic apart.
IAM actions
Every request, from the API, the CLI, Terraform or the console, is checked against your IAM
policies. A load balancer's resource name is
rn:ews:<region>:<organization id>:lb:load-balancer/<load balancer id>.
| Action | Access | What it allows |
|---|---|---|
lb:DescribeLoadBalancers | Read | List and describe load balancers |
lb:CreateLoadBalancer | Write | Create a new load balancer |
lb:DeleteLoadBalancer | Write · destructive | Delete a load balancer |
lb:AddTarget | Write | Add a backend target to a load balancer |
lb:RemoveTarget | Write · destructive | Remove a backend target from a load balancer |
lb:AddService | Write | Add a service (port mapping) to a load balancer |
lb:UpdateService | Write · destructive | Update a load balancer service configuration |
lb:AddRule | Write | Add a host/path rule routing requests to a target group (application load balancers) |
lb:RemoveRule | Write · destructive | Remove a host/path rule from a load balancer |
lb:SetWebAcl | Write · destructive | Attach a web ACL to an application load balancer, or detach it (also needs waf:GetWebAcl on the ACL) |
lb:DeleteService | Write · destructive | Delete a load balancer service |
Generated from the service’s IAM descriptor. Sensitive reads hand over secret material or source code and are recorded in the audit log like writes; destructive writes delete, overwrite or revoke.
- Adding and removing are separate actions for targets (
lb:AddTarget,lb:RemoveTarget), services (lb:AddService,lb:DeleteService) and rules (lb:AddRule,lb:RemoveRule). Someone can be allowed to take a broken backend out of rotation without being allowed to add one. - Renewing a certificate now needs
lb:UpdateService. - Attaching a web ACL needs
lb:SetWebAclandwaf:GetWebAclon the ACL. The console's list of ACLs also needswaf:ListWebAcls. - The console's pages of a load balancer need
lb:DescribeLoadBalancerson it; without it they answer 404, so they do not tell whether the id exists. - A load balancer another service owns (a database's, cache's, broker's or MySQL cluster's
endpoint, or a Kubernetes Service's) is refused with
409for every change here except renewing a certificate, whatever your permissions.
Audit
Creating and deleting load balancers, adding and removing targets, services and rules, changing a service, renewing a certificate and setting the web ACL are recorded in the audit log, allowed or denied. Reads are not recorded when allowed. See Audit log.
Certificates and keys
lb11–lb31: an uploaded private key is handed to the provider and not stored by Deutsche Cloud.applicationanddedicated: the private key of an uploaded certificate (and, onapplication, of one Deutsche Cloud issues) is stored sealed under the KMS master key and opened only to configure the fleet.- The API never returns a private key in the clear. On
lb11–lb31it does not return an uploaded certificate either; onapplicationanddedicated, reading the load balancer returns each https service's certificate (certificatePem). - The console's Add service form does not keep the private key in its saved draft.
Traffic to your targets
- An
httpsservice sends plain HTTP to the targets; there is no re-encryption. For TLS to the targets, use atcpservice and end TLS on them (lb11–lb31anddedicated;applicationhas notcp). applicationload balancers share their source addresses with other organizations' load balancers. Every request carriesX-EWS-LB-Tokenwith your load balancer's origin token (on its Overview tab, Origin token); check it on your targets to accept your load balancer's traffic only.dedicatedhttp and https services send the header too (the token is the load balancer'soriginTokenin the API).applicationand publicdedicatedload balancers refuse targets at private, reserved or platform addresses.