From c480e0b54852266f7bae2769af02b7f890c34e00 Mon Sep 17 00:00:00 2001 From: ccp_zeulix Date: Tue, 5 Nov 2024 12:32:23 +0000 Subject: [PATCH] Version 2.0.1 - Typo Fix :-/ ### Fixed - Typo in `vault` optional-dependencies (`havc` -> `hvac`) --- .gitignore | 3 ++- CHANGELOG.md | 7 +++++++ fidelius/__init__.py | 2 +- fidelius/gateway/paramstore/_paramstorerepo.py | 18 +++++++++++------- pyproject.toml | 2 +- requirements.txt | 2 +- 6 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 2522d83..dab137f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ venv*/ .venv*/ # IDEA Stuff -.idea/ \ No newline at end of file +.idea/ +/_sandbox*.py diff --git a/CHANGELOG.md b/CHANGELOG.md index f78d481..8a39eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.1] - 2024-11-05 + +### Fixed + +- Typo in `vault` optional-dependencies (`havc` -> `hvac`) + + ## [2.0.0] - 2024-11-04 ### Changed diff --git a/fidelius/__init__.py b/fidelius/__init__.py index 9818939..c6a6837 100644 --- a/fidelius/__init__.py +++ b/fidelius/__init__.py @@ -1,4 +1,4 @@ -__version__ = '2.0.0' +__version__ = '2.0.1' __author__ = 'Thordur Matthiasson ' __license__ = 'MIT License' diff --git a/fidelius/gateway/paramstore/_paramstorerepo.py b/fidelius/gateway/paramstore/_paramstorerepo.py index 5012f72..2362f1b 100644 --- a/fidelius/gateway/paramstore/_paramstorerepo.py +++ b/fidelius/gateway/paramstore/_paramstorerepo.py @@ -64,16 +64,20 @@ def __init__(self, app_props: FideliusAppProps, if not self._aws_key_arn: raise EnvironmentError('Fidelius AwsParamStoreRepo requires the ARN for the KMS key argument when initialising or in the FIDELIUS_AWS_KEY_ARN environment variable') - self._region_name = aws_region_name or os.environ.get('FIDELIUS_AWS_REGION_NAME', None) or os.environ.get('AWS_DEFAULT_REGION', 'eu-west-1') + self._region_name = aws_region_name or os.environ.get('FIDELIUS_AWS_REGION_NAME', None) - self._aws_endpoint_url = aws_endpoint_url or os.environ.get('FIDELIUS_AWS_ENDPOINT_URL', '') + self._aws_endpoint_url = aws_endpoint_url or os.environ.get('FIDELIUS_AWS_ENDPOINT_URL', None) + self._aws_profile_name = aws_profile_name or os.environ.get('FIDELIUS_AWS_PROFILE', None) self._force_log_secrecy() - self._ssm = boto3.client('ssm', - region_name=self._region_name, - endpoint_url=self._aws_endpoint_url or None, - aws_access_key_id=aws_access_key_id or os.environ.get('FIDELIUS_AWS_ACCESS_KEY_ID', None) or os.environ.get('AWS_ACCESS_KEY_ID', None), - aws_secret_access_key=aws_secret_access_key or os.environ.get('FIDELIUS_AWS_SECRET_ACCESS_KEY', None) or os.environ.get('AWS_SECRET_ACCESS_KEY', None)) + self._session = boto3.Session(profile_name=self._aws_profile_name, + region_name=self._region_name, + aws_access_key_id=aws_access_key_id or os.environ.get( + 'FIDELIUS_AWS_ACCESS_KEY_ID', None), + aws_secret_access_key=aws_secret_access_key or os.environ.get( + 'FIDELIUS_AWS_SECRET_ACCESS_KEY', None)) + self._ssm = self._session.client('ssm', + endpoint_url=self._aws_endpoint_url or None) self._cache: Dict[str, str] = {} self._loaded_paths: Set[str] = set() diff --git a/pyproject.toml b/pyproject.toml index dc3ccdb..f38f49b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ ] [project.optional-dependencies] -vault = ["havc >= 2.2, <3"] +vault = ["hvac >= 2.2, <3"] aws = ["boto3 >=1.20, <2"] diff --git a/requirements.txt b/requirements.txt index 448106b..294aec5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ ccptools >=1.1, <2 boto3 >=1.20, <2 -hvac >= 2.2, <3 \ No newline at end of file +hvac >=2.2, <3 \ No newline at end of file