Skip to content
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

AMG: Set service-account token default TTL to 1 day #8290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions src/amg/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,7 @@ Release History
2.5.2
++++++
* `az grafana create`: fix issue with principal type implicit selection during role assignment step

2.5.3
++++++
* `az grafana service-account token create`: set token default expiration time to 1 day as stated in the documentation
2 changes: 2 additions & 0 deletions src/amg/azext_amg/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,8 @@ def create_service_account_token(cmd, grafana_name, service_account, token, time

if time_to_live:
data['secondsToLive'] = _convert_duration_to_seconds(time_to_live)
else:
data['secondsToLive'] = _convert_duration_to_seconds("1d")

response = _send_request(cmd, resource_group_name, grafana_name, "post",
"/api/serviceaccounts/" + service_account_id + '/tokens', data)
Expand Down
2 changes: 1 addition & 1 deletion src/amg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

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

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