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

Figure out a way to allow registration during the conference #55

Closed
1 task done
hao-fang opened this issue Jun 11, 2020 · 11 comments
Closed
1 task done

Figure out a way to allow registration during the conference #55

hao-fang opened this issue Jun 11, 2020 · 11 comments
Assignees
Labels
AWS priority:urgent addresses a critical problem and needs immediate attention

Comments

@hao-fang
Copy link

hao-fang commented Jun 11, 2020

Number of Volunteers: 1

Currently we can only manually add users to our AWS Cognito pool. We need to figure out an automatic process to create new accounts for last-minute registration.

  • Talk with Priscilla to see how the registration process works.

Solution: Zapier (gmail + AWS Lambda)

It seems that Zapier has a good email parsing template. Let's try this first.

Basically, each new registration will trigger an email to both the user and cc a gmail account we monitor.
Then we use Zapier to extract the user's email address and name from the email.
Then we trigger a predefined AWS Lambda function that use boto3 to create an user in our Cognito user pool.

  1. Use Zapier's email formatter to extract email & name fields from the registration email.
  2. Trigger python codes on AWS Lambda function. See the event data explanation here
import json
import boto3

def lambda_handler(event, context):
    # TODO implement
    email = event["email"]
    name = event["name"]
    
    client = boto3.client(
        "cognito-idp",
        aws_access_key_id="foo",
        aws_secret_access_key="bar",
        region_name="us-east-1",
    )
    print(client)
    
    return {
        'statusCode': 200,
        'body': json.dumps('Hello from Lambda!')
    }
@hao-fang hao-fang self-assigned this Jun 11, 2020
@hao-fang hao-fang added this to To do in Ideation Jun 12, 2020
@hao-fang hao-fang added priority:normal priority:urgent addresses a critical problem and needs immediate attention enhancement on hold Further information is requested volunteer needed Need volunteer and removed priority:low priority:normal labels Jun 12, 2020
@stupid-2020
Copy link

If we can get registration information from argona-net.com, maybe we can create users automatically by modifying create_new_user.sh or have another script to call create_new_user.

Another question is the late registration (June 27, 2020 through the entire conference), how to handle such accounts?

@hao-fang
Copy link
Author

@stupid-2020 Yes. These are valid questions. I need to talk with our admin to figure out the details. I'll post updates once I get back from her.

@hao-fang
Copy link
Author

CVPR2020 mentioned "Late registration may result in a delay in being able to access CVPR Virtual."

http://cvpr2020.thecvf.com/attend/registration
image

@hao-fang hao-fang added volunteer needed Need volunteer and removed on hold Further information is requested labels Jun 19, 2020
@hao-fang
Copy link
Author

hao-fang commented Jun 19, 2020

Old proposals (see the new solution in the issue description)

Solution 1: manually create users

In the worst case, we just assign some on-call volunteers to respond to these adhoc registrations. The volunteer will create the user using the bash script.

Solution 2: user sign-up + manual verification

See Allowing Users to Sign Up in Your App but Confirming Them as Administrator.

We can turn on "Sign Up" so that people can sign up by themselves. But a volunteer will approve the registration before they can access the website.
The approval can be done via AWS CLI.

There are a few issues.

  1. After Sign Up, it shows an error page which is not very informative. We need to figure out a way to present a page that says something like "you account will be verified".
    image
  2. It does not asks for "name" attribute, which is needed for RocketChat. Although we may be able to get this information from the registration form, and the volunteer can use AWS CLI to update the custom:name attribute.

Solution 3: user sign-up + auto verification

In this case, we may need to add an AWS Lambda handler to auto-approve registration by checking whether the email is registered on https://aclweb.org/conference/acl-2020-conference-registration/.
This will need to access the database which I don't know how we can implement this. We can check if argona-net.com can push the registration information to our user pool.
For example, we can create an IAM user which only "create-user" permission, and ask argona-net to automate a process that creates user after they registered. This way we don't need to access their database.

Solution 4: AWS SES + Lambda

Assume we will have an email account which is copied when the registration email is sent to the author.
We should set up the AWS SES with an Lambda function that parse the email and create a user in the AWS Cognito pool.
Resources:

Useful Links

@hao-fang hao-fang changed the title Figure out a way to allow last-minute registration Figure out a way to allow registration during the conference Jun 19, 2020
@hao-fang hao-fang added the AWS label Jun 19, 2020
@hao-fang hao-fang added this to Todo in AWS Cognito User Pool via automation Jun 22, 2020
@Robert-Aduviri Robert-Aduviri mentioned this issue Jun 23, 2020
2 tasks
@hao-fang hao-fang moved this from To do to In progress in Ideation Jun 23, 2020
@hao-fang hao-fang removed this from In progress in Ideation Jun 23, 2020
@vladdy
Copy link

vladdy commented Jun 23, 2020

@hao-fang Do you need a help with this?

@hao-fang
Copy link
Author

@vladdy Sure! Does the solution I described in the root post make sense to you? I think I need some help on the Zapier side. If you can help me on this, I'll put you in touch with the person who will set up the email forwarding.

@vladdy
Copy link

vladdy commented Jun 24, 2020

@hao-fang, the solution in the beginning of the issue may work, but it does not that straightforward and does not verify the existence of emails (although I'm not sure if it is required). I can help with it, but overall I would recommend building something using Lambda and SES (which was also mentioned in later post as option 4). It should not be more complicated if there is a domain which can be used in the sender's address.

@hao-fang
Copy link
Author

@vladdy -- yeah, the reason I go with Zapier is that they have some built-in email formatter to extract Name from the email body using a regex. If we use Lambda, then we need to run this on our own, and set up SES accordingly.
There has been some struggling with granting the right permissions to the AWS IAM account I'm currently using (since I don't have the access to the root account).
If you are familiar with Lambda & SES & the IAM role policy assignments, I can share my IAM account with you and put you in touch with our IT director & our registration person. Will that be okay?

@vladdy
Copy link

vladdy commented Jun 24, 2020

Sure, let's try that! If it fails, it won't take long to switch to Zapier way.

@hao-fang
Copy link
Author

@vladdy -- I've sent you the AWS account info on RocketChat.

@hao-fang
Copy link
Author

@vladdy -- maybe you can re-use some of the methods from @stupid-2020 who is working on some python scripts for creating users from a csv/excel file.
Feel free to discuss if any collaboration is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AWS priority:urgent addresses a critical problem and needs immediate attention
Projects
No open projects
Development

No branches or pull requests

3 participants