riboseinc / terraform-aws-iam-authenticating-group

Dynamically manage IAM group membership through an authenticated HTTPS endpoint
1 stars 2 forks source link

Fix Event is none in authorize function #14

Closed phuonghuynh closed 6 years ago

phuonghuynh commented 6 years ago

Attach Event object to the handle function which causes #12

erikbor commented 6 years ago

Will try now

erikbor commented 6 years ago

Hi @phuonghuynh,

I just tried the update but I still have the problem where user1 authenticates but user2 is added to the dynamic security group.

phuonghuynh commented 6 years ago

@erikbor Could you help to check event is None or not in Lambda CloudWatch Log ? as screenshot bellow

screenshot_2

erikbor commented 6 years ago

event is not in any of the CloudWatch logs

phuonghuynh commented 6 years ago

@erikbor Could you check Lambda Function authorize-* has following code as bellow?

screenshot_1

And file args.py should has Log Level set to DEBUG (by module "dyn-iam-access")

screenshot_3

erikbor commented 6 years ago

@phuonghuynh I just completely deleted all the dyn iam resources and ran terraform apply again and now the correct user is put the dynamic security group!

phuonghuynh commented 6 years ago

Nice but its weird ^

phuonghuynh commented 6 years ago

@erikbor its good to make a new release for this function ?

erikbor commented 6 years ago

Let me test it some more with more user accounts, I'll get back to you in a hour.

erikbor commented 6 years ago

@phuonghuynh it's all good and works flawless! thanks for the fixes