Commit Graph

14 Commits

Author SHA1 Message Date
Keerthan Reddy Mala fcf807e7b4 add resource to the transformation metrics
Kubernetes-commit: 3a8df1efdd83015773be4afd409b0f4cb7eab654
2024-08-01 15:46:50 -07:00
Nilekh Chaudhari 3373784322 feat: improves metric and logging
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>

Kubernetes-commit: 2c8288ac873b89ae6e351df5e805b1a825aae60d
2023-07-07 23:01:05 +00:00
Monis Khan b90de05302 no-op: split transformer interface
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 9354e78289fde933f485c663df960b0bc6e24df5
2023-03-24 16:23:40 -04:00
Dr. Stefan Schimanski 8f40ac3bd1 k8s.io/apiserver: remove skewed completion from EtcdOptions
Kubernetes-commit: e9e4acb1dde69243a6e675e58833ae7936df9ce5
2023-06-02 20:25:31 +02:00
Rita Zhang f471919cab kmsv2: add metrics
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>

Kubernetes-commit: bd0f7f8ee8f7f1c7809e17fa60804bb37f65c495
2023-01-29 22:40:18 -08:00
Monis Khan f4ac8fc8bb prefixTransformers: allocate after transformation length is known
Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 59e1a32fc8ed35e328a3971d3a1d640ffc28ff55
2022-10-17 16:56:40 -04:00
Monis Khan 8d68e6f323 Load encryption config once
This change updates the API server code to load the encryption
config once at start up instead of multiple times.  Previously the
code would set up the storage transformers and the etcd healthz
checks in separate parse steps.  This is problematic for KMS v2 key
ID based staleness checks which need to be able to assert that the
API server has a single view into the KMS plugin's current key ID.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: f507bc255382b2e2095351053bc17e74f7100d35
2022-08-29 17:25:48 -04:00
Steve Kuznetsov af1cb1cefe storage: transformers: pass a context.Context
When an envelope transformer calls out to KMS (for instance), it will be
very helpful to pass a `context.Context` to allow for cancellation. This
patch does that, while passing the previously-expected additional data
via a context value.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: 27312feb9983c18d1daf00afba788727d024cdd0
2022-02-17 07:29:44 -08:00
Monis Khan 298cf1beec Encryption config: correctly handle overlapping providers
This change updates NewPrefixTransformers to not short-circuit on
the first transformer that has a matching prefix.  If the same type
of encryption ProviderConfiguration is used more than once, they
will share the same prefix.  A failure in the first one should not
prevent a later match from being attempted.

Added TestCBCKeyRotationWithOverlappingProviders unit test to
prevent regressions.  Note that this test explicitly exercises this
flow using an EncryptionConfiguration object as the structure of the
resulting transformer is an important part of the check.

Signed-off-by: Monis Khan <mkhan@redhat.com>

Kubernetes-commit: 4dc16f29a7285a4bcaff1915728953d8a55e1b6e
2019-09-06 12:09:43 -04:00
Shihang Zhang 7bf3105100 inject transformer prefix into metric
Change-Id: Iacab685a710d8f8d5b80ed0d35e5ccc22bd929cb

Kubernetes-commit: 099484ee5fb185e92cd154e29c63cf34201e803f
2019-08-01 14:49:37 -07:00
immutablet 5ae492efc5 Add metrics for envelop transformer:
transformation_operation_count
    transformation_failures_count
    envelope_transformation_cache_misses_count
    data_key_generation_latencies_microseconds
    data_key_generation_failures_count

Kubernetes-commit: 695c3e32ad0ff144b36e4deed13a678120f5b6fb
2018-05-29 14:40:39 -07:00
immutablet 959ee35394 Instrument transformer.go with latency metrics.
Kubernetes-commit: e54864f53de75cd56c0fe94777e1d3de0c559c7f
2018-02-27 17:24:27 -08:00
Saksham Sharma 0b1c13686c Add configuration options for encryption providers
Add location transformer, config for transformers

Location transformer helps choose the most specific transformer for
read/write operations depending on the path of resource being accessed.

Configuration allows use of --experimental-encryption-provider-config
to set up encryption providers. Only AEAD is supported at the moment.

Add new files to BUILD, AEAD => k8s-aes-gcm

Use group resources to select encryption provider

Update tests for configuration parsing

Remove location transformer

Allow specifying providers per resource group in configuration

Add IdentityTransformer configuration option

Fix minor issues with initial AEAD implementation

Unified parsing of all configurations

Parse configuration using a union struct

Run configuration parsing in APIserver, refactor parsing

More gdoc, fix minor bugs

Add test coverage for combined transformers

Use table driven tests for encryptionconfig

Kubernetes-commit: 9760d00d08ef0619e30a7b1b90fd290cab960069
2017-06-13 20:47:30 +00:00
Clayton Coleman 0fb460572a Add an AEAD encrypting transformer for storing secrets encrypted at rest
Tweak the ValueTransformer interface slightly to support additional
context information (to allow authenticated data to be generated by the
store and passed to the transformer). Add a prefix transformer that
looks for known matching prefixes and uses them. Add an AES GCM
transformer that performs AEAD on the values coming in and out of the
store.

Kubernetes-commit: f418468c87d3071c5d9ed14ce850996c77251080
2017-05-17 17:27:53 +00:00