Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
ff45baa
Remove duplicate Region -> S3 Website URL mapping
bejos-aws Feb 5, 2019
64144af
Merge pull request #221 from awslabs/minor-updates
bejos-aws Feb 5, 2019
5ccddb4
Add Dynamo table to store customer feedback, SNS topic to send notifi…
bejos-aws Feb 13, 2019
a5ff596
Include feedbackEnabled boolean in config.js
bejos-aws Feb 13, 2019
9bd5f8c
Add handlers to retrieve and post customer feedback (save to dynamo, …
bejos-aws Feb 13, 2019
38e13be
Implement button and modal for customers to submit feedback
bejos-aws Feb 13, 2019
cc66186
Minor refactoring and added unit tests for feedback-controller
bejos-aws Feb 14, 2019
ef900be
Refactor to promise-based handlers for customer feedback mechanism
bejos-aws Feb 15, 2019
f26bcc1
Remove Fn::If in favor of !If
bejos-aws Feb 15, 2019
dbe2822
revert swagger-ui upgrade (b/c it broke stuff)
Feb 5, 2019
c1e8581
fix for #218 and a few other sign-in related bugs
Feb 5, 2019
55bae2c
Ignore IDEA project descriptions (.iml)
echo-bravo-yahoo Feb 18, 2019
aa4123b
Fix SwaggerUI to v3.19.3
echo-bravo-yahoo Feb 18, 2019
180e56f
Prevent users from accessing S3 directly using OAI
echo-bravo-yahoo Feb 8, 2019
1f6334a
Clean up CFN template
echo-bravo-yahoo Feb 8, 2019
797152b
Clean up unnecessary comma
echo-bravo-yahoo Feb 8, 2019
edc2078
Fix small typo
echo-bravo-yahoo Feb 8, 2019
bc1e2e2
Fix issue with notify-cfn's failure case
echo-bravo-yahoo Feb 8, 2019
6b61e7f
Fix staticAssetUploader not deleting correctly
echo-bravo-yahoo Feb 8, 2019
9814944
Move to promisified notifyCFN
echo-bravo-yahoo Feb 8, 2019
23f0695
First draft of admin API
echo-bravo-yahoo Feb 20, 2019
626e737
Set up QA endpoints
echo-bravo-yahoo Feb 18, 2019
402286e
Fix auth by reintroducing /{proxy+}
echo-bravo-yahoo Feb 18, 2019
534f3dc
Finalize admin API and add unit tests
echo-bravo-yahoo Feb 20, 2019
5e47762
Move from OAuth scopes to User Pool Groups
echo-bravo-yahoo Feb 26, 2019
196d468
Move to requiring hosted sign-on
echo-bravo-yahoo Feb 26, 2019
b21e662
Clean up template
echo-bravo-yahoo Feb 26, 2019
f8277be
Improve backend lambda logging
echo-bravo-yahoo Feb 26, 2019
62cefa8
Fix broken build
echo-bravo-yahoo Feb 26, 2019
9a60a46
Fix tests reliant on req.apiGateway.context
echo-bravo-yahoo Mar 7, 2019
dbba031
Move feedback button further down the page
echo-bravo-yahoo Mar 7, 2019
e81ecdf
Add admin API for showing & hiding SDK generation
echo-bravo-yahoo Mar 7, 2019
1c45f76
Add unit tests for admin sdk generation
echo-bravo-yahoo Mar 8, 2019
7c6cf07
Clean up tests
echo-bravo-yahoo Mar 8, 2019
f036ced
Document idempotentSdkGeneration function
echo-bravo-yahoo Mar 8, 2019
80231c4
Suppress console.dir during test runs
echo-bravo-yahoo Mar 8, 2019
c45bfd4
Clean up uses of cognitoID by using helper fn
echo-bravo-yahoo Mar 8, 2019
375dc67
Modify SDK to pass on params
echo-bravo-yahoo Mar 8, 2019
b035aac
Add getSdk endpoint
echo-bravo-yahoo Mar 8, 2019
c05ef69
Add getSdk tests
echo-bravo-yahoo Mar 9, 2019
8c4ae65
Fix test running on CI
echo-bravo-yahoo Mar 11, 2019
f6a83b5
Include all relevant files in coverage
echo-bravo-yahoo Mar 13, 2019
db99f39
Save userPoolId as well as identityPoolId
echo-bravo-yahoo Mar 13, 2019
a61bebb
Add unit tests for api keys
echo-bravo-yahoo Mar 13, 2019
962d86e
Fix us-east-1 S3 bug
echo-bravo-yahoo Mar 11, 2019
aa4b004
fix(scripts): add s3 bucket
nitishdayal Feb 20, 2019
5330f9e
chore: audit dependencies, general clean-up
nitishdayal Feb 21, 2019
9168e71
Admin Panel(feat):
nitishdayal Mar 14, 2019
65091ef
Fix merge conflicts and admin detection logic
echo-bravo-yahoo Mar 15, 2019
013d923
Minor cleanup
echo-bravo-yahoo Mar 15, 2019
96cb8fc
Extend visibility API to include subscribability
echo-bravo-yahoo Mar 15, 2019
7d071d7
Test fixes and bug fixes for visibility api
echo-bravo-yahoo Mar 16, 2019
41bf141
Add development mode as a stack param (#243)
echo-bravo-yahoo Mar 18, 2019
0e415fd
Fix deployment for development mode
echo-bravo-yahoo Mar 18, 2019
4483d47
feat(Admin Panel): include generic APIs
nitishdayal Mar 19, 2019
768255a
Add integ tests for CFN stack standup/teardown
echo-bravo-yahoo Mar 18, 2019
a31deb7
feat(Admin Panel): include generic APIsAdd table for uploading + dele…
nitishdayal Mar 19, 2019
bfb4680
feat(Admin Panel): include generateSDK option
echo-bravo-yahoo Mar 19, 2019
dc856ee
Template fixes for CognitoDomain, UserPoolClient
echo-bravo-yahoo Mar 21, 2019
1d8d05a
Fix feedback button always visible
echo-bravo-yahoo Mar 21, 2019
71bc52b
Fix webpack build for dev-portal
echo-bravo-yahoo Mar 21, 2019
f180ca1
make the apigateway sdk accept axios config
Mar 21, 2019
c5e414b
feat(getSdk): basic ui and layout for getSdk; minor backend changes
Mar 21, 2019
5a88935
remove old logic for non-hosted sign in
Mar 21, 2019
9939af3
minor tweaks to make apis list a bit more fluid
Mar 21, 2019
891df32
make alerts slightly more useful, but not much
Mar 21, 2019
ca7f425
feat(getSdk): updates to download sdk button and data
Mar 21, 2019
26b768b
feat(getSdk): add datauri to the backend lambda function
Mar 21, 2019
93daa90
feat(getSdk): convert file to datauri on the backend (b/c the the fil…
Mar 21, 2019
6ef436e
feat(getSdk): add notifications to the dev portal
Mar 21, 2019
cd1fb34
feat(getSdk): fix validation not working and state being set correctly
Mar 21, 2019
8fa9378
Merge branch 'staging' into rebased-admin
echo-bravo-yahoo Mar 22, 2019
8e32410
Update README
echo-bravo-yahoo Mar 22, 2019
4812b73
Tighten CORS policy
echo-bravo-yahoo Mar 22, 2019
df27b3e
Add client and server validation of generic files
echo-bravo-yahoo Mar 22, 2019
bff291c
Prevent staticAssetUploader overwriting sdkGeneration
echo-bravo-yahoo Mar 22, 2019
cecee45
Remove catalogGenerator file detection
echo-bravo-yahoo Mar 22, 2019
1295598
Fix admin API table sort
echo-bravo-yahoo Mar 22, 2019
e6570fb
Fix POST signin 504ing
echo-bravo-yahoo Mar 22, 2019
41f53ee
Enforce that all apiStages on a usage plan must be visible before all…
echo-bravo-yahoo Mar 22, 2019
a409bd0
Changes
nitishdayal Mar 21, 2019
af53fc1
fix(Admin Panel): allow for non-subscribable APIs
nitishdayal Mar 22, 2019
36591c0
Merge branch 'rebased-admin' of https://github.com/awslabs/aws-api-ga…
echo-bravo-yahoo Mar 22, 2019
c0d49ec
Fixes for dev mode
echo-bravo-yahoo Mar 22, 2019
7a120dc
Fix hashing algorithm for generic APIs
echo-bravo-yahoo Mar 22, 2019
92fdbaa
Fix hashing algorithm for generic APIs, again
echo-bravo-yahoo Mar 22, 2019
e54de5f
fix: Fix LogOut URL in cfn template
nitishdayal Mar 22, 2019
2a8d852
Change handling of unsubscribable APIs
echo-bravo-yahoo Mar 22, 2019
ce33884
Fix handling of APIs in edge case
echo-bravo-yahoo Mar 22, 2019
b3d8b55
Allow generating SDKs from unsubscribable APIs
echo-bravo-yahoo Mar 22, 2019
613eed5
fix(Admin Panel): Fix generic table
nitishdayal Mar 22, 2019
28c2f0f
feat(Search): add API search feature
nitishdayal Mar 25, 2019
3845de8
feat(Search): add API search feature
nitishdayal Mar 25, 2019
549cbbf
Update template parameter descriptions
echo-bravo-yahoo Mar 24, 2019
fef4bdb
Fix api list to vertically scroll
echo-bravo-yahoo Mar 24, 2019
7b7eb92
Update / refactor ApiManagement.jsx
echo-bravo-yahoo Mar 24, 2019
653a89c
Add close icon to modal in admin panel
echo-bravo-yahoo Mar 24, 2019
b0c6038
Change server validation status code on misconfigured usage plan
echo-bravo-yahoo Mar 24, 2019
0bee337
Update get visibility to include usage plan information
echo-bravo-yahoo Mar 24, 2019
8587210
Fix default api logo not rendering
echo-bravo-yahoo Mar 24, 2019
edc9ab3
Update warning text
echo-bravo-yahoo Mar 24, 2019
bc854b1
Update subscription logic
echo-bravo-yahoo Mar 24, 2019
6bf023d
feat(getSdk): create custom dropdown component so FF stops breaking
Mar 26, 2019
ca599c3
Admin panel now uses store instead of state
echo-bravo-yahoo Mar 26, 2019
5078318
Fix Java SDK title
echo-bravo-yahoo Mar 26, 2019
c3cdbe3
Fix bug with admin panel table
echo-bravo-yahoo Mar 26, 2019
5d07903
Reload visibility on STS token exchange
echo-bravo-yahoo Mar 26, 2019
d483a66
Update state with visibility info
echo-bravo-yahoo Mar 26, 2019
3fb6692
Fix unit tests
echo-bravo-yahoo Mar 26, 2019
591a30d
Fix backend
echo-bravo-yahoo Mar 26, 2019
39bd813
Fix unit tests
echo-bravo-yahoo Mar 26, 2019
4615767
Fix backend more
echo-bravo-yahoo Mar 26, 2019
de55056
Break build if dev portal build fails
echo-bravo-yahoo Mar 26, 2019
9c4c455
feat(getSdk): fix state changes for keys with dots
Mar 26, 2019
f931e99
Fix custom error responses
echo-bravo-yahoo Mar 26, 2019
6b096cc
Update README for v3.0.0
echo-bravo-yahoo Mar 27, 2019
5ca1263
Fix bug with catalog updater and tests
echo-bravo-yahoo Mar 27, 2019
68e8716
Update version stamps for v3.0.0
echo-bravo-yahoo Mar 27, 2019
58bfeaf
Revert changes to swagger-ui
echo-bravo-yahoo Mar 27, 2019
066a17b
Update static assets for v3.0.0
echo-bravo-yahoo Mar 27, 2019
c450eed
Merge pull request #250 from awslabs/v3
echo-bravo-yahoo Mar 27, 2019
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
dev-portal/node_modules/*
!dev-portal/node_modules/swagger-ui/
dev-portal/node_modules/swagger-ui/*
!dev-portal/node_modules/swagger-ui/package.json
!dev-portal/node_modules/swagger-ui/dist/

# built artifacts
Expand All @@ -27,7 +28,8 @@ dev-portal/node_modules/swagger-ui/*
# misc
npm-debug.log
.DS_Store
packaged.yaml
packaged*.yaml
cognito.js
.idea
.vscode
*.iml
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
language: node_js
node_js:
- "node"
# we can't use latest because 11.11 breaks jest's env variable mock
- "11.10.1"

cache: npm

before_install:
# install clis in parallel
# - pip install --user awscli
# pip install --user aws-sam-cli
# https://github.com/travis-ci/travis-ci/issues/3139
- cd dev-portal
# install everything in dev portal
- npm install
Expand Down
164 changes: 25 additions & 139 deletions README.md

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions README_SAR.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The Serverless Developer Portal is an application that you use for developer eng
#### To deploy
1. Enter a name for ArtifactsS3BucketName: this will create an Amazon S3 bucket with that name for storing the catalog metadata.
1. Enter a name for DevPortalSiteS3BucketName: this will create an Amazon S3 bucket with that name for the web application code.
1. Enter a unique prefix for CognitoDomainNameOrPrefix; this will be used in the sign in page's URL.
1. You should leave all the other settings as-is unless you need to change them. For example, you can optionally enter a custom domain name in the CustomDomainName field.
1. Acknowledge that the app uses custom roles by checking the box "I acknowledge that this app creates custom IAM roles."
1. Choose Deploy.
Expand All @@ -16,14 +17,14 @@ The Serverless Developer Portal is an application that you use for developer eng
1. Open the Outputs section. The URL for the developer portal is specified in the WebSiteURL property.

#### Updating to a new version
The Developer Portal follows the semantic versioning scheme (major.minor.patch). Changes to the minor or patch version are backwards compatible so you should feel safe to get the latest version.
The Developer Portal follows the semantic versioning scheme (major.minor.patch). Changes to the minor or patch version are backwards compatible so you should feel safe to get the latest version. For changes to major versions, please see [this page on updating](https://github.com/awslabs/aws-api-gateway-developer-portal/wiki/Upgrading/_edit).

To update:
1. When deploying follow the same steps as previous and use the same values for the parameters. The only difference is passing in a new value for "-StaticAssetRebuildToken". You can use any string for this as long as it is different than previously used (default value is "defaultRebuildToken").
1. When deploying follow the same steps as previous and use the same values for the parameters. The only difference is passing in a new value for the stack parameter StaticAssetRebuildToken. You can use any string for this as long as it is different than the previously used string.

#### Next steps
1. Publish an API on it for your customer to look at. Learn how to do that [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-developer-portal.html#apigateway-developer-portal-publish).
1. Customize, own, and brand the portal. Learn how to do that [here](https://github.com/awslabs/aws-api-gateway-developer-portal#customization).
1. Customize, own, and brand the portal. Learn how to do that [here](https://github.com/awslabs/aws-api-gateway-developer-portal/wiki/Customization).
1. Setup a custom domain on it your customers recognize your brand and the associated APIs. Learn how to do that [here](https://github.com/awslabs/aws-api-gateway-developer-portal#before-going-to-production).

To learn more about the API Gateway Serverless Developer Portal, read the [documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-developer-portal.html) or visit the [GitHub repository](https://github.com/awslabs/aws-api-gateway-developer-portal). For more information about Amazon API Gateway, visit the API Gateway [product page](https://aws.amazon.com/api-gateway/).
112 changes: 112 additions & 0 deletions __tests__/cfn-integration-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
const fs = require('fs')
const rp = require('request-promise')

describe('template.yaml', () => {
// NOTE: These tests all assume that the CFN template has already been packaged *PER REGION*!
const cfnTimeout = 75,
// run the test with a timeout of slightly longer than double the CFN stack timeout
testTimeout = 1000*60*cfnTimeout*2 + 1
const _console = console.log

async function commonTest(region, stackMiddlefix) {
let unixTimestamp = Math.floor(new Date() / 1000),
stackName = `cfn-integ-${ stackMiddlefix }-${ unixTimestamp }`,
s3Params = {
// CFN, when reading the template from S3, requires the S3 bucket to be in the same region as the CFN stack...
Bucket: `dev-portal-integ-${ region }`,
Body: fs.readFileSync(`./cloudformation/packaged-${region}.yaml`),
Key: stackName
},
cfnParams = {
StackName: stackName,
Capabilities: ['CAPABILITY_NAMED_IAM', 'CAPABILITY_AUTO_EXPAND'],
Parameters: [
{
ParameterKey: 'DevPortalSiteS3BucketName',
ParameterValue: `integ-${ stackMiddlefix }-${ unixTimestamp }-dev-portal-test`
},
{
ParameterKey: 'ArtifactsS3BucketName',
ParameterValue: `integ-${ stackMiddlefix }-${ unixTimestamp }-artifact-bucket`
},
{
ParameterKey: 'DevPortalCustomersTableName',
ParameterValue: `Customers${ unixTimestamp }`
},
{
ParameterKey: 'CognitoDomainNameOrPrefix',
ParameterValue: `integ-${ stackMiddlefix }-${ unixTimestamp }`
}
],
// RoleARN: 'STRING_VALUE',
TimeoutInMinutes: cfnTimeout
}

console.log('commonTest', region)

const AWS = require('aws-sdk')
AWS.config.update({ region: region })

// pin versions of SDKs
const cfn = new AWS.CloudFormation({ region: region }),
s3 = new AWS.S3({ region: region }),
logger = function (input) {
_console(`${region}:${stackName}:${input}`)
}

// Upload the packaged template to S3, then use the resulting URL in the CFN createStack call
// This is necessary because the file is too large to deliver in-line to CFN
cfnParams.TemplateURL =(await s3.upload(s3Params).promise()).Location

logger('createStack call starting.')
await cfn.createStack(cfnParams).promise()
logger('createStack call succeeded.')

logger('stackExists waiter starting.')
await cfn.waitFor('stackExists', { StackName: stackName }).promise()
logger('stackExists waiter succeeded.')

logger('stackCreateComplete waiter starting.')
let devPortalUrl =
(await cfn.waitFor('stackCreateComplete', { StackName: stackName }).promise()).Stacks[0].Outputs
.find((output) => output.OutputKey === 'WebsiteURL').OutputValue
logger('stackCreateComplete waiter succeeded.')

logger(`verifying that stack is available at ${devPortalUrl} .`)
let staticIndex = await rp(devPortalUrl)

expect(staticIndex.includes('<title>Developer Portal</title>')).toBeTruthy()
logger(`verified that stack is available at ${devPortalUrl} .`)

// add RoleArn: ... later
logger('deleteStack call starting.')
await cfn.deleteStack({ StackName: stackName }).promise()
logger('deleteStack call succeeded.')

logger('stackDeleteComplete waiter starting.')
await cfn.waitFor('stackDeleteComplete', { StackName: stackName }).promise()
logger('stackDeleteComplete waiter succeeded.')

// pass the test; we successfully stood the stack up and tore it down
expect(true).toBe(true)

return true
}

test.concurrent('should stand up and tear down the stack in IAD', async () => {
return commonTest('us-east-1', 'us-east-1')
}, testTimeout)

test.concurrent('should stand up and tear down the stack in a non-IAD region', async () => {
return commonTest('us-west-2', 'us-west-2')
}, testTimeout)

// Implement these! Hardest part will be having test ACM certs in the account
// test('should stand up and tear down a custom domain stack in IAD', async () => {
// return commonTest('us-east-1', 'domain-us-east-1')
// }, testTimeout)
//
// test('should stand up and tear down a custom domain stack in a non-IAD region', async () => {
// return commonTest('us-west-2', 'domain-us-west-2')
// }, testTimeout)
})
Loading