Thanks to visit codestin.com
Credit goes to github.com

Skip to content

KMS: Remove legacy 'local-kms' based provider #9536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion doc/third-party-software-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ requests | Apache License 2.0
subprocess32 | PSF License
**Other tools:** |
Elasticsearch | Apache License 2.0
local-kms | MIT License
kinesis-mock | MIT License
4 changes: 1 addition & 3 deletions localstack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,9 +1060,6 @@ def legacy_fallback(envar_name: str, default: T) -> T:
# For example: "my-first-stream:1,my-other-stream:2,my-last-stream:1"
KINESIS_INITIALIZE_STREAMS = os.environ.get("KINESIS_INITIALIZE_STREAMS", "").strip()

# KMS provider - can be either "local-kms" or "moto"
KMS_PROVIDER = (os.environ.get("KMS_PROVIDER") or "").strip() or "moto"

# URL to a custom OpenSearch/Elasticsearch backend cluster. If this is set to a valid URL, then localstack will not
# create OpenSearch/Elasticsearch cluster instances, but instead forward all domains to the given backend.
# `ES_CUSTOM_BACKEND` is DEPRECATED!
Expand Down Expand Up @@ -1206,6 +1203,7 @@ def use_custom_dns():
"KINESIS_MOCK_PERSIST_INTERVAL",
"KINESIS_MOCK_LOG_LEVEL",
"KINESIS_ON_DEMAND_STREAM_COUNT_LIMIT",
"KMS_PROVIDER", # Not functional; Deprecated in 1.4.0, removed in 3.0.0
"LAMBDA_CODE_EXTRACT_TIME",
"LAMBDA_CONTAINER_REGISTRY",
"LAMBDA_DOCKER_DNS",
Expand Down
4 changes: 2 additions & 2 deletions localstack/deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ def is_affected(self) -> bool:
"1.4.0",
"This feature will not be supported in the future. Please remove this environment variable.",
),
# Since 1.4.0 - Local-KMS will be removed in the future making this variable obsolete
# Deprecated in 1.4.0, removed in 3.0.0
EnvVarDeprecation(
"KMS_PROVIDER",
"1.4.0",
"This feature will not be supported in the future. Please remove this environment variable.",
"This option has no effect. Please remove it from your configuration.",
),
# Since 2.0.0 - HOSTNAME_EXTERNAL will be replaced with LOCALSTACK_HOST
EnvVarDeprecation(
Expand Down
77 changes: 0 additions & 77 deletions localstack/services/kms/local_kms_provider.py

This file was deleted.

82 changes: 0 additions & 82 deletions localstack/services/kms/local_kms_server.py

This file was deleted.

27 changes: 0 additions & 27 deletions localstack/services/kms/packages.py

This file was deleted.

8 changes: 0 additions & 8 deletions localstack/services/kms/plugins.py

This file was deleted.

12 changes: 0 additions & 12 deletions localstack/services/providers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from localstack import config
from localstack.aws.forwarder import HttpFallbackDispatcher
from localstack.services.moto import MotoFallbackDispatcher
from localstack.services.plugins import Service, aws_provider
Expand Down Expand Up @@ -122,17 +121,6 @@ def kinesis():

@aws_provider()
def kms():
if config.KMS_PROVIDER == "local-kms":
from localstack.services.kms.local_kms_provider import LocalKmsProvider

provider = LocalKmsProvider()
return Service.for_provider(
provider,
dispatch_table_factory=lambda _provider: HttpFallbackDispatcher(
_provider, _provider.start_and_get_backend
),
)

from localstack.services.kms.provider import KmsProvider

provider = KmsProvider()
Expand Down