saaslayer 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -16
- package/bin/saaslayer.js +387 -61
- package/package.json +3 -2
- package/src/api-client.js +37 -1
- package/src/aws-sigv4.js +74 -26
- package/src/cognito-user-api.js +80 -0
- package/src/commands/access-admins.js +2 -2
- package/src/commands/account-email.js +43 -0
- package/src/commands/admin-allowlist.js +65 -0
- package/src/commands/api-keys.js +83 -0
- package/src/commands/audit.js +77 -0
- package/src/commands/aws.js +355 -82
- package/src/commands/binding-handoff.js +174 -0
- package/src/commands/bindings.js +111 -0
- package/src/commands/catalog.js +30 -3
- package/src/commands/deploy.js +33 -10
- package/src/commands/env-export.js +58 -0
- package/src/commands/first-admin.js +15 -4
- package/src/commands/foundation.js +75 -117
- package/src/commands/hooks.js +271 -0
- package/src/commands/integration-credentials.js +1 -1
- package/src/commands/lifecycle.js +149 -24
- package/src/commands/login-domain.js +259 -0
- package/src/commands/login.js +53 -16
- package/src/commands/org-members.js +109 -0
- package/src/commands/permission-orgs.js +80 -0
- package/src/commands/release-manifest.js +17 -8
- package/src/commands/service-principals.js +42 -5
- package/src/commands/settings.js +21 -5
- package/src/commands/sms-registration.js +182 -0
- package/src/commands/sms.js +178 -0
- package/src/commands/social.js +265 -0
- package/src/commands/support-staff.js +72 -0
- package/src/commands/trust-policies.js +172 -0
- package/src/commands/users-management.js +2 -20
- package/src/commands/users.js +56 -11
- package/src/commands/versions.js +61 -0
- package/src/connection-proof.js +41 -0
- package/src/deployment-api-auth.js +166 -8
- package/src/deployments.js +1 -1
- package/src/foundation-change-set.js +180 -0
- package/src/foundation-home.js +121 -0
- package/src/foundation-template.js +51 -10
- package/src/foundation-trust-write.js +379 -0
- package/src/iam-session.js +14 -8
- package/src/login-domain.js +139 -0
- package/src/login-methods.js +118 -0
- package/src/module-catalog.js +3 -2
- package/src/permissions-request.js +15 -9
- package/src/release-manifest.js +11 -4
- package/src/scope.js +3 -1
- package/src/settings.js +85 -13
- package/src/sms/number.js +37 -0
- package/src/sms/registration-fields.js +167 -0
- package/src/sms/registration-validate.js +151 -0
- package/src/sms/registration.js +216 -0
- package/src/sms/release.js +55 -0
- package/src/sms/scope.js +86 -0
- package/src/sms/status.js +181 -0
- package/src/ssm-api.js +31 -0
- package/src/trust-entries.js +350 -0
- package/src/user-service-instance.js +27 -0
- package/src/users-api.js +55 -8
- package/src/users-import/checkpoint.js +76 -0
- package/src/users-import/import.js +233 -24
- package/src/versions.js +80 -0
- package/templates/saaslayer-foundation-region.yml +45 -1
- package/templates/saaslayer-foundation.yml +747 -296
|
@@ -22,6 +22,13 @@
|
|
|
22
22
|
# (`saaslayer aws connect` / `saaslayer foundation upgrade --email-sender-domain`), so SaaSLayer's deploy role never
|
|
23
23
|
# creates or verifies identities (tests/bootstrap.test.js). The DKIM records it outputs go into the customer's DNS;
|
|
24
24
|
# once verified, deployments send through it via the user-service CognitoEmailSenderArn setting.
|
|
25
|
+
#
|
|
26
|
+
# OPTIONAL — the account's SMS sending number (SmsOriginationNumberType). Every SMS to a US number needs a registered
|
|
27
|
+
# origination identity, and one belongs to an account+region, so it lives here: one number per account+region, either
|
|
28
|
+
# a real toll-free number or a dev-only simulator number. Changed only by `saaslayer sms setup` / `saaslayer sms release`;
|
|
29
|
+
# every other path that updates this stack keeps the value and refuses a change set that replaces or removes the number
|
|
30
|
+
# (its approved toll-free registration would be lost). Deployments send through it via the user-service
|
|
31
|
+
# PhoneSmsOriginationIdentity setting (the SmsOriginationIdentityArn output).
|
|
25
32
|
AWSTemplateFormatVersion: '2010-09-09'
|
|
26
33
|
Description: >-
|
|
27
34
|
SaaSLayer per-region foundation stack: region-bound resources for a SaaSLayer host account, starting
|
|
@@ -46,9 +53,19 @@ Parameters:
|
|
|
46
53
|
Description: >-
|
|
47
54
|
Optional domain this account sends email from (e.g. acme.com). When set, an SES identity with Easy DKIM is
|
|
48
55
|
created and its three DKIM CNAME records are output for the domain's DNS. Empty = no sender domain.
|
|
56
|
+
SmsOriginationNumberType:
|
|
57
|
+
Type: String
|
|
58
|
+
AllowedValues: [none, toll-free, simulator]
|
|
59
|
+
Default: none
|
|
60
|
+
Description: >-
|
|
61
|
+
The account's SMS sending number in this region: none, a toll-free number (sends once its registration is
|
|
62
|
+
approved), or a simulator number (dev only; delivers to AWS simulator destinations). Set by saaslayer sms setup and
|
|
63
|
+
moved back to none only by saaslayer sms release.
|
|
49
64
|
|
|
50
65
|
Conditions:
|
|
51
66
|
HasEmailSenderDomain: !Not [!Equals [!Ref EmailSenderDomain, '']]
|
|
67
|
+
HasSmsOriginationNumber: !Not [!Equals [!Ref SmsOriginationNumberType, none]]
|
|
68
|
+
IsSmsSimulator: !Equals [!Ref SmsOriginationNumberType, simulator]
|
|
52
69
|
|
|
53
70
|
Mappings:
|
|
54
71
|
# Per-region foundation template version (semver). BUMP on every change so ops can tell which regional
|
|
@@ -56,7 +73,7 @@ Mappings:
|
|
|
56
73
|
# saaslayer-foundation: major = breaking change (resource replaced/removed), minor = additive, patch = docs.
|
|
57
74
|
Meta:
|
|
58
75
|
FoundationRegion:
|
|
59
|
-
Version: '1.
|
|
76
|
+
Version: '1.2.0'
|
|
60
77
|
|
|
61
78
|
Resources:
|
|
62
79
|
# Shared deployment-artifact bucket. Serverless namespaces every deploy under
|
|
@@ -124,7 +141,34 @@ Resources:
|
|
|
124
141
|
Properties:
|
|
125
142
|
EmailIdentity: !Ref EmailSenderDomain
|
|
126
143
|
|
|
144
|
+
# The account's SMS sending number (see the header). Delete on stack delete AND on replacement, so a number is never
|
|
145
|
+
# left billing outside the stack; replacement would also lose its registration, so the update paths refuse it.
|
|
146
|
+
# HELP/STOP replies are the carrier-required keywords; registration (`saaslayer sms register`) happens outside
|
|
147
|
+
# CloudFormation, which cannot register numbers.
|
|
148
|
+
SmsOriginationNumber:
|
|
149
|
+
Type: AWS::SMSVOICE::PhoneNumber
|
|
150
|
+
Condition: HasSmsOriginationNumber
|
|
151
|
+
DeletionPolicy: Delete
|
|
152
|
+
UpdateReplacePolicy: Delete
|
|
153
|
+
Properties:
|
|
154
|
+
IsoCountryCode: US
|
|
155
|
+
NumberType: !If [IsSmsSimulator, SIMULATOR, TOLL_FREE]
|
|
156
|
+
NumberCapabilities: [SMS]
|
|
157
|
+
MandatoryKeywords:
|
|
158
|
+
HELP:
|
|
159
|
+
Message: 'Account verification and sign-in codes. Msg and data rates may apply. Reply STOP to opt out.'
|
|
160
|
+
STOP:
|
|
161
|
+
Message: 'You are unsubscribed and will receive no further messages from this number.'
|
|
162
|
+
# The account's default sender; named senders, if any are added, carry their own saaslayer:sender value.
|
|
163
|
+
Tags:
|
|
164
|
+
- Key: saaslayer:sender
|
|
165
|
+
Value: default
|
|
166
|
+
|
|
127
167
|
Outputs:
|
|
168
|
+
SmsOriginationIdentityArn:
|
|
169
|
+
Condition: HasSmsOriginationNumber
|
|
170
|
+
Description: ARN of the account's SMS sending number (the user-service PhoneSmsOriginationIdentity setting).
|
|
171
|
+
Value: !GetAtt SmsOriginationNumber.Arn
|
|
128
172
|
EmailSenderIdentityArn:
|
|
129
173
|
Condition: HasEmailSenderDomain
|
|
130
174
|
Description: SES identity ARN of the account's email sender domain (the user-service CognitoEmailSenderArn setting).
|