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

Merge account management work #358

Merged
59 commits merged into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
548dcc9
Implement "Registered Accounts" admin page
Jul 31, 2019
6b89bf4
Move test utils out of real-test scope
Aug 1, 2019
6db1511
AccountsTable: refactor order directions to use circular array
Aug 5, 2019
b2d94f5
RegisteredAccounts: clarified wording in delete/promote modals
Aug 5, 2019
8c26a91
RegisteredAccounts: move message types to top of file
Aug 5, 2019
aaf3b9a
AccountsTable: export default page size
Aug 5, 2019
7a2172c
RegisteredAccounts: clarify filter/order test expected values
Aug 5, 2019
959f213
Admin: clean up an import statement
Aug 5, 2019
ab5a860
RegisteredAccounts: magic numbers begone
Aug 5, 2019
594f375
RegisteredAccounts: typo
Aug 5, 2019
bcca902
AccountsTable: fix redundant/missing hook dependencies
Aug 7, 2019
13a5dd5
Merge branch 'staging' into list-registered-accounts-pr
Aug 7, 2019
2d32081
Merge branch 'staging' into list-registered-accounts-pr
Aug 8, 2019
c654202
AccountsTable: simplify filter/order state hooks
Aug 8, 2019
f68c454
MessageList: simplify usage
Aug 8, 2019
a49fdde
Merge pull request #298 from alex-chew/list-registered-accounts-pr
alex-chew Aug 9, 2019
768fba5
Move React 16.8 act() warning suppression into test-utils
Aug 1, 2019
ff3dae3
Add AdminAccounts page
Aug 1, 2019
5d40fd8
AdminAccounts: extract Accounts-related test utils to own file
Aug 5, 2019
0d2c1b5
AdminAccounts: clean up tests
Aug 5, 2019
cb02023
AccountsTestUtils: add docs
Aug 5, 2019
16ec012
Rename AccountsTestUtils -> accounts-test-utils
Aug 9, 2019
1d9e21b
RegisteredAccounts: use waitForAccountsToLoad from accounts-test-utils
Aug 9, 2019
77a951d
AccountsTable: typo and formatting
Aug 9, 2019
4c30cce
Merge pull request #303 from alex-chew/list-admin-accounts
alex-chew Aug 14, 2019
3e0ef7b
Add PendingRequests UI
Aug 9, 2019
0f75825
PendingRequests: fix wording in Deny modal
Aug 19, 2019
263ffec
PendingRequests: fix missing account loading after denying an account
Aug 19, 2019
a41e8c3
Merge pull request #304 from alex-chew/list-pending-requests-ui
alex-chew Aug 21, 2019
885dec9
Add PendingInvites UI
Aug 20, 2019
334bb0b
PendingInvites: change some Create modal wording
Aug 26, 2019
4e9fd56
PendingInvites: show "Please enter a valid email address" in Create m…
Aug 26, 2019
74b505c
MessageList: refactor to avoid components in state
Aug 27, 2019
7f83aa0
PendingInvites: close/reset Create modal only if creation succeeds
Aug 27, 2019
cbf8463
PendingInvites: don't say creation failed if UI code fails
Aug 27, 2019
ae5f7fa
PendingInvites: remove unnecssary React.memo's
Aug 27, 2019
297976f
Merge pull request #305 from alex-chew/list-pending-invites-ui
alex-chew Aug 27, 2019
7cee9bf
Fix account field names (upcase; change *PoolId to *Id)
Aug 27, 2019
be626e9
Fix missing account field renames in mock service
Aug 27, 2019
31e2eab
Merge pull request #306 from alex-chew/fix-account-field-names
alex-chew Aug 29, 2019
086a3b6
Format files to be changed in account-mgmt-backend branch
Aug 29, 2019
32a58df
Implement account management backend
Aug 30, 2019
02551e7
WIP Fix some tests
Aug 30, 2019
bae22ce
Merge pull request #308 from alex-chew/account-mgmt-backend-pr
echo-bravo-yahoo Sep 26, 2019
c36c83e
Support exporting Swagger/OpenAPI definitions
Feb 25, 2020
7baa010
Modularize lambdas/backend, simplify tests, remove unused code
Feb 25, 2020
24ebfa1
Remove catalog caching skeleton
Feb 25, 2020
9345b2c
Switch YAML vs JSON to radio buttons for clarity
Feb 26, 2020
c10944d
Fix a bunch of bugs, write tests for export generation
Feb 26, 2020
ca971f3
Rebuild assets
Feb 26, 2020
65bfb69
Merge a49fdde1ca9f56622e89a3467e15bb78f8a6c929 into meaisiah-account
Feb 27, 2020
cd582db
Merge a41e8c36ba10d8812ca7add4bc599aca86e9e59c into meaisiah-account
Feb 27, 2020
ec614df
Merge 31e2eab70a290aa282bde38e8ffc137505bc57ee into meaisiah-account
Feb 27, 2020
9c17ae1
Merge account-mgmt into meaisiah-account
Feb 27, 2020
db6e324
Merge ec614df0cd4cfcc9b5ea2d60e6e0bb19522ce814 into meaisiah-account
Mar 4, 2020
f7f4596
Merge 9c17ae1008dadd805a9385a4c1de1eb6c269ff39 into meaisiah-account
Mar 4, 2020
a3cc2d0
Eject from Standard to ESLint
Mar 4, 2020
ef4f43f
Clean up tests and fix a few immediate issues
Feb 28, 2020
b6c17f4
Fix Swagger-related bug, tweak sidebar styles for better readability
Mar 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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