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

SSO: Convert numeric durations to strings in SSO settings #1838

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

dmihai
Copy link
Contributor

@dmihai dmihai commented Oct 9, 2024

When importing SAML settings into Terraform, it is possible that some duration fields coming from the API to have a numeric type. This will generate an error because their type in Terraform is string:

[ERROR] setting state: saml_settings.0.max_issue_delay: '' expected type 'string', got unconvertible type 'float64', value: '3e+11'

This fix will convert all numeric durations from the settings map to strings.

@dmihai dmihai requested a review from a team as a code owner October 9, 2024 09:15
Copy link

github-actions bot commented Oct 9, 2024

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

Copy link
Contributor

@mgyongyosi mgyongyosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it works like a charm! Tested locally and the max_issue_delay and metadata_valid_duration are handled correctly. 🎉

@dmihai dmihai merged commit 2aefe28 into main Oct 11, 2024
25 of 26 checks passed
@dmihai dmihai deleted the dmihai/sso-saml-numeric-durations branch October 11, 2024 07:20
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

Successfully merging this pull request may close these issues.

2 participants