Skip to content

Commit dd14cc3

Browse files
author
Alan Zhang
committed
Set SA token default TTL to 1 day
1 parent 4019972 commit dd14cc3

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/amg/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,7 @@ Release History
118118
2.5.2
119119
++++++
120120
* `az grafana create`: fix issue with principal type implicit selection during role assignment step
121+
122+
2.5.3
123+
++++++
124+
* `az grafana service-account token create`: set token default expiration time to 1 day as stated in the documentation

src/amg/azext_amg/custom.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,8 @@ def create_service_account_token(cmd, grafana_name, service_account, token, time
720720

721721
if time_to_live:
722722
data['secondsToLive'] = _convert_duration_to_seconds(time_to_live)
723+
else:
724+
data['secondsToLive'] = _convert_duration_to_seconds("1d")
723725

724726
response = _send_request(cmd, resource_group_name, grafana_name, "post",
725727
"/api/serviceaccounts/" + service_account_id + '/tokens', data)

src/amg/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# TODO: Confirm this is the right version number you want and it matches your
1818
# HISTORY.rst entry.
19-
VERSION = '2.5.2'
19+
VERSION = '2.5.3'
2020

2121
# The full list of classifiers is available at
2222
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)