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

Key secret get/show post expiry #19

Open
ajitchandra opened this issue Feb 13, 2024 · 2 comments
Open

Key secret get/show post expiry #19

ajitchandra opened this issue Feb 13, 2024 · 2 comments

Comments

@ajitchandra
Copy link

ajitchandra commented Feb 13, 2024

Hi Team,

Got a use case for Key vault secret with expiry date set and are able to retrieve the value after the expiry date has lapsed.

Expected cli/Rest Key vault secret show/get output:

(Forbidden) Operation get is not allowed on a expired secret.
Code: Forbidden
Message: Operation get is not allowed on a expired secret.
Inner error: {
"code": "SecretExpired"
}

Actual result:

Request URL: 'https://XXXX.vault.azure.net/secrets//?api-version=REDACTED'
Request method: 'GET'
Request headers:
'Accept': 'application/json'
'x-ms-client-request-id': '57358e22-c96d-11ee-800d-00155de4a17c'
'User-Agent': 'azsdk-python-keyvault-secrets/4.7.0 Python/3.10.10 (Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35)'
'Authorization': 'REDACTED'
No body was attached to the request
Response status: 200

As per the doc: https://learn.microsoft.com/en-us/azure/key-vault/secrets/about-secrets#secret-attributes, we should not be able to retrieve the object value.

Seems the Expiry date attributes has no effect on the secret get operations. Can you please confirm if the understanding is correct and if so, what will be solution for this.

@hongooi73
Copy link
Collaborator

If you look at the secret in the Azure dashboard, does it show that the expiry date is set?

@ajitchandra
Copy link
Author

ajitchandra commented Feb 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants