Skip to content

Commit 544cec1

Browse files
authored
Merge pull request #152 from silinternational/develop
Release 3.1.3 -- log API Secret error, increase log retention
2 parents 3791399 + 8f760a8 commit 544cec1

File tree

8 files changed

+22
-19
lines changed

8 files changed

+22
-19
lines changed

.github/workflows/test-and-deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Test and Deploy
22

33
on:
44
push:
5+
branches: ["**"]
6+
paths-ignore:
7+
- 'terraform/**'
58

69
env:
710
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dev-server:
22
node development/server
33

44
dynamodb:
5-
docker-compose up -d dynamodb
5+
docker compose up -d dynamodb
66

77
dynamodb-tables: dynamodb
88
./development/create-tables.sh
@@ -11,10 +11,10 @@ list-dev-api-keys:
1111
./development/list-api-keys.sh
1212

1313
do-full-recovery:
14-
docker-compose run --rm do-full-recovery
14+
docker compose run --rm do-full-recovery
1515

1616
test:
17-
docker-compose run --rm dev bash -c "npm ci && npm test"
17+
docker compose run --rm dev bash -c "npm ci && npm test"
1818

1919
update:
20-
docker-compose run --rm dev bash -c "npm update"
20+
docker compose run --rm dev bash -c "npm update"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ To run this locally (such as for development)...
300300
To start a local container for development of Serverless configuration:
301301
302302
```
303-
docker-compose run --rm dev bash
303+
docker compose run --rm dev bash
304304
```
305305
306306
## Credential Rotation

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: "3"
2-
31
services:
42
do-full-recovery:
53
build: recovery

models/api-key.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ const isValidApiSecret = (apiKeyRecord, apiSecret = '') => {
182182
const isValid = password.compare(apiSecret, apiKeyRecord.hashedApiSecret);
183183
if (isValid !== true) {
184184
console.log('The given API Secret is NOT valid for the given API Key record.');
185+
const redactedApiSecret = apiSecret.substring(0, 3) + '...[snip]...' + apiSecret.substring(apiSecret.length - 3);
186+
console.log(redactedApiSecret);
185187
return false;
186188
}
187189

serverless.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,50 +175,50 @@ resources:
175175
ApiKeyActivateLogGroup:
176176
Type: AWS::Logs::LogGroup
177177
Properties:
178-
RetentionInDays: "30"
178+
RetentionInDays: "60"
179179
Tags: ${self:custom.resourceTags}
180180
ApiKeyCreateLogGroup:
181181
Type: AWS::Logs::LogGroup
182182
Properties:
183-
RetentionInDays: "30"
183+
RetentionInDays: "60"
184184
Tags: ${self:custom.resourceTags}
185185
TotpCreateLogGroup:
186186
Type: AWS::Logs::LogGroup
187187
Properties:
188-
RetentionInDays: "30"
188+
RetentionInDays: "60"
189189
Tags: ${self:custom.resourceTags}
190190
TotpDeleteLogGroup:
191191
Type: AWS::Logs::LogGroup
192192
Properties:
193-
RetentionInDays: "30"
193+
RetentionInDays: "60"
194194
Tags: ${self:custom.resourceTags}
195195
TotpValidateLogGroup:
196196
Type: AWS::Logs::LogGroup
197197
Properties:
198-
RetentionInDays: "30"
198+
RetentionInDays: "60"
199199
Tags: ${self:custom.resourceTags}
200200
U2fCreateAuthenticationLogGroup:
201201
Type: AWS::Logs::LogGroup
202202
Properties:
203-
RetentionInDays: "30"
203+
RetentionInDays: "60"
204204
Tags: ${self:custom.resourceTags}
205205
U2fCreateRegistrationLogGroup:
206206
Type: AWS::Logs::LogGroup
207207
Properties:
208-
RetentionInDays: "30"
208+
RetentionInDays: "60"
209209
Tags: ${self:custom.resourceTags}
210210
U2fDeleteLogGroup:
211211
Type: AWS::Logs::LogGroup
212212
Properties:
213-
RetentionInDays: "30"
213+
RetentionInDays: "60"
214214
Tags: ${self:custom.resourceTags}
215215
U2fValidateAuthenticationLogGroup:
216216
Type: AWS::Logs::LogGroup
217217
Properties:
218-
RetentionInDays: "30"
218+
RetentionInDays: "60"
219219
Tags: ${self:custom.resourceTags}
220220
U2fValidateRegistrationLogGroup:
221221
Type: AWS::Logs::LogGroup
222222
Properties:
223-
RetentionInDays: "30"
223+
RetentionInDays: "60"
224224
Tags: ${self:custom.resourceTags}

terraform/.terraform.lock.hcl

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terraform/main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ locals {
1010
module "serverless_user" {
1111
count = var.app_environment == "staging" ? 1 : 0
1212
source = "silinternational/serverless-user/aws"
13-
version = "0.3.2"
13+
version = "0.4.2"
1414

1515
app_name = var.app_name
16-
aws_region = var.aws_region
1716
aws_region_policy = "*"
1817
enable_api_gateway = true
1918

0 commit comments

Comments
 (0)