Skip to content

Commit

Permalink
Merge pull request #358 from awslabs/meaisiah-account
Browse files Browse the repository at this point in the history
Merge account management work
  • Loading branch information
amazon-meaisiah authored Mar 6, 2020
2 parents 18808b6 + b6c17f4 commit 56c8e05
Show file tree
Hide file tree
Showing 66 changed files with 38,376 additions and 947 deletions.
40 changes: 40 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# top-level and lambda function specific
/node_modules
/coverage
/lambdas/static-asset-uploader/build/
/lambdas/coverage/
/lambdas/backend/node_modules/
/lambdas/catalog-updater/node_modules/
/lambdas/cfn-cognito-user-pools-client-settings/node_modules/
/lambdas/cfn-cognito-user-pools-domain/node_modules/
/lambdas/cognito-user-pools-confirmation-strategy/node_modules/
/lambdas/dump-v3-account-data/node_modules/
/lambdas/listener/node_modules/
/lambdas/shared/node_modules/
/lambdas/static-asset-uploader/node_modules/

# devportal specific

# we're committing the artifacts, don't need the modules
# note, though, that we do need our patched version of swagger-ui and not the npm version
/dev-portal/node_modules/
/dev-portal/public/apigateway-js-sdk/**

# built artifacts
/dev-portal/build

# coverage reporting
/dev-portal/coverage

# details about setup needed for local dev; these are sensitive, do not commit them!
/dev-portal/deployer.config.js
/dev-portal/public/config.js

# misc
npm-debug.log
.DS_Store
packaged*.yaml
cognito.js
.idea
.vscode
*.iml
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict'

module.exports = {
root: true,
extends: 'standard',
env: {
jest: true
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ aws cloudformation describe-stacks --query \
You can override any of the parameters in the template using the `--parameter-overrides key="value"` format. This will be necessary if you intend to deploy several instances of the developer portal or customize some of the features. You can see a full list of overridable parameters in `cloudformation/template.yaml` under the `Parameters` section.

## Registering Users
Users can self-register by clicking the 'Register' button in the developer portal. Cognito calls the `CognitoUserPoolsConfirmationStrategyFunction` to determine if the user is allowed to register themselves. By default, this function always accepts the user into the user pool, but you can customize the body of the function either in a local repository (followed by packaging and deploying) or in the lambda console. If you intend for the developer portal to be 'private' to some group of users (and not globally / freely accessible), you will need to write a lambda function that enforces your business logic for user registration. Documentation on this lambda function's use can be found [here](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html).
Users can self-register by clicking the 'Register' button in the developer portal. Cognito calls the `CognitoPreSignupTriggerFn` lambda to determine if the user is allowed to register themselves. By default, this function always accepts the user into the user pool, but you can customize the body of the function either in a local repository (followed by packaging and deploying) or in the lambda console. If you intend for the developer portal to be 'private' to some group of users (and not globally / freely accessible), you will need to write a lambda function that enforces your business logic for user registration. Documentation on this lambda function's use can be found [here](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html).

### Promoting a User to an Admin
Admin users can manage what APIs are visible to normal users and whether or not SDK generation is enabled (per api) for normal users. To promote a user to an admin, go to the Cognito console in the account the developer portal is in, select User Pools, then select the correct User Pool for the dev portal. From there, choose Users and groups, click on the users' name, choose Add to group, and select the group named `STACK-NAMEAdminsGroup`. This user is now an admin; if they're currently logged in, they will have to log out and back in to receive admin credentials.
Expand Down
Loading

0 comments on commit 56c8e05

Please sign in to comment.