aws-samples/aws-saas-factory-eks-reference-architecture

Cannot add new user in Admin login

ashu2490 opened this issue · 10 comments

Cannot add new user in Admin login

Please help me to resolve this issue

Is any solution for this problem? please help me with the same.

What error are you getting when trying to add a user? Is it hitting the service? Is the service returning an error? Is the error on the client?

What error are you getting when trying to add a user? Is it hitting the service? Is the service returning an error? Is the error on the client?
POST https://api.MY-DOMAIN.com/users net::ERR_TUNNEL_CONNECTION_FAILED

Below are the logs for user-management pod.

=================================================================================================================================
2021-09-23 11:08:13.096 INFO 1 --- [nio-8001-exec-9] c.a.saas.eks.auth.TokenProcessor : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:13.128 INFO 1 --- [nio-8001-exec-9] c.a.saas.eks.auth.TokenProcessor : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:13.139 INFO 1 --- [nio-8001-exec-9] c.amazonaws.saas.eks.auth.TokenManager : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:13.139 INFO 1 --- [nio-8001-exec-9] c.amazonaws.saas.eks.auth.TokenManager : userPoolId: ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:36.595 INFO 1 --- [nio-8001-exec-1] c.a.saas.eks.auth.TokenProcessor : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:36.612 INFO 1 --- [nio-8001-exec-1] c.a.saas.eks.auth.TokenProcessor : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:36.620 INFO 1 --- [nio-8001-exec-1] c.amazonaws.saas.eks.auth.TokenManager : tenantId: null
2021-09-23 11:08:36.620 INFO 1 --- [nio-8001-exec-1] c.amazonaws.saas.eks.auth.TokenManager : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:36.623 INFO 1 --- [nio-8001-exec-1] c.amazonaws.saas.eks.auth.TokenManager : userPoolId: ap-southeast-1_z9cJJnWQv
2021-09-23 11:08:36.711 ERROR 1 --- [nio-8001-exec-1] c.a.saas.eks.UserManagementController : UserManagement create user operation failed:com.amazonaws.services.cognitoidp.model.InvalidParameterException: Attribute value for custom:tenant-id must not be null (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException; Request ID: 2e9de9fe-5675-4c59-a5bc-b5d6fb2f6a54; Proxy: null)

==================================================================================================================================================================

On GUI side it is showing "User-created successfully" Please refer screenshot for the same

image

I think that was fixed with this commit: 4134d7d. That PR went in kind of late. Are you running the latest version of this code?

step: Install Nginx controller
Error: chart requires kubeVersion: >=1.19.0-0 which is incompatible with Kubernetes v1.17.17-eks-087e67
Please help me to resolve this issue

I did a fresh installation with the latest source code, when i create a user on the admin site gui it shows that the user gets created but the user does not get created.
Below are the k8s logs and snapshot of the same
Logs==================================================================
2021-09-26 07:40:39.288 INFO 1 --- [nio-8001-exec-8] c.a.saas.eks.auth.TokenProcessor : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_ZThapNAfE
2021-09-26 07:40:39.317 INFO 1 --- [nio-8001-exec-8] c.a.saas.eks.auth.TokenProcessor : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_ZThapNAfE
2021-09-26 07:40:39.331 INFO 1 --- [nio-8001-exec-8] c.amazonaws.saas.eks.auth.TokenManager : tenantId: null
2021-09-26 07:40:39.332 INFO 1 --- [nio-8001-exec-8] c.amazonaws.saas.eks.auth.TokenManager : issuer: https://cognito-idp.ap-southeast-1.amazonaws.com/ap-southeast-1_ZThapNAfE
2021-09-26 07:40:39.332 INFO 1 --- [nio-8001-exec-8] c.amazonaws.saas.eks.auth.TokenManager : userPoolId: ap-southeast-1_ZThapNAfE
2021-09-26 07:40:39.403 ERROR 1 --- [nio-8001-exec-8] c.a.saas.eks.UserManagementController : UserManagement create user operation failed:com.amazonaws.services.cognitoidp.model.InvalidParameterException: Attribute value for custom:tenant-id must not be null (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException; Request ID: 1ed7ce48-1aa3-4d3c-9012-42e48c6f351d; Proxy: null)

image

Thanks for the trace, that helps! We will check and get back.

This is fixed. Please reopen if you still see issues.