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

Todo: Outline steps to enable Cognito login and role mapping #3

Open
kalleeh opened this issue Jul 4, 2019 · 3 comments
Open

Todo: Outline steps to enable Cognito login and role mapping #3

kalleeh opened this issue Jul 4, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@kalleeh
Copy link
Owner

kalleeh commented Jul 4, 2019

We need to clarify the steps around creating the initial users and groups and IAM role mappings through cognito federated identities for first setup users.
We don't want to build a user management system in the API since this should use the default Cognito API's but we should provide configuration steps.

Something like;

  1. Create Cognito user.
  2. Create Cognito group for each Platform Tenant.
  3. Create IAM Role with correct CloudWatch Logs Read-permissions (right log groups). Add the right trust permissions on the IAM role.
{
      "Effect": "Allow",
      "Principal": {
        "Federated": "cognito-identity.amazonaws.com"
      },
      "Action": "sts:AssumeRoleWithWebIdentity",
      "Condition": {
        "StringEquals": {
          "cognito-identity.amazonaws.com:aud": "eu-west-1:b3df4e00-5aea-4e69-8b60-85ec38731d17"
        },
        "ForAnyValue:StringLike": {
          "cognito-identity.amazonaws.com:amr": "authenticated"
        }
      }
    }
  1. Map Cognito group login to the IAM role created in step 3.
  2. Go into Cognito Federated Identities and go to Authentication providers, Cognito. Under "authenticated role selection" select "choose role from token" and "use Authenticated role".
@shendriksen
Copy link
Collaborator

+1

@shendriksen shendriksen added the enhancement New feature or request label Jul 4, 2019
@kalleeh kalleeh assigned kalleeh and shendriksen and unassigned kalleeh Aug 9, 2019
@shendriksen
Copy link
Collaborator

It looks like the majority of this work has already been done. We have a script within 'helpers' that creates a user quickly. We also have the steps listed in the documentation. The 'groups' have not been automated yet but we can create a separate task for that if we want to work on this sooner (I don't think it's as important for now).

@kalleeh
Copy link
Owner Author

kalleeh commented Apr 1, 2020

Tightly linked with #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants