inbound: Support multiple authorization types#1560
Merged
Conversation
The inbound policy module uses the label `saz_name` to indicate the
authorization resource being employed to allow/deny traffic. This
corresponds to the `ServerAuthorization` kubernetes resource (with the
`saz` shortname). This resource type is going to be deprecated in favor
of a new, more general, `AuthorizationPolicy` resource.
When this change is made in the control plane, the policy controller
will include a `kind` label on gRPC messages indicating whether the
resource type, or `default` if a default policy is in effect.
This change honors this new `kind` field and adds a dedicated label to
indicate the kind.
Server labels are changed from:
srv_name="default:foo"
srv_name="fah"
to:
srv_kind="default",srv_name="foo"
srv_kind="server",srv_name="fah"
Authorization labels are changed from:
saz_name="default:bar"
saz_name="bah"
to:
authz_kind="default",authz_name="bar"
authz_kind="serverauthorization",authz_name="bah"
Signed-off-by: Oliver Gould <[email protected]>
Signed-off-by: Oliver Gould <[email protected]>
Signed-off-by: Oliver Gould <[email protected]>
Signed-off-by: Oliver Gould <[email protected]>
Signed-off-by: Oliver Gould <[email protected]>
olix0r
added a commit
to linkerd/linkerd2
that referenced
this pull request
Mar 24, 2022
This release alters the policy-related labels that the proxy sets on inbound traffic: * The `srv_kind` label is set with a value of "default" or "server", depending on whether the `srv_name` label correponds to a default policy or a `Server` resource. `srv_name` no longer includes a "default:" prefix for default policies. * The `saz_name` label is removed, replaced by `authz_kind` and `authz_name` labels. Similarly, the `authz_kind` label is either `default` or `serverauthorization`, and the `authz_name` label never includes a "default:" prefix. --- * build(deps): bump tj-actions/changed-files from 17.3 to 18 (linkerd/linkerd2-proxy#1539) * build(deps): bump async-stream from 0.3.2 to 0.3.3 (linkerd/linkerd2-proxy#1540) * build(deps): bump syn from 1.0.86 to 1.0.87 (linkerd/linkerd2-proxy#1541) * build(deps): bump mio from 0.8.0 to 0.8.1 (linkerd/linkerd2-proxy#1542) * build(deps): bump syn from 1.0.87 to 1.0.88 (linkerd/linkerd2-proxy#1545) * build(deps): bump libc from 0.2.119 to 0.2.120 (linkerd/linkerd2-proxy#1544) * build(deps): bump tj-actions/changed-files from 18 to 18.1 (linkerd/linkerd2-proxy#1543) * build(deps): bump tj-actions/changed-files from 18.1 to 18.2 (linkerd/linkerd2-proxy#1546) * build(deps): bump mio from 0.8.1 to 0.8.2 (linkerd/linkerd2-proxy#1550) * build(deps): bump quote from 1.0.15 to 1.0.16 (linkerd/linkerd2-proxy#1549) * build(deps): bump syn from 1.0.88 to 1.0.89 (linkerd/linkerd2-proxy#1548) * build(deps): bump tj-actions/changed-files from 18.2 to 18.3 (linkerd/linkerd2-proxy#1547) * build(deps): bump which from 4.2.4 to 4.2.5 (linkerd/linkerd2-proxy#1554) * build(deps): bump tokio-rustls from 0.23.2 to 0.23.3 (linkerd/linkerd2-proxy#1553) * build(deps): bump tj-actions/changed-files from 18.3 to 18.4 (linkerd/linkerd2-proxy#1551) * build(deps): bump log from 0.4.14 to 0.4.15 (linkerd/linkerd2-proxy#1555) * build(deps): bump foreign-types-shared from 0.3.0 to 0.3.1 (linkerd/linkerd2-proxy#1557) * build(deps): bump foreign-types-macros from 0.2.1 to 0.2.2 (linkerd/linkerd2-proxy#1556) * build(deps): bump hyper from 0.14.17 to 0.14.18 (linkerd/linkerd2-proxy#1559) * build(deps): bump log from 0.4.15 to 0.4.16 (linkerd/linkerd2-proxy#1558) * inbound: Support multiple authorization types (linkerd/linkerd2-proxy#1560) Signed-off-by: Oliver Gould <[email protected]>
olix0r
added a commit
to linkerd/linkerd2
that referenced
this pull request
Mar 29, 2022
This release alters the policy-related labels that the proxy sets on inbound traffic: * The `srv_kind` label is set with a value of "default" or "server", depending on whether the `srv_name` label correponds to a default policy or a `Server` resource. `srv_name` no longer includes a "default:" prefix for default policies. * The `saz_name` label is removed, replaced by `authz_kind` and `authz_name` labels. Similarly, the `authz_kind` label is either `default` or `serverauthorization`, and the `authz_name` label never includes a "default:" prefix. --- * build(deps): bump tj-actions/changed-files from 17.3 to 18 (linkerd/linkerd2-proxy#1539) * build(deps): bump async-stream from 0.3.2 to 0.3.3 (linkerd/linkerd2-proxy#1540) * build(deps): bump syn from 1.0.86 to 1.0.87 (linkerd/linkerd2-proxy#1541) * build(deps): bump mio from 0.8.0 to 0.8.1 (linkerd/linkerd2-proxy#1542) * build(deps): bump syn from 1.0.87 to 1.0.88 (linkerd/linkerd2-proxy#1545) * build(deps): bump libc from 0.2.119 to 0.2.120 (linkerd/linkerd2-proxy#1544) * build(deps): bump tj-actions/changed-files from 18 to 18.1 (linkerd/linkerd2-proxy#1543) * build(deps): bump tj-actions/changed-files from 18.1 to 18.2 (linkerd/linkerd2-proxy#1546) * build(deps): bump mio from 0.8.1 to 0.8.2 (linkerd/linkerd2-proxy#1550) * build(deps): bump quote from 1.0.15 to 1.0.16 (linkerd/linkerd2-proxy#1549) * build(deps): bump syn from 1.0.88 to 1.0.89 (linkerd/linkerd2-proxy#1548) * build(deps): bump tj-actions/changed-files from 18.2 to 18.3 (linkerd/linkerd2-proxy#1547) * build(deps): bump which from 4.2.4 to 4.2.5 (linkerd/linkerd2-proxy#1554) * build(deps): bump tokio-rustls from 0.23.2 to 0.23.3 (linkerd/linkerd2-proxy#1553) * build(deps): bump tj-actions/changed-files from 18.3 to 18.4 (linkerd/linkerd2-proxy#1551) * build(deps): bump log from 0.4.14 to 0.4.15 (linkerd/linkerd2-proxy#1555) * build(deps): bump foreign-types-shared from 0.3.0 to 0.3.1 (linkerd/linkerd2-proxy#1557) * build(deps): bump foreign-types-macros from 0.2.1 to 0.2.2 (linkerd/linkerd2-proxy#1556) * build(deps): bump hyper from 0.14.17 to 0.14.18 (linkerd/linkerd2-proxy#1559) * build(deps): bump log from 0.4.15 to 0.4.16 (linkerd/linkerd2-proxy#1558) * inbound: Support multiple authorization types (linkerd/linkerd2-proxy#1560) Signed-off-by: Oliver Gould <[email protected]> Signed-off-by: Kevin Leimkuhler <[email protected]> Co-authored-by: Kevin Leimkuhler <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The inbound policy module uses the label
saz_nameto indicate theauthorization resource being employed to allow/deny traffic. This
corresponds to the
ServerAuthorizationkubernetes resource (with thesazshortname). This resource type is going to be deprecated in favorof a new, more general,
AuthorizationPolicyresource.When this change is made in the control plane, the policy controller
will include a
kindlabel on gRPC messages indicating whether theresource type, or
defaultif a default policy is in effect.This change honors this new
kindfield and adds a dedicated label toindicate the kind.
Server labels are changed from:
to:
Authorization labels are changed from:
to:
Signed-off-by: Oliver Gould [email protected]