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

Fix issue716: AWS Cognito User Pool - Verification Message Template configuration conflicts #790

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

svscheg
Copy link
Contributor

@svscheg svscheg commented Jul 18, 2023

…onfiguration conflicts

Description of your changes

Fix late init issue for AWS Cognito User Pool:
message: |-
observe failed: cannot run refresh: refresh failed: Conflicting configuration arguments: "email_verification_subject": conflicts with verification_message_template.0.email_subject
Conflicting configuration arguments: "verification_message_template.0.sms_message": conflicts with sms_verification_message
Conflicting configuration arguments: "verification_message_template.0.email_message": conflicts with email_verification_message
Conflicting configuration arguments: "verification_message_template.0.email_subject": conflicts with email_verification_subject
Conflicting configuration arguments: "sms_verification_message": conflicts with verification_message_template.0.sms_message
Conflicting configuration arguments: "email_verification_message": conflicts with verification_message_template.0.email_message

Next arguments will be ignored:
"verification_message_template",
"sms_verification_message",
"email_verification_message",
"email_verification_subject",

Fixes #716

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Manually tested example while error reproduced:

apiVersion: cognitoidp.aws.upbound.io/v1beta1
kind: UserPool
metadata:
  annotations:
    meta.upbound.io/example-id: cognitoidp/v1beta1/userpool
    upjet.upbound.io/manual-intervention: "This resource requires an existing lambda.Function for lambdaConfig paremeters"
  labels:
    testing.upbound.io/example-name: lambda-example
  name: lambda-example
spec:
  forProvider:
    name: "test"
    accountRecoverySetting:
      - recoveryMechanism:
          - name: verified_email
            priority: 1
    adminCreateUserConfig:
      - allowAdminCreateUserOnly: true
        inviteMessageTemplate:
          - emailMessage: "Something has gone wrong, please request a new invite and contact support@toff.tech if this persists. Please provide support the following information to assist you: \n UserType: \n UserId: {username}\nCode: {####}"
            emailSubject: "Invitation"
            smsMessage: "Password Invitation\n{####} {username}"
    aliasAttributes:
      - email
      - phone_number
    autoVerifiedAttributes:
      - email
    emailConfiguration:
      - replyToEmailAddress: test-mail@toff.tecg
    mfaConfiguration: OPTIONAL
    softwareTokenMfaConfiguration:
      - enabled: true
    passwordPolicy:
      - minimumLength: 10
        requireLowercase: false
        requireNumbers: true
        requireUppercase: false
        requireSymbols: true
        temporaryPasswordValidityDays: 7
    region: us-west-2
    verificationMessageTemplate:
      - emailMessage: "Something has gone wrong, please request a new invite and contact support@toff.tech if this persists. Please provide support the following information to assist you: \n UserType: {UserType} \n UserId: {username}\nCode: {####}"
        emailSubject: "Password Reset"
        smsMessage: "Password Reset\n{####}"
Screenshot 2023-07-21 at 15 43 48

log_userpool.txt

@turkenf
Copy link
Collaborator

turkenf commented Jul 18, 2023

/test-examples="examples/s3/bucket.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Jul 19, 2023

As described in this issue, we would like to make these configurations automatically.

Copy link
Collaborator

@turkenf turkenf left a comment

Choose a reason for hiding this comment

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

Thank you @svscheg, LGTM.

@svscheg svscheg merged commit 5edbe14 into crossplane-contrib:main Jul 21, 2023
10 checks passed
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.

AWS Cognito User Pool - Verification Message Template configuration conflicts.
2 participants