Security Setting
SecuritySetting
allows configuring security related properties
such as TLS authentication and access control for traffic arriving
at a proxy workload in a security group.
The following example creates a security group for the proxy workloads in
ns1
, ns2
and ns3
namespaces owned by its parent workspace
w1
under tenant mycompany
and defines a security setting that
only allows mutual TLS authenticated traffic from other proxy workloads in
the same group.
apiVersion: security.tsb.tetrate.io/v2
kind: Group
metadata:
name: t1
workspace: w1
tenant: mycompany
organization: myorg
spec:
namespaceSelector:
names:
- "*/ns1"
- "*/ns2"
- "*/ns3"
configMode: BRIDGED
And the associated security settings for all proxy workloads in the group
apiVersion: security.tsb.tetrate.io/v2
kind: SecuritySetting
metadata:
name: defaults
group: t1
workspace: w1
tenant: mycompany
organization: myorg
spec:
authenticationSettings:
trafficMode: REQUIRED
authorization:
mode: GROUP
The following example customizes the allowedSources
to allow
traffic from the namespaces within the group as well as the
catalog-sa
service account from ns4
namespace.
apiVersion: security.tsb.tetrate.io/v2
kind: SecuritySetting
metadata:
name: custom
group: t1
workspace: w1
tenant: mycompany
organization: myorg
spec:
authenticationSettings:
trafficMode: REQUIRED
http:
jwt:
issuer: "https://auth.tetrate.io"
jwksUri: "https://oauth2.auth.tetrate.io/certs"
authorization:
mode: CUSTOM
serviceAccounts:
- "ns1/*"
- "ns2/*"
- "ns3/*"
- "ns4/catalog-sa"
http:
external:
uri: "https://policy.auth.tetrate.io"
includeRequestHeaders:
- authorization
The following example customizes the WafSettings
to enforce
embedded web application firewall rules on sidecars in namespaces
reside in SecurityGroup.
NOTICE: WafSettings is an experimental feature on alpha stage
it ONLY support embedded core rule set (embedded_crs
) in
the ruleSets
field.
Please DO NOT use it in production.
apiVersion: security.tsb.tetrate.io/v2
kind: SecuritySetting
metadata:
name: defaults
group: t1
workspace: w1
tenant: mycompany
organization: myorg
spec:
wafSettings:
ruleSets:
- embedded_crs
ruleEngineMode: ON
AuthenticationSettings
AuthenticationSettings represents configuration related to authenticating traffic within the mesh and end-user credentials if present. It is HIGHLY RECOMMENDED to enable mutual TLS when end-user credentials are present. Sending credentials like JWT over plaintext is a security risk.
Field | Description | Validation Rule |
trafficMode | tetrateio.api.tsb.security.v2.SecuritySetting.AuthenticationMode | – |
http | tetrateio.api.tsb.auth.v2.Authentication | – |
AuthorizationSettings
AuthorizationSettings
define the set of service accounts in one
or more namespaces allowed to access a workload (and hence its
sidecar) in the mesh.
Field | Description | Validation Rule |
mode | tetrateio.api.tsb.security.v2.AuthorizationSettings.Mode | – |
serviceAccounts | List of string | repeated = { |
http | tetrateio.api.tsb.auth.v2.Authorization | – |
Mode
A short cut for defining the common authorization patterns
Name | Number | Description |
UNSET | 0 | Inherit from parent if possible. Otherwise treated as |
NAMESPACE | 1 | The workload allows traffic from any other authenticated workload in its own namespace. |
GROUP | 2 | The workload allows traffic from any other authenticated workload in the security group. |
WORKSPACE | 3 | The workload allows traffic from any other authenticated workload in the workspace. |
CLUSTER | 4 | The workload allows traffic from any other authenticated workload in the cluster. |
DISABLED | 5 | Authorization is disabled. |
CUSTOM | 6 | The workload allows traffic from service accounts defined explicitly. |
SecuritySetting
A security setting applies configuration to a set of proxy workloads in a security group or a workspace. When applied to a security group, missing fields will inherit values from the workspace-wide setting if any.
Field | Description | Validation Rule |
authentication | tetrateio.api.tsb.security.v2.SecuritySetting.AuthenticationMode | – |
authorization | tetrateio.api.tsb.security.v2.AuthorizationSettings | – |
authenticationSettings | tetrateio.api.tsb.security.v2.AuthenticationSettings | – |
wafSettings | tetrateio.api.tsb.security.v2.WafSettings | – |
AuthenticationMode
AuthenticationMode indicates whether to accept only Istio mutual TLS authenticated traffic or allow legacy plaintext traffic as well.
Name | Number | Description |
UNSET | 0 | Inherit from parent, if has one. Otherwise treated as OPTIONAL. |
OPTIONAL | 1 | Accept both plaintext and mTLS authenticated connections. |
REQUIRED | 2 | Accept only mutual TLS authenticated connections. |
WafSettings
WafSettings configure WAF with ModSecurity engine (alpha stage)
Field | Description | Validation Rule |
ruleSets | List of string | repeated = { |
ruleEngineMode | tetrateio.api.tsb.security.v2.WafSettings.SecRuleEngine | – |
SecRuleEngine
Name | Number | Description |
OFF | 0 | ModSecurity is disabled |
ON | 1 | ModSecurity is enabeld |
DETECTION_ONLY | 2 | ModSecurity processes rules, writes logs, but does no disruptive actions. (block, redirect) |