From 3e569ed186d55f03f2d488a65837470409304626 Mon Sep 17 00:00:00 2001 From: Gabriel Santos Date: Mon, 23 May 2022 13:06:37 +0100 Subject: [PATCH] Convert not_before_duration to seconds before returning it (#15559) * Convert not_before_duration to seconds before returning it * changelog file --- builtin/logical/ssh/path_roles.go | 2 +- changelog/15559.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog/15559.txt diff --git a/builtin/logical/ssh/path_roles.go b/builtin/logical/ssh/path_roles.go index 79c3947fe..3264b000c 100644 --- a/builtin/logical/ssh/path_roles.go +++ b/builtin/logical/ssh/path_roles.go @@ -757,7 +757,7 @@ func (b *backend) parseRole(role *sshRole) (map[string]interface{}, error) { "default_extensions_template": role.DefaultExtensionsTemplate, "allowed_user_key_lengths": role.AllowedUserKeyTypesLengths, "algorithm_signer": role.AlgorithmSigner, - "not_before_duration": role.NotBeforeDuration, + "not_before_duration": int64(role.NotBeforeDuration.Seconds()), } case KeyTypeDynamic: result = map[string]interface{}{ diff --git a/changelog/15559.txt b/changelog/15559.txt new file mode 100644 index 000000000..5df2f8b7d --- /dev/null +++ b/changelog/15559.txt @@ -0,0 +1,3 @@ +```release-note:bug +secrets/ssh: Convert role field not_before_duration to seconds before returning it +``` \ No newline at end of file