@hasna/uptime 0.1.11 → 0.1.13
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/CHANGELOG.md +29 -0
- package/dist/api.js +474 -138
- package/dist/checks.d.ts +37 -5
- package/dist/checks.d.ts.map +1 -1
- package/dist/checks.js +471 -4
- package/dist/cli/index.js +473 -140
- package/dist/cloud-plan.js +2 -2
- package/dist/imports.js +100 -17
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +480 -140
- package/dist/mcp/index.js +471 -138
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +474 -138
- package/dist/store.js +100 -17
- package/dist/target-policy.d.ts +7 -0
- package/dist/target-policy.d.ts.map +1 -1
- package/dist/types.d.ts +26 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/aws-deployment-runbook.md +15 -9
- package/infra/aws/README.md +22 -2
- package/infra/aws/main.tf +288 -0
- package/infra/aws/outputs.tf +7 -0
- package/infra/aws/terraform.tfvars.example +4 -1
- package/infra/aws/variables.tf +43 -1
- package/package.json +1 -1
package/dist/store.js
CHANGED
|
@@ -27,6 +27,40 @@ import { Database } from "bun:sqlite";
|
|
|
27
27
|
// src/target-policy.ts
|
|
28
28
|
import net from "net";
|
|
29
29
|
var SECRET_PARAM_PATTERN = /(token|secret|password|passwd|api[_-]?key|access[_-]?token|auth|credential|session)/i;
|
|
30
|
+
var DENIED_IPV4_CIDRS = [
|
|
31
|
+
["0.0.0.0", 8],
|
|
32
|
+
["10.0.0.0", 8],
|
|
33
|
+
["100.64.0.0", 10],
|
|
34
|
+
["127.0.0.0", 8],
|
|
35
|
+
["169.254.0.0", 16],
|
|
36
|
+
["172.16.0.0", 12],
|
|
37
|
+
["192.0.0.0", 24],
|
|
38
|
+
["192.0.2.0", 24],
|
|
39
|
+
["192.88.99.0", 24],
|
|
40
|
+
["192.168.0.0", 16],
|
|
41
|
+
["198.18.0.0", 15],
|
|
42
|
+
["198.51.100.0", 24],
|
|
43
|
+
["203.0.113.0", 24],
|
|
44
|
+
["224.0.0.0", 4],
|
|
45
|
+
["240.0.0.0", 4]
|
|
46
|
+
];
|
|
47
|
+
var DENIED_IPV6_CIDRS = [
|
|
48
|
+
["::", 128],
|
|
49
|
+
["::1", 128],
|
|
50
|
+
["64:ff9b::", 96],
|
|
51
|
+
["64:ff9b:1::", 48],
|
|
52
|
+
["100::", 64],
|
|
53
|
+
["100:0:0:1::", 64],
|
|
54
|
+
["2001::", 23],
|
|
55
|
+
["2001:db8::", 32],
|
|
56
|
+
["2002::", 16],
|
|
57
|
+
["2620:4f:8000::", 48],
|
|
58
|
+
["3fff::", 20],
|
|
59
|
+
["5f00::", 16],
|
|
60
|
+
["fc00::", 7],
|
|
61
|
+
["fe80::", 10],
|
|
62
|
+
["ff00::", 8]
|
|
63
|
+
];
|
|
30
64
|
function assertHostedTargetAllowed(target) {
|
|
31
65
|
if (target.kind === "http" || target.kind === "browser_page") {
|
|
32
66
|
if (!target.url)
|
|
@@ -64,7 +98,7 @@ function assertHostedHttpUrlAllowed(value) {
|
|
|
64
98
|
assertHostedHostAllowed(parsed.hostname, "HTTP host");
|
|
65
99
|
}
|
|
66
100
|
function assertHostedHostAllowed(hostname, label = "host") {
|
|
67
|
-
const host =
|
|
101
|
+
const host = normalizeHostedHost(hostname);
|
|
68
102
|
if (!host)
|
|
69
103
|
throw new Error(`${label} is required`);
|
|
70
104
|
if (host === "localhost" || host.endsWith(".localhost")) {
|
|
@@ -81,39 +115,88 @@ function assertHostedHostAllowed(hostname, label = "host") {
|
|
|
81
115
|
throw new Error(`${label} is not allowed in hosted mode: private or reserved IPv6`);
|
|
82
116
|
}
|
|
83
117
|
}
|
|
84
|
-
function
|
|
118
|
+
function assertHostedResolvedAddressesAllowed(hostname, addresses, label = "resolved address") {
|
|
119
|
+
if (addresses.length === 0) {
|
|
120
|
+
throw new Error(`${label} is not allowed in hosted mode: DNS returned no addresses for ${normalizeHostedHost(hostname) || "host"}`);
|
|
121
|
+
}
|
|
122
|
+
for (const entry of addresses) {
|
|
123
|
+
assertHostedAddressAllowed(entry.address, label);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function assertHostedAddressAllowed(address, label = "resolved address") {
|
|
127
|
+
const host = normalizeHostedHost(address);
|
|
128
|
+
const ipVersion = net.isIP(host);
|
|
129
|
+
if (ipVersion === 4 && isDeniedIpv4(host)) {
|
|
130
|
+
throw new Error(`${label} is not allowed in hosted mode: private or reserved IPv4`);
|
|
131
|
+
}
|
|
132
|
+
if (ipVersion === 6 && isDeniedIpv6(host)) {
|
|
133
|
+
throw new Error(`${label} is not allowed in hosted mode: private or reserved IPv6`);
|
|
134
|
+
}
|
|
135
|
+
if (ipVersion === 0) {
|
|
136
|
+
throw new Error(`${label} is not allowed in hosted mode: DNS returned a non-IP address`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function normalizeHostedHost(hostname) {
|
|
85
140
|
return hostname.trim().toLowerCase().replace(/^\[|\]$/g, "").replace(/\.$/, "");
|
|
86
141
|
}
|
|
87
142
|
function isDeniedIpv4(ip) {
|
|
88
|
-
const parts = ip
|
|
89
|
-
if (parts
|
|
143
|
+
const parts = parseIpv4Words(ip);
|
|
144
|
+
if (!parts)
|
|
90
145
|
return true;
|
|
91
|
-
|
|
92
|
-
const [a, b] = parts;
|
|
93
|
-
return a === 0 || a === 10 || a === 127 || a === 100 && b >= 64 && b <= 127 || a === 169 && b === 254 || a === 172 && b >= 16 && b <= 31 || a === 192 && b === 168 || a >= 224;
|
|
146
|
+
return DENIED_IPV4_CIDRS.some(([base, prefix]) => ipv4MatchesCidr(parts, parseIpv4Words(base), prefix));
|
|
94
147
|
}
|
|
95
148
|
function isDeniedIpv6(ip) {
|
|
96
149
|
const normalized = ip.toLowerCase();
|
|
97
|
-
const
|
|
150
|
+
const words = parseIpv6Words(normalized);
|
|
151
|
+
if (!words)
|
|
152
|
+
return true;
|
|
153
|
+
const mappedIpv4 = ipv4FromMappedIpv6Words(words);
|
|
98
154
|
if (mappedIpv4)
|
|
99
155
|
return isDeniedIpv4(mappedIpv4);
|
|
100
|
-
|
|
101
|
-
return normalized === "::" || normalized === "::1" || words !== null && (words[0] & 65472) === 65152 || normalized.startsWith("fc") || normalized.startsWith("fd") || normalized.startsWith("ff");
|
|
156
|
+
return isIpv4CompatibleIpv6(words) || DENIED_IPV6_CIDRS.some(([base, prefix]) => ipv6MatchesCidr(words, parseIpv6Words(base), prefix));
|
|
102
157
|
}
|
|
103
|
-
function
|
|
104
|
-
const words = parseIpv6Words(ip);
|
|
158
|
+
function isIpv4CompatibleIpv6(words) {
|
|
105
159
|
if (!words)
|
|
106
|
-
return
|
|
160
|
+
return false;
|
|
161
|
+
if (!words.slice(0, 6).every((word) => word === 0))
|
|
162
|
+
return false;
|
|
163
|
+
if (words[6] === 0 && (words[7] === 0 || words[7] === 1))
|
|
164
|
+
return false;
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
function ipv4FromMappedIpv6Words(words) {
|
|
107
168
|
if (words[0] !== 0 || words[1] !== 0 || words[2] !== 0 || words[3] !== 0 || words[4] !== 0 || words[5] !== 65535) {
|
|
108
169
|
return null;
|
|
109
170
|
}
|
|
171
|
+
return ipv4FromWords(words[6], words[7]);
|
|
172
|
+
}
|
|
173
|
+
function ipv4FromWords(high, low) {
|
|
110
174
|
return [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
175
|
+
high >> 8,
|
|
176
|
+
high & 255,
|
|
177
|
+
low >> 8,
|
|
178
|
+
low & 255
|
|
115
179
|
].join(".");
|
|
116
180
|
}
|
|
181
|
+
function ipv4MatchesCidr(parts, base, prefix) {
|
|
182
|
+
const mask = prefix === 0 ? 0 : 4294967295 << 32 - prefix >>> 0;
|
|
183
|
+
return (ipv4ToNumber(parts) & mask) >>> 0 === (ipv4ToNumber(base) & mask) >>> 0;
|
|
184
|
+
}
|
|
185
|
+
function ipv4ToNumber(parts) {
|
|
186
|
+
return (parts[0] << 24 >>> 0 | parts[1] << 16 | parts[2] << 8 | parts[3]) >>> 0;
|
|
187
|
+
}
|
|
188
|
+
function ipv6MatchesCidr(words, base, prefix) {
|
|
189
|
+
const fullWords = Math.floor(prefix / 16);
|
|
190
|
+
for (let index = 0;index < fullWords; index += 1) {
|
|
191
|
+
if (words[index] !== base[index])
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
const remainingBits = prefix % 16;
|
|
195
|
+
if (remainingBits === 0)
|
|
196
|
+
return true;
|
|
197
|
+
const mask = 65535 << 16 - remainingBits & 65535;
|
|
198
|
+
return (words[fullWords] & mask) === (base[fullWords] & mask);
|
|
199
|
+
}
|
|
117
200
|
function parseIpv6Words(value) {
|
|
118
201
|
let ip = value.toLowerCase();
|
|
119
202
|
const zoneIndex = ip.indexOf("%");
|
package/dist/target-policy.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { CreateMonitorInput, Monitor } from "./types.js";
|
|
2
2
|
type MonitorTarget = Pick<CreateMonitorInput | Monitor, "kind" | "url" | "host" | "port">;
|
|
3
|
+
export interface HostedResolvedAddress {
|
|
4
|
+
address: string;
|
|
5
|
+
family?: 4 | 6 | number;
|
|
6
|
+
}
|
|
3
7
|
export declare function assertHostedTargetAllowed(target: MonitorTarget): void;
|
|
4
8
|
export declare function assertHostedHttpUrlAllowed(value: string): void;
|
|
5
9
|
export declare function assertHostedHostAllowed(hostname: string, label?: string): void;
|
|
10
|
+
export declare function assertHostedResolvedAddressesAllowed(hostname: string, addresses: HostedResolvedAddress[], label?: string): void;
|
|
11
|
+
export declare function assertHostedAddressAllowed(address: string, label?: string): void;
|
|
12
|
+
export declare function normalizeHostedHost(hostname: string): string;
|
|
6
13
|
export {};
|
|
7
14
|
//# sourceMappingURL=target-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target-policy.d.ts","sourceRoot":"","sources":["../src/target-policy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE9D,KAAK,aAAa,GAAG,IAAI,CAAC,kBAAkB,GAAG,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"target-policy.d.ts","sourceRoot":"","sources":["../src/target-policy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE9D,KAAK,aAAa,GAAG,IAAI,CAAC,kBAAkB,GAAG,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAuC1F,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;CACzB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAerE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAiB9D;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,SAAS,GAAG,IAAI,CAgB9E;AAED,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB,EAAE,EAAE,KAAK,SAAqB,GAAG,IAAI,CAO3I;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAqB,GAAG,IAAI,CAY5F;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|
package/dist/types.d.ts
CHANGED
|
@@ -216,7 +216,32 @@ export interface ListAuditEventsOptions {
|
|
|
216
216
|
resourceId?: string;
|
|
217
217
|
limit?: number;
|
|
218
218
|
}
|
|
219
|
-
export type CheckEvidence = BrowserPageEvidence;
|
|
219
|
+
export type CheckEvidence = BrowserPageEvidence | HttpTargetPolicyEvidence;
|
|
220
|
+
export interface HttpTargetPolicyEvidence {
|
|
221
|
+
kind: "http_target_policy";
|
|
222
|
+
mode: "hosted";
|
|
223
|
+
finalUrl: string | null;
|
|
224
|
+
redirectCount: number;
|
|
225
|
+
decisions: HttpTargetPolicyDecision[];
|
|
226
|
+
redacted: boolean;
|
|
227
|
+
redactionStatus: "redacted";
|
|
228
|
+
retentionClass: "short";
|
|
229
|
+
}
|
|
230
|
+
export interface HttpTargetPolicyDecision {
|
|
231
|
+
stage: "request" | "redirect";
|
|
232
|
+
decision: "allowed" | "blocked";
|
|
233
|
+
url: string;
|
|
234
|
+
host: string;
|
|
235
|
+
targetClass: "public_http";
|
|
236
|
+
probeClass: "public";
|
|
237
|
+
protocol: "http:" | "https:";
|
|
238
|
+
resolvedAddresses: Array<{
|
|
239
|
+
address: string;
|
|
240
|
+
family: 4 | 6;
|
|
241
|
+
}>;
|
|
242
|
+
ruleId: string;
|
|
243
|
+
reason: string | null;
|
|
244
|
+
}
|
|
220
245
|
export interface BrowserPageEvidence {
|
|
221
246
|
kind: "browser_page";
|
|
222
247
|
finalUrl: string | null;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,cAAc,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,KAAK,CAAC;AAC/C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE/C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,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AAI,EAAE,MAAM,IAAI,CAAC;CAClB"}
|
|
@@ -80,8 +80,10 @@ The plan expects:
|
|
|
80
80
|
- Encrypted EFS file system, access point, mount targets, and AWS Backup plan
|
|
81
81
|
for `HASNA_UPTIME_HOSTED_SQLITE_DB=/data/uptime/uptime.db`.
|
|
82
82
|
- S3 bucket for redacted browser evidence and generated report artifacts.
|
|
83
|
-
- Secrets Manager
|
|
84
|
-
|
|
83
|
+
- Secrets Manager refs for app env, hosted token, probe config, and reporting
|
|
84
|
+
channel refs. If any ECS secret uses an SSM Parameter Store ARN, add `ssm` to
|
|
85
|
+
`interface_vpc_endpoint_services` or document the approved alternate egress
|
|
86
|
+
path before running private-only tasks.
|
|
85
87
|
- CloudWatch log groups for every component plus initial web 5xx/unhealthy
|
|
86
88
|
alarms. Scheduler-stall, stale-probe, and report-delivery alarms remain
|
|
87
89
|
blocked until those workers emit cloud metrics.
|
|
@@ -176,8 +178,12 @@ Before setting `desired_counts.web = 1`, verify:
|
|
|
176
178
|
- `HASNA_UPTIME_ALLOWED_ORIGINS` matches the public HTTPS edge origin;
|
|
177
179
|
- CloudFront origin access is distribution-bound, not just narrowed to
|
|
178
180
|
CloudFront origin-facing ranges;
|
|
179
|
-
- web egress to ECR, Secrets Manager, CloudWatch Logs, S3, EFS, and any
|
|
180
|
-
endpoints has been proven
|
|
181
|
+
- web egress to ECR, Secrets Manager or SSM, CloudWatch Logs, S3, EFS, and any
|
|
182
|
+
required endpoints has been proven from a real ECS task. Terraform endpoint
|
|
183
|
+
ids, route tables, and security-group rules are creation evidence only; the
|
|
184
|
+
scale-up evidence must include image pull, secret injection, log delivery, S3
|
|
185
|
+
access, and EFS mount checks through the selected NAT or private-endpoint
|
|
186
|
+
path;
|
|
181
187
|
- scheduler, public-probe, reporter, and migration remain at `0`.
|
|
182
188
|
|
|
183
189
|
Scale only the web task, then capture the ECS deployment id and task definition
|
|
@@ -369,11 +375,11 @@ routes are backed by cloud check jobs and cloud audit rows.
|
|
|
369
375
|
URLs, or probe private keys in task definitions. Use ECS `secrets.valueFrom`
|
|
370
376
|
refs such as `HASNA_UPTIME_HOSTED_TOKEN`.
|
|
371
377
|
- Do not run public probe workers against private targets.
|
|
372
|
-
- Do not enable public probe workers until
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
378
|
+
- Do not enable public probe workers until their cloud check-job path calls
|
|
379
|
+
`runHostedHttpCheck`, records target-policy decision evidence, and passes AWS
|
|
380
|
+
smokes for denied DNS answers, redirect-to-denied targets, and address
|
|
381
|
+
pinning. The SDK runner now handles execution-time DNS and redirect
|
|
382
|
+
enforcement, but it is not active until the worker is wired to it.
|
|
377
383
|
- Do not enable scheduler, public-probe, reporter, or migration workers against
|
|
378
384
|
the EFS SQLite bridge; those services need Postgres/cloud leases first.
|
|
379
385
|
- Do not expose dashboard/API routes without hosted auth and workspace checks.
|
package/infra/aws/README.md
CHANGED
|
@@ -52,11 +52,31 @@ type, and cost-center tags. Set `monthly_budget_limit_usd` plus
|
|
|
52
52
|
forecasted and actual spend alerts. Leaving the email list empty skips budget
|
|
53
53
|
creation and is not sufficient for live scale-out approval.
|
|
54
54
|
|
|
55
|
+
Private AWS API egress can be pinned through opt-in VPC endpoints by setting
|
|
56
|
+
`enable_private_vpc_endpoints = true` and passing `private_route_table_ids`.
|
|
57
|
+
This creates interface endpoints for ECR API, ECR Docker, CloudWatch Logs, and
|
|
58
|
+
Secrets Manager, plus an S3 gateway endpoint when route tables are supplied. The
|
|
59
|
+
default is `false` so package consumers do not create endpoint hourly cost
|
|
60
|
+
without explicit infra-owner approval. The S3 gateway endpoint is required for
|
|
61
|
+
private ECR image layer pulls; the module adds S3 managed-prefix-list egress for
|
|
62
|
+
web and non-public worker security groups when the gateway endpoint is enabled.
|
|
63
|
+
Endpoint policies are scoped to the Open Uptime repository, log groups,
|
|
64
|
+
configured secret refs, KMS key, evidence bucket, and the regional ECR layer
|
|
65
|
+
bucket.
|
|
66
|
+
|
|
67
|
+
Interface endpoint private DNS is VPC-wide. In shared VPCs, either keep endpoint
|
|
68
|
+
creation in the approved networking root, or pass
|
|
69
|
+
`additional_vpc_endpoint_source_security_group_ids` for every workload that must
|
|
70
|
+
keep using those private DNS names. If any ECS secret ref uses SSM Parameter
|
|
71
|
+
Store instead of Secrets Manager, add `ssm` to
|
|
72
|
+
`interface_vpc_endpoint_services` or keep an approved non-endpoint egress path.
|
|
73
|
+
|
|
55
74
|
## Current Blockers
|
|
56
75
|
|
|
57
76
|
- Hosted production auth/RBAC still needs scoped, revocable credentials.
|
|
58
|
-
- Public probe runtime
|
|
59
|
-
|
|
77
|
+
- Public probe runtime has SDK-level hosted HTTP target-policy enforcement, but
|
|
78
|
+
the public-probe worker and cloud check-job lease path are still disabled until
|
|
79
|
+
they are wired to that runner and validated in AWS.
|
|
60
80
|
- Hosted private-probe enrollment/heartbeat/revocation is still
|
|
61
81
|
fail-closed.
|
|
62
82
|
|
package/infra/aws/main.tf
CHANGED
|
@@ -14,6 +14,7 @@ provider "aws" {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
data "aws_caller_identity" "current" {}
|
|
17
|
+
data "aws_partition" "current" {}
|
|
17
18
|
|
|
18
19
|
locals {
|
|
19
20
|
prefix = "${var.service_name}-${var.stage}"
|
|
@@ -63,6 +64,21 @@ locals {
|
|
|
63
64
|
AppType = var.app_type
|
|
64
65
|
CostCenter = var.cost_center
|
|
65
66
|
}
|
|
67
|
+
s3_gateway_endpoint_enabled = var.enable_private_vpc_endpoints && contains(var.gateway_vpc_endpoint_services, "s3") && length(var.private_route_table_ids) > 0
|
|
68
|
+
endpoint_secret_refs = distinct(flatten([for service in values(local.services) : values(service.secrets)]))
|
|
69
|
+
secretsmanager_secret_refs = [for ref in local.endpoint_secret_refs : ref if can(regex(":secretsmanager:", ref))]
|
|
70
|
+
ssm_parameter_refs = [for ref in local.endpoint_secret_refs : ref if can(regex(":ssm:", ref))]
|
|
71
|
+
secretsmanager_policy_refs = (
|
|
72
|
+
length(local.secretsmanager_secret_refs) > 0
|
|
73
|
+
? local.secretsmanager_secret_refs
|
|
74
|
+
: ["arn:${data.aws_partition.current.partition}:secretsmanager:${var.region}:${data.aws_caller_identity.current.account_id}:secret:${local.prefix}/no-secretsmanager-refs-configured-*"]
|
|
75
|
+
)
|
|
76
|
+
ssm_policy_refs = (
|
|
77
|
+
length(local.ssm_parameter_refs) > 0
|
|
78
|
+
? local.ssm_parameter_refs
|
|
79
|
+
: ["arn:${data.aws_partition.current.partition}:ssm:${var.region}:${data.aws_caller_identity.current.account_id}:parameter/${local.prefix}/no-ssm-refs-configured"]
|
|
80
|
+
)
|
|
81
|
+
service_log_group_arns = [for group in aws_cloudwatch_log_group.service : "${group.arn}:*"]
|
|
66
82
|
}
|
|
67
83
|
|
|
68
84
|
data "aws_vpc" "target" {
|
|
@@ -383,6 +399,278 @@ resource "aws_security_group_rule" "worker_egress" {
|
|
|
383
399
|
cidr_blocks = each.key == "public-probe" ? ["0.0.0.0/0"] : [data.aws_vpc.target.cidr_block]
|
|
384
400
|
}
|
|
385
401
|
|
|
402
|
+
resource "aws_security_group_rule" "web_s3_gateway_egress" {
|
|
403
|
+
count = local.s3_gateway_endpoint_enabled ? 1 : 0
|
|
404
|
+
|
|
405
|
+
type = "egress"
|
|
406
|
+
description = "HTTPS to S3 gateway endpoint prefix list"
|
|
407
|
+
security_group_id = aws_security_group.web.id
|
|
408
|
+
from_port = 443
|
|
409
|
+
to_port = 443
|
|
410
|
+
protocol = "tcp"
|
|
411
|
+
prefix_list_ids = [aws_vpc_endpoint.gateway["s3"].prefix_list_id]
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
resource "aws_security_group_rule" "worker_s3_gateway_egress" {
|
|
415
|
+
for_each = local.s3_gateway_endpoint_enabled ? {
|
|
416
|
+
for key, value in aws_security_group.worker : key => value if key != "public-probe"
|
|
417
|
+
} : {}
|
|
418
|
+
|
|
419
|
+
type = "egress"
|
|
420
|
+
description = "HTTPS to S3 gateway endpoint prefix list"
|
|
421
|
+
security_group_id = each.value.id
|
|
422
|
+
from_port = 443
|
|
423
|
+
to_port = 443
|
|
424
|
+
protocol = "tcp"
|
|
425
|
+
prefix_list_ids = [aws_vpc_endpoint.gateway["s3"].prefix_list_id]
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
resource "aws_security_group" "vpc_endpoints" {
|
|
429
|
+
count = var.enable_private_vpc_endpoints ? 1 : 0
|
|
430
|
+
name = "${local.prefix}-vpc-endpoints-sg"
|
|
431
|
+
description = "Open Uptime interface VPC endpoints"
|
|
432
|
+
vpc_id = data.aws_vpc.target.id
|
|
433
|
+
tags = merge(local.tags, { Component = "vpc-endpoints" })
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
resource "aws_security_group_rule" "vpc_endpoints_from_web" {
|
|
437
|
+
count = var.enable_private_vpc_endpoints ? 1 : 0
|
|
438
|
+
type = "ingress"
|
|
439
|
+
description = "HTTPS from Open Uptime web tasks"
|
|
440
|
+
security_group_id = aws_security_group.vpc_endpoints[0].id
|
|
441
|
+
from_port = 443
|
|
442
|
+
to_port = 443
|
|
443
|
+
protocol = "tcp"
|
|
444
|
+
source_security_group_id = aws_security_group.web.id
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
resource "aws_security_group_rule" "vpc_endpoints_from_worker" {
|
|
448
|
+
for_each = var.enable_private_vpc_endpoints ? aws_security_group.worker : {}
|
|
449
|
+
|
|
450
|
+
type = "ingress"
|
|
451
|
+
description = "HTTPS from Open Uptime ${each.key} tasks"
|
|
452
|
+
security_group_id = aws_security_group.vpc_endpoints[0].id
|
|
453
|
+
from_port = 443
|
|
454
|
+
to_port = 443
|
|
455
|
+
protocol = "tcp"
|
|
456
|
+
source_security_group_id = each.value.id
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
resource "aws_security_group_rule" "vpc_endpoints_from_additional_sources" {
|
|
460
|
+
for_each = var.enable_private_vpc_endpoints ? toset(var.additional_vpc_endpoint_source_security_group_ids) : toset([])
|
|
461
|
+
|
|
462
|
+
type = "ingress"
|
|
463
|
+
description = "HTTPS from additional approved source security group"
|
|
464
|
+
security_group_id = aws_security_group.vpc_endpoints[0].id
|
|
465
|
+
from_port = 443
|
|
466
|
+
to_port = 443
|
|
467
|
+
protocol = "tcp"
|
|
468
|
+
source_security_group_id = each.value
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
data "aws_iam_policy_document" "vpc_endpoint_ecr_api" {
|
|
472
|
+
statement {
|
|
473
|
+
sid = "AllowEcrAuthorization"
|
|
474
|
+
actions = ["ecr:GetAuthorizationToken"]
|
|
475
|
+
resources = ["*"]
|
|
476
|
+
|
|
477
|
+
principals {
|
|
478
|
+
type = "*"
|
|
479
|
+
identifiers = ["*"]
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
statement {
|
|
484
|
+
sid = "AllowOpenUptimeRepositoryRead"
|
|
485
|
+
actions = [
|
|
486
|
+
"ecr:BatchCheckLayerAvailability",
|
|
487
|
+
"ecr:BatchGetImage",
|
|
488
|
+
"ecr:DescribeImages",
|
|
489
|
+
"ecr:DescribeRepositories",
|
|
490
|
+
"ecr:GetDownloadUrlForLayer",
|
|
491
|
+
]
|
|
492
|
+
resources = [aws_ecr_repository.open_uptime.arn]
|
|
493
|
+
|
|
494
|
+
principals {
|
|
495
|
+
type = "*"
|
|
496
|
+
identifiers = ["*"]
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
data "aws_iam_policy_document" "vpc_endpoint_ecr_dkr" {
|
|
502
|
+
statement {
|
|
503
|
+
sid = "AllowOpenUptimeRegistryRead"
|
|
504
|
+
actions = [
|
|
505
|
+
"ecr:BatchCheckLayerAvailability",
|
|
506
|
+
"ecr:BatchGetImage",
|
|
507
|
+
"ecr:GetDownloadUrlForLayer",
|
|
508
|
+
]
|
|
509
|
+
resources = [aws_ecr_repository.open_uptime.arn]
|
|
510
|
+
|
|
511
|
+
principals {
|
|
512
|
+
type = "*"
|
|
513
|
+
identifiers = ["*"]
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
data "aws_iam_policy_document" "vpc_endpoint_logs" {
|
|
519
|
+
statement {
|
|
520
|
+
sid = "AllowOpenUptimeLogDelivery"
|
|
521
|
+
actions = [
|
|
522
|
+
"logs:CreateLogStream",
|
|
523
|
+
"logs:DescribeLogStreams",
|
|
524
|
+
"logs:PutLogEvents",
|
|
525
|
+
]
|
|
526
|
+
resources = local.service_log_group_arns
|
|
527
|
+
|
|
528
|
+
principals {
|
|
529
|
+
type = "*"
|
|
530
|
+
identifiers = ["*"]
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
data "aws_iam_policy_document" "vpc_endpoint_secretsmanager" {
|
|
536
|
+
statement {
|
|
537
|
+
sid = "AllowOpenUptimeSecretReads"
|
|
538
|
+
actions = [
|
|
539
|
+
"secretsmanager:DescribeSecret",
|
|
540
|
+
"secretsmanager:GetSecretValue",
|
|
541
|
+
]
|
|
542
|
+
resources = local.secretsmanager_policy_refs
|
|
543
|
+
|
|
544
|
+
principals {
|
|
545
|
+
type = "*"
|
|
546
|
+
identifiers = ["*"]
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
data "aws_iam_policy_document" "vpc_endpoint_ssm" {
|
|
552
|
+
statement {
|
|
553
|
+
sid = "AllowOpenUptimeParameterReads"
|
|
554
|
+
actions = [
|
|
555
|
+
"ssm:GetParameter",
|
|
556
|
+
"ssm:GetParameters",
|
|
557
|
+
]
|
|
558
|
+
resources = local.ssm_policy_refs
|
|
559
|
+
|
|
560
|
+
principals {
|
|
561
|
+
type = "*"
|
|
562
|
+
identifiers = ["*"]
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
data "aws_iam_policy_document" "vpc_endpoint_sts" {
|
|
568
|
+
statement {
|
|
569
|
+
sid = "AllowCallerIdentity"
|
|
570
|
+
actions = ["sts:GetCallerIdentity"]
|
|
571
|
+
resources = ["*"]
|
|
572
|
+
|
|
573
|
+
principals {
|
|
574
|
+
type = "*"
|
|
575
|
+
identifiers = ["*"]
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
data "aws_iam_policy_document" "vpc_endpoint_kms" {
|
|
581
|
+
statement {
|
|
582
|
+
sid = "AllowOpenUptimeKeyUse"
|
|
583
|
+
actions = [
|
|
584
|
+
"kms:Decrypt",
|
|
585
|
+
"kms:DescribeKey",
|
|
586
|
+
"kms:GenerateDataKey*",
|
|
587
|
+
]
|
|
588
|
+
resources = [var.kms_key_arn]
|
|
589
|
+
|
|
590
|
+
principals {
|
|
591
|
+
type = "*"
|
|
592
|
+
identifiers = ["*"]
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
data "aws_iam_policy_document" "vpc_endpoint_s3" {
|
|
598
|
+
statement {
|
|
599
|
+
sid = "AllowOpenUptimeEvidenceBucket"
|
|
600
|
+
actions = [
|
|
601
|
+
"s3:AbortMultipartUpload",
|
|
602
|
+
"s3:GetBucketLocation",
|
|
603
|
+
"s3:GetObject",
|
|
604
|
+
"s3:ListBucket",
|
|
605
|
+
"s3:PutObject",
|
|
606
|
+
]
|
|
607
|
+
resources = [
|
|
608
|
+
aws_s3_bucket.evidence.arn,
|
|
609
|
+
"${aws_s3_bucket.evidence.arn}/*",
|
|
610
|
+
]
|
|
611
|
+
|
|
612
|
+
principals {
|
|
613
|
+
type = "*"
|
|
614
|
+
identifiers = ["*"]
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
statement {
|
|
619
|
+
sid = "AllowEcrLayerBucket"
|
|
620
|
+
actions = ["s3:GetObject"]
|
|
621
|
+
resources = ["arn:${data.aws_partition.current.partition}:s3:::prod-${var.region}-starport-layer-bucket/*"]
|
|
622
|
+
|
|
623
|
+
principals {
|
|
624
|
+
type = "*"
|
|
625
|
+
identifiers = ["*"]
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
resource "aws_vpc_endpoint" "interface" {
|
|
631
|
+
for_each = var.enable_private_vpc_endpoints ? toset(var.interface_vpc_endpoint_services) : toset([])
|
|
632
|
+
|
|
633
|
+
vpc_id = data.aws_vpc.target.id
|
|
634
|
+
service_name = "com.amazonaws.${var.region}.${each.key}"
|
|
635
|
+
vpc_endpoint_type = "Interface"
|
|
636
|
+
subnet_ids = var.private_subnet_ids
|
|
637
|
+
security_group_ids = [aws_security_group.vpc_endpoints[0].id]
|
|
638
|
+
private_dns_enabled = true
|
|
639
|
+
policy = {
|
|
640
|
+
"ecr.api" = data.aws_iam_policy_document.vpc_endpoint_ecr_api.json
|
|
641
|
+
"ecr.dkr" = data.aws_iam_policy_document.vpc_endpoint_ecr_dkr.json
|
|
642
|
+
logs = data.aws_iam_policy_document.vpc_endpoint_logs.json
|
|
643
|
+
secretsmanager = data.aws_iam_policy_document.vpc_endpoint_secretsmanager.json
|
|
644
|
+
ssm = data.aws_iam_policy_document.vpc_endpoint_ssm.json
|
|
645
|
+
sts = data.aws_iam_policy_document.vpc_endpoint_sts.json
|
|
646
|
+
kms = data.aws_iam_policy_document.vpc_endpoint_kms.json
|
|
647
|
+
}[each.key]
|
|
648
|
+
|
|
649
|
+
tags = merge(local.tags, {
|
|
650
|
+
Name = "${local.prefix}-${replace(each.key, ".", "-")}-endpoint"
|
|
651
|
+
Component = "vpc-endpoint"
|
|
652
|
+
Endpoint = each.key
|
|
653
|
+
})
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
resource "aws_vpc_endpoint" "gateway" {
|
|
657
|
+
for_each = var.enable_private_vpc_endpoints && length(var.private_route_table_ids) > 0 ? toset(var.gateway_vpc_endpoint_services) : toset([])
|
|
658
|
+
|
|
659
|
+
vpc_id = data.aws_vpc.target.id
|
|
660
|
+
service_name = "com.amazonaws.${var.region}.${each.key}"
|
|
661
|
+
vpc_endpoint_type = "Gateway"
|
|
662
|
+
route_table_ids = var.private_route_table_ids
|
|
663
|
+
policy = {
|
|
664
|
+
s3 = data.aws_iam_policy_document.vpc_endpoint_s3.json
|
|
665
|
+
}[each.key]
|
|
666
|
+
|
|
667
|
+
tags = merge(local.tags, {
|
|
668
|
+
Name = "${local.prefix}-${each.key}-endpoint"
|
|
669
|
+
Component = "vpc-endpoint"
|
|
670
|
+
Endpoint = each.key
|
|
671
|
+
})
|
|
672
|
+
}
|
|
673
|
+
|
|
386
674
|
resource "aws_security_group" "efs" {
|
|
387
675
|
name = "${local.prefix}-efs-sg"
|
|
388
676
|
description = "Open Uptime EFS data store"
|
package/infra/aws/outputs.tf
CHANGED
|
@@ -75,3 +75,10 @@ output "service_names" {
|
|
|
75
75
|
[for service in aws_ecs_service.worker : service.name],
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
output "vpc_endpoint_ids" {
|
|
80
|
+
value = {
|
|
81
|
+
interface = { for service, endpoint in aws_vpc_endpoint.interface : service => endpoint.id }
|
|
82
|
+
gateway = { for service, endpoint in aws_vpc_endpoint.gateway : service => endpoint.id }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -14,8 +14,9 @@ protected_access_mode = "cloudfront_default_domain"
|
|
|
14
14
|
public_subnet_ids = ["subnet-replace-public-a", "subnet-replace-public-b"]
|
|
15
15
|
alb_ingress_cidr_blocks = []
|
|
16
16
|
private_subnet_ids = ["subnet-replace-private-a", "subnet-replace-private-b"]
|
|
17
|
+
private_route_table_ids = ["rtb-replace-private"]
|
|
17
18
|
container_image = "123456789012.dkr.ecr.us-east-1.amazonaws.com/open-uptime@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
18
|
-
runtime_package_version = "0.1.
|
|
19
|
+
runtime_package_version = "0.1.13"
|
|
19
20
|
certificate_arn = null
|
|
20
21
|
hosted_zone_id = null
|
|
21
22
|
app_env_secret_arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:open-uptime/prod/app/env"
|
|
@@ -25,6 +26,8 @@ reporting_secret_arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret
|
|
|
25
26
|
kms_key_arn = "arn:aws:kms:us-east-1:123456789012:key/00000000-0000-0000-0000-000000000000"
|
|
26
27
|
alarm_actions = []
|
|
27
28
|
monthly_budget_limit_usd = 0
|
|
29
|
+
enable_private_vpc_endpoints = false
|
|
30
|
+
additional_vpc_endpoint_source_security_group_ids = []
|
|
28
31
|
|
|
29
32
|
desired_counts = {
|
|
30
33
|
web = 0
|