Skip to content

Commit b0640aa

Browse files
authored
Merge pull request #46 from silinternational/develop
Release 2.1.0
2 parents bbf79c6 + 938cead commit b0640aa

File tree

3 files changed

+28
-32
lines changed

3 files changed

+28
-32
lines changed

.whitesource

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"generalSettings": {
3+
"shouldScanRepo": true
4+
},
5+
"checkRunSettings": {
6+
"vulnerableCheckRunConclusionLevel": "failure"
7+
}
8+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ For details about the various API endpoints, see
4343
the user presses the button on the device.
4444
- Pressing the button will trigger the callback method provided to the `u2f.register()`
4545
call which should pass the response object to the consumer's service, which in turn
46-
can make a `PUT` call to `/mfa/{uuid}` with a JSON body including a property named
46+
can make a `PUT` call to `/u2f/{uuid}` with a JSON body including a property named
4747
`signResult` with a value of the object returned from the U2F device.
4848
- We will validate the response and store the `keyHandle` and `publicKey` encrypted by
4949
the consumer's API Secret and respond with a success or error message.
@@ -57,7 +57,7 @@ For details about the various API endpoints, see
5757
the user presses the button on the device.
5858
- Pressing the button will trigger the callback method provided to the `u2f.sign()`
5959
call which should pass the response object to the consumer's service, which in turn
60-
can make a `PUT` call to `/mfa/{uuid}/auth` with a JSON body including a property named
60+
can make a `PUT` call to `/u2f/{uuid}/auth` with a JSON body including a property named
6161
`signResult` with a value of the object returned from the U2F device.
6262
- We will validate the signResult and respond with a success or error message.
6363

serverless.yml

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ provider:
66
name: aws
77
runtime: nodejs6.10
88
timeout: 30
9-
9+
1010
# Experimented with various memory sizes. Manually calling the totpValidate
1111
# function once every few seconds, the average durations were as follows:
1212
# 512 MB = 48 ms
@@ -16,7 +16,7 @@ provider:
1616
apiKeys:
1717
- ${self:custom.namespace}_global
1818
iamRoleStatements:
19-
- Effect: "Allow"
19+
- Effect: Allow
2020
Action:
2121
- dynamodb:DescribeTable
2222
- dynamodb:Query
@@ -25,7 +25,7 @@ provider:
2525
- dynamodb:PutItem
2626
- dynamodb:UpdateItem
2727
- dynamodb:DeleteItem
28-
Resource: "arn:aws:dynamodb:us-east-1:*:*"
28+
Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/${self:custom.namespace}_*"
2929

3030
custom:
3131
stage: ${opt:stage, self:provider.stage}
@@ -143,53 +143,41 @@ functions:
143143
resources:
144144
Resources:
145145
ApiKeyDynamoDbTable:
146-
Type: 'AWS::DynamoDB::Table'
146+
Type: AWS::DynamoDB::Table
147147
DeletionPolicy: Retain
148148
Properties:
149149
AttributeDefinitions:
150-
-
151-
AttributeName: value
150+
- AttributeName: value
152151
AttributeType: S
153152
KeySchema:
154-
-
155-
AttributeName: value
153+
- AttributeName: value
156154
KeyType: HASH
157-
ProvisionedThroughput:
158-
ReadCapacityUnits: 5
159-
WriteCapacityUnits: 5
160-
TableName: '${self:custom.apiKeyTable}'
155+
BillingMode: PAY_PER_REQUEST
156+
TableName: ${self:custom.apiKeyTable}
161157
TotpDynamoDbTable:
162-
Type: 'AWS::DynamoDB::Table'
158+
Type: AWS::DynamoDB::Table
163159
DeletionPolicy: Retain
164160
Properties:
165161
AttributeDefinitions:
166-
-
167-
AttributeName: uuid
162+
- AttributeName: uuid
168163
AttributeType: S
169164
KeySchema:
170-
-
171-
AttributeName: uuid
165+
- AttributeName: uuid
172166
KeyType: HASH
173-
ProvisionedThroughput:
174-
ReadCapacityUnits: 5
175-
WriteCapacityUnits: 5
176-
TableName: '${self:custom.totpTable}'
167+
BillingMode: PAY_PER_REQUEST
168+
TableName: ${self:custom.totpTable}
177169
U2fDynamoDbTable:
178-
Type: 'AWS::DynamoDB::Table'
170+
Type: AWS::DynamoDB::Table
179171
DeletionPolicy: Retain
180172
Properties:
181173
AttributeDefinitions:
182-
-
183-
AttributeName: uuid
174+
- AttributeName: uuid
184175
AttributeType: S
185176
KeySchema:
186-
-
187-
AttributeName: uuid
177+
- AttributeName: uuid
188178
KeyType: HASH
189-
ProvisionedThroughput:
190-
ReadCapacityUnits: 5
191-
WriteCapacityUnits: 5
192-
TableName: '${self:custom.u2fTable}'
179+
BillingMode: PAY_PER_REQUEST
180+
TableName: ${self:custom.u2fTable}
193181
ApiKeyActivateLogGroup:
194182
Properties:
195183
RetentionInDays: "30"

0 commit comments

Comments
 (0)