diff options
Diffstat (limited to 'serverless.yml')
-rw-r--r-- | serverless.yml | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/serverless.yml b/serverless.yml index cc9bdc5..95e5a88 100644 --- a/serverless.yml +++ b/serverless.yml | |||
@@ -1,23 +1,23 @@ | |||
1 | service: serverless-oauth2 | 1 | service: serverless-oauth2 |
2 | provider: | 2 | provider: |
3 | name: aws | 3 | name: aws |
4 | runtime: nodejs6.10 | 4 | runtime: nodejs10.x |
5 | stage: ${opt:stage, self:custom.defaultStage} | 5 | stage: ${opt:stage, self:custom.defaultStage} |
6 | environment: | 6 | environment: |
7 | GIT_HOSTNAME: "/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/GIT_HOSTNAME" | 7 | GIT_HOSTNAME: "/pbonaud/oauth/${opt:stage, self:provider.stage}/GIT_HOSTNAME" |
8 | OAUTH_TOKEN_PATH: "/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/OAUTH_TOKEN_PATH" | 8 | OAUTH_TOKEN_PATH: "/pbonaud/oauth/${opt:stage, self:provider.stage}/OAUTH_TOKEN_PATH" |
9 | OAUTH_AUTHORIZE_PATH: "/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/OAUTH_AUTHORIZE_PATH" | 9 | OAUTH_AUTHORIZE_PATH: "/pbonaud/oauth/${opt:stage, self:provider.stage}/OAUTH_AUTHORIZE_PATH" |
10 | OAUTH_CLIENT_ID: "/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/OAUTH_CLIENT_ID" | 10 | OAUTH_CLIENT_ID: "/pbonaud/oauth/${opt:stage, self:provider.stage}/OAUTH_CLIENT_ID" |
11 | OAUTH_CLIENT_SECRET: "/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/OAUTH_CLIENT_SECRET" | 11 | OAUTH_CLIENT_SECRET: "/pbonaud/oauth/${opt:stage, self:provider.stage}/OAUTH_CLIENT_SECRET" |
12 | REDIRECT_URL: "/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/REDIRECT_URL" | 12 | REDIRECT_URL: "/pbonaud/oauth/${opt:stage, self:provider.stage}/REDIRECT_URL" |
13 | OAUTH_SCOPES: "/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/OAUTH_SCOPES" | 13 | OAUTH_SCOPES: "/pbonaud/oauth/${opt:stage, self:provider.stage}/OAUTH_SCOPES" |
14 | TZ: "utc" | 14 | TZ: "utc" |
15 | iamRoleStatements: | 15 | iamRoleStatements: |
16 | - Effect: Allow | 16 | - Effect: Allow |
17 | Action: | 17 | Action: |
18 | - ssm:DescribeParameters | 18 | - ssm:DescribeParameters |
19 | - ssm:GetParameters | 19 | - ssm:GetParameters |
20 | Resource: "arn:aws:ssm:${opt:region, self:provider.region}:*:parameter/ctrl-alt-del/oauth/${opt:stage, self:provider.stage}/*" | 20 | Resource: "arn:aws:ssm:${opt:region, self:provider.region}:*:parameter/pbonaud/oauth/${opt:stage, self:provider.stage}/*" |
21 | - Effect: Allow | 21 | - Effect: Allow |
22 | Action: | 22 | Action: |
23 | - kms:Decrypt | 23 | - kms:Decrypt |
@@ -26,8 +26,8 @@ provider: | |||
26 | custom: | 26 | custom: |
27 | defaultStage: dev | 27 | defaultStage: dev |
28 | kms_key: | 28 | kms_key: |
29 | "us-east-1": | 29 | "eu-west-1": |
30 | prod: "01660d80-64fb-4444-9b21-bb15ac2f97ec" | 30 | prod: "4c50d94e-061d-4034-b63f-507eb31b4fe7" |
31 | dev: "foo" | 31 | dev: "foo" |
32 | 32 | ||
33 | functions: | 33 | functions: |
@@ -39,7 +39,7 @@ functions: | |||
39 | - http: | 39 | - http: |
40 | path: /auth | 40 | path: /auth |
41 | method: get | 41 | method: get |
42 | cors: true | 42 | cors: true |
43 | callback: | 43 | callback: |
44 | handler: auth.callback | 44 | handler: auth.callback |
45 | memorySize: 128 | 45 | memorySize: 128 |
@@ -49,24 +49,6 @@ functions: | |||
49 | path: /callback | 49 | path: /callback |
50 | method: get | 50 | method: get |
51 | cors: true | 51 | cors: true |
52 | success: | ||
53 | handler: auth.success | ||
54 | memorySize: 128 | ||
55 | timeout: 5 | ||
56 | events: | ||
57 | - http: | ||
58 | path: /success | ||
59 | method: get | ||
60 | cors: true | ||
61 | default: | ||
62 | handler: auth.default | ||
63 | memorySize: 128 | ||
64 | timeout: 5 | ||
65 | events: | ||
66 | - http: | ||
67 | path: / | ||
68 | method: get | ||
69 | cors: true | ||
70 | 52 | ||
71 | plugins: | 53 | plugins: |
72 | - serverless-plugin-optimize | 54 | - serverless-plugin-optimize |