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

Added Defaults to Cognito OAuth Token Lifespan #34362

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jtyrus
Copy link
Contributor

@jtyrus jtyrus commented Nov 11, 2023

Description

Once set, token validity values would persist even if removed.

Relations

Closes #34285

Output from Acceptance Testing

make testacc TESTS=TestAccCognitoIDPUserPoolClient PKG=cognitoidp

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cognitoidp/... -v -count 1 -parallel 20 -run='TestAccCognitoIDPUserPoolClient'  -timeout 360m
=== RUN   TestAccCognitoIDPUserPoolClientDataSource_basic
=== PAUSE TestAccCognitoIDPUserPoolClientDataSource_basic
=== RUN   TestAccCognitoIDPUserPoolClient_basic
=== PAUSE TestAccCognitoIDPUserPoolClient_basic
=== RUN   TestAccCognitoIDPUserPoolClient_enableRevocation
=== PAUSE TestAccCognitoIDPUserPoolClient_enableRevocation
=== RUN   TestAccCognitoIDPUserPoolClient_accessTokenValidity
=== PAUSE TestAccCognitoIDPUserPoolClient_accessTokenValidity
=== RUN   TestAccCognitoIDPUserPoolClient_accessTokenValidity_error
=== PAUSE TestAccCognitoIDPUserPoolClient_accessTokenValidity_error
=== RUN   TestAccCognitoIDPUserPoolClient_idTokenValidity
=== PAUSE TestAccCognitoIDPUserPoolClient_idTokenValidity
=== RUN   TestAccCognitoIDPUserPoolClient_idTokenValidity_error
=== PAUSE TestAccCognitoIDPUserPoolClient_idTokenValidity_error
=== RUN   TestAccCognitoIDPUserPoolClient_refreshTokenValidity
=== PAUSE TestAccCognitoIDPUserPoolClient_refreshTokenValidity
=== RUN   TestAccCognitoIDPUserPoolClient_refreshTokenValidity_error
=== PAUSE TestAccCognitoIDPUserPoolClient_refreshTokenValidity_error
=== RUN   TestAccCognitoIDPUserPoolClient_tokenValidityUnits
=== PAUSE TestAccCognitoIDPUserPoolClient_tokenValidityUnits
=== RUN   TestAccCognitoIDPUserPoolClient_tokenValidityUnits_explicitDefaults
=== PAUSE TestAccCognitoIDPUserPoolClient_tokenValidityUnits_explicitDefaults
=== RUN   TestAccCognitoIDPUserPoolClient_tokenValidityUnits_AccessToken
=== PAUSE TestAccCognitoIDPUserPoolClient_tokenValidityUnits_AccessToken
=== RUN   TestAccCognitoIDPUserPoolClient_tokenValidityUnitsWTokenValidity
=== PAUSE TestAccCognitoIDPUserPoolClient_tokenValidityUnitsWTokenValidity
=== RUN   TestAccCognitoIDPUserPoolClient_name
=== PAUSE TestAccCognitoIDPUserPoolClient_name
=== RUN   TestAccCognitoIDPUserPoolClient_allFields
=== PAUSE TestAccCognitoIDPUserPoolClient_allFields
=== RUN   TestAccCognitoIDPUserPoolClient_allFieldsUpdatingOneField
=== PAUSE TestAccCognitoIDPUserPoolClient_allFieldsUpdatingOneField
=== RUN   TestAccCognitoIDPUserPoolClient_analyticsApplicationID
=== PAUSE TestAccCognitoIDPUserPoolClient_analyticsApplicationID
=== RUN   TestAccCognitoIDPUserPoolClient_analyticsWithARN
=== PAUSE TestAccCognitoIDPUserPoolClient_analyticsWithARN
=== RUN   TestAccCognitoIDPUserPoolClient_authSessionValidity
=== PAUSE TestAccCognitoIDPUserPoolClient_authSessionValidity
=== RUN   TestAccCognitoIDPUserPoolClient_disappears
=== PAUSE TestAccCognitoIDPUserPoolClient_disappears
=== RUN   TestAccCognitoIDPUserPoolClient_Disappears_userPool
=== PAUSE TestAccCognitoIDPUserPoolClient_Disappears_userPool
=== RUN   TestAccCognitoIDPUserPoolClient_emptySets
=== PAUSE TestAccCognitoIDPUserPoolClient_emptySets
=== RUN   TestAccCognitoIDPUserPoolClient_nulls
=== PAUSE TestAccCognitoIDPUserPoolClient_nulls
=== RUN   TestAccCognitoIDPUserPoolClient_frameworkMigration_nulls
=== PAUSE TestAccCognitoIDPUserPoolClient_frameworkMigration_nulls
=== RUN   TestAccCognitoIDPUserPoolClient_frameworkMigration_basic
=== PAUSE TestAccCognitoIDPUserPoolClient_frameworkMigration_basic
=== RUN   TestAccCognitoIDPUserPoolClient_frameworkMigration_emptySet
=== PAUSE TestAccCognitoIDPUserPoolClient_frameworkMigration_emptySet
=== RUN   TestAccCognitoIDPUserPoolClientsDataSource_basic
=== PAUSE TestAccCognitoIDPUserPoolClientsDataSource_basic
=== CONT  TestAccCognitoIDPUserPoolClientDataSource_basic
=== CONT  TestAccCognitoIDPUserPoolClient_allFields
=== CONT  TestAccCognitoIDPUserPoolClient_refreshTokenValidity
=== CONT  TestAccCognitoIDPUserPoolClient_accessTokenValidity_error
=== CONT  TestAccCognitoIDPUserPoolClient_tokenValidityUnits_AccessToken
=== CONT  TestAccCognitoIDPUserPoolClient_tokenValidityUnitsWTokenValidity
=== CONT  TestAccCognitoIDPUserPoolClient_basic
=== CONT  TestAccCognitoIDPUserPoolClient_nulls
=== CONT  TestAccCognitoIDPUserPoolClient_tokenValidityUnits
=== CONT  TestAccCognitoIDPUserPoolClient_tokenValidityUnits_explicitDefaults
=== CONT  TestAccCognitoIDPUserPoolClient_name
=== CONT  TestAccCognitoIDPUserPoolClient_enableRevocation
=== CONT  TestAccCognitoIDPUserPoolClient_refreshTokenValidity_error
=== CONT  TestAccCognitoIDPUserPoolClient_accessTokenValidity
=== CONT  TestAccCognitoIDPUserPoolClient_idTokenValidity_error
=== CONT  TestAccCognitoIDPUserPoolClient_emptySets
=== CONT  TestAccCognitoIDPUserPoolClient_idTokenValidity
=== CONT  TestAccCognitoIDPUserPoolClient_frameworkMigration_nulls
=== CONT  TestAccCognitoIDPUserPoolClientsDataSource_basic
=== CONT  TestAccCognitoIDPUserPoolClient_frameworkMigration_emptySet
--- PASS: TestAccCognitoIDPUserPoolClient_refreshTokenValidity_error (11.89s)
=== CONT  TestAccCognitoIDPUserPoolClient_frameworkMigration_basic
--- PASS: TestAccCognitoIDPUserPoolClient_idTokenValidity_error (16.27s)
=== CONT  TestAccCognitoIDPUserPoolClient_authSessionValidity
--- PASS: TestAccCognitoIDPUserPoolClient_accessTokenValidity_error (16.33s)
=== CONT  TestAccCognitoIDPUserPoolClient_Disappears_userPool
--- PASS: TestAccCognitoIDPUserPoolClientDataSource_basic (69.50s)
=== CONT  TestAccCognitoIDPUserPoolClient_disappears
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnits_explicitDefaults (71.11s)
=== CONT  TestAccCognitoIDPUserPoolClient_allFieldsUpdatingOneField
--- PASS: TestAccCognitoIDPUserPoolClientsDataSource_basic (73.75s)
=== CONT  TestAccCognitoIDPUserPoolClient_analyticsWithARN
--- PASS: TestAccCognitoIDPUserPoolClient_Disappears_userPool (60.87s)
=== CONT  TestAccCognitoIDPUserPoolClient_analyticsApplicationID
--- PASS: TestAccCognitoIDPUserPoolClient_allFields (79.08s)
--- PASS: TestAccCognitoIDPUserPoolClient_basic (82.71s)
--- PASS: TestAccCognitoIDPUserPoolClient_nulls (115.09s)
--- PASS: TestAccCognitoIDPUserPoolClient_emptySets (116.47s)
--- PASS: TestAccCognitoIDPUserPoolClient_disappears (67.72s)
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnits_AccessToken (141.06s)
--- PASS: TestAccCognitoIDPUserPoolClient_enableRevocation (141.67s)
--- PASS: TestAccCognitoIDPUserPoolClient_frameworkMigration_emptySet (141.70s)
--- PASS: TestAccCognitoIDPUserPoolClient_accessTokenValidity (141.89s)
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnitsWTokenValidity (142.69s)
--- PASS: TestAccCognitoIDPUserPoolClient_frameworkMigration_nulls (143.10s)
--- PASS: TestAccCognitoIDPUserPoolClient_name (143.13s)
--- PASS: TestAccCognitoIDPUserPoolClient_refreshTokenValidity (144.06s)
--- PASS: TestAccCognitoIDPUserPoolClient_idTokenValidity (144.19s)
--- PASS: TestAccCognitoIDPUserPoolClient_frameworkMigration_basic (135.27s)
--- PASS: TestAccCognitoIDPUserPoolClient_authSessionValidity (132.51s)
--- PASS: TestAccCognitoIDPUserPoolClient_allFieldsUpdatingOneField (91.34s)
--- PASS: TestAccCognitoIDPUserPoolClient_tokenValidityUnits (165.17s)
--- PASS: TestAccCognitoIDPUserPoolClient_analyticsWithARN (94.26s)
--- PASS: TestAccCognitoIDPUserPoolClient_analyticsApplicationID (106.97s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cognitoidp 184.371s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. and removed size/XS Managed by automation to categorize the size of a PR. labels Nov 11, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 11, 2023
@github-actions github-actions bot added the size/XS Managed by automation to categorize the size of a PR. label Nov 11, 2023
@jtyrus jtyrus changed the title Added Defaults to OAuth Tokens Added Defaults to Cognito OAuth Token Lifespan Nov 11, 2023
@jtyrus jtyrus force-pushed the b-aws_cognito_user_pool_client-validity-defaults branch from 9d081c7 to 5d97a35 Compare November 11, 2023 23:46
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Nov 11, 2023
@jtyrus jtyrus marked this pull request as ready for review November 11, 2023 23:57
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: adding ["COGNITO"] as supported_identity_providers triggers deletion of token_validity_units
2 participants