Skip to content

Commit d038a4e

Browse files
authored
Merge pull request #102 from britive/develop
v1.5.0rc3
2 parents c66df6c + 1d5128a commit d038a4e

File tree

5 files changed

+46
-10
lines changed

5 files changed

+46
-10
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
* As of v1.4.0 release candidates will be published in an effort to get new features out faster while still allowing time for full QA testing before moving the release candidate to a full release.
44

5+
## v1.5.0rc3 [2023-10-13]
6+
#### What's New
7+
* None
8+
9+
#### Enhancements
10+
* None
11+
12+
#### Bug Fixes
13+
* None
14+
15+
#### Dependencies
16+
* `britive>=2.22.0`
17+
18+
#### Other
19+
* Updates to the documentation calling out the requirement to properly escape input based on the shell you are using
20+
* Resolve dependabot issue https://github.com/britive/python-cli/security/dependabot/6
21+
522
## v1.5.0rc2 [2023-09-18]
623
#### What's New
724
* None

docs/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ Example:
236236
* Profile: Admin
237237

238238
As we construct the checkout command it would generally be `AWS/Dev/Test/Admin` but since the environment has a `/`
239-
in it, we need to escape that to be `AWS/Dev\/Test/Admin` so the CLI can properly parse out the 3 required parts of the string .
239+
in it, we need to escape that to be `AWS/Dev\/Test/Admin` so the CLI can properly parse out the 3 required parts of the string.
240+
241+
This holds true for names of secrets and any other free form text that may be submitted via the CLI. Ensure you are
242+
escaping all required characters based on the shell you are using.
240243

241244
## `api` Command - Use the Britive Python SDK via the CLI
242245

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
boto3
2-
britive>=2.21.0
2+
britive>=2.22.0
33
certifi>=2022.12.7
44
charset-normalizer==2.1.0
55
click~=8.1.3
@@ -19,4 +19,5 @@ six==1.16.0
1919
tabulate==0.8.10
2020
toml==0.10.2
2121
twine~=4.0.1
22-
urllib3==1.26.9
22+
urllib3>=1.26.17; urllib3 == 1
23+
urllib3>=2.0.6; urllib3 == 2

setup.cfg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = pybritive
3-
version = 1.5.0rc2
3+
version = 1.5.0rc3
44
author = Britive Inc.
55
author_email = support@britive.com
66
description = A pure Python CLI for Britive
@@ -17,6 +17,8 @@ package_dir =
1717
= src
1818
packages = find:
1919
python_requires = >=3.7
20+
21+
# urllib3 version logic due to https://github.com/britive/python-cli/security/dependabot/6
2022
install_requires =
2123
click
2224
requests>=2.31.0
@@ -26,7 +28,7 @@ install_requires =
2628
toml
2729
cryptography>=41.0.0
2830
python-dateutil
29-
britive>=2.21.0
31+
britive>=2.22.0
3032
jmespath
3133
pyjwt
3234

src/pybritive/helpers/aws_credential_process.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
def get_args():
22
from getopt import getopt # lazy load
33
from sys import argv # lazy load
4-
options = getopt(argv[1:], 't:T:p:f:P:hv', [
4+
options = getopt(argv[1:], 't:T:p:f:P:F:hv', [
55
'tenant=',
66
'token=',
77
'passphrase=',
88
'force-renew=',
99
'profile=',
10+
'federation-provider='
1011
'help',
1112
'version'
1213
])[0]
@@ -16,7 +17,8 @@ def get_args():
1617
'token': None,
1718
'passphrase': None,
1819
'force_renew': None,
19-
'profile': None
20+
'profile': None,
21+
'federation_provider': None
2022
}
2123

2224
for opt, arg in options:
@@ -30,6 +32,8 @@ def get_args():
3032
args['force_renew'] = int(arg)
3133
if opt in ('-P', '--profile'):
3234
args['profile'] = arg
35+
if opt in ('-F', '--federation-provider'):
36+
args['federation_provider'] = arg
3337
if opt in ('-h', '--help'):
3438
usage()
3539
if opt in ('-v', '--version'):
@@ -46,7 +50,10 @@ def get_args():
4650

4751
def usage():
4852
from sys import argv # lazy load
49-
print(f'Usage : {argv[0]} --profile <profile> [-t/--tenant, -T/--token, -t/--passphrase, -f/--force-renew]')
53+
print(
54+
f'Usage : {argv[0]} --profile <profile> [-t/--tenant, -T/--token, -p/--passphrase, -f/--force-renew, '
55+
f'-F/--federation-provider]'
56+
)
5057
raise SystemExit()
5158

5259

@@ -66,7 +73,7 @@ def main():
6673
now = datetime.utcnow()
6774
if now > expiration: # creds have expired so set to none so new one get checked out
6875
creds = None
69-
else:
76+
else: # not importing json library on purpose to keep imports down for speed
7077
json = '{'
7178
json += f'"AccessKeyId": "{creds["accessKeyID"]}",'
7279
json += f'"SecretAccessKey": "{creds["secretAccessKey"]}",'
@@ -78,7 +85,13 @@ def main():
7885
if not creds:
7986
from ..britive_cli import BritiveCli # lazy load for performance purposes
8087

81-
b = BritiveCli(tenant_name=args['tenant'], token=args['token'], passphrase=args['passphrase'], silent=True)
88+
b = BritiveCli(
89+
tenant_name=args['tenant'],
90+
token=args['token'],
91+
passphrase=args['passphrase'],
92+
federation_provider=args['federation_provider'],
93+
silent=True
94+
)
8295
b.config.get_tenant() # have to load the config here as that work is generally done
8396
b.checkout(
8497
alias=None,

0 commit comments

Comments
 (0)