@jaypie/mcp 0.8.158 → 0.8.160
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 +11 -0
- package/dist/assets.d.ts +25 -2
- package/dist/assets.js +27 -6
- package/dist/assets.js.map +1 -1
- package/dist/suites/docs/help.d.ts +1 -1
- package/dist/suites/docs/help.js +17 -0
- package/dist/suites/docs/help.js.map +1 -1
- package/dist/suites/docs/index.d.ts +2 -0
- package/dist/suites/docs/index.js +144 -28
- package/dist/suites/docs/index.js.map +1 -1
- package/package.json +1 -1
- package/release-notes/constructs/1.2.87.md +19 -0
- package/release-notes/constructs/1.2.88.md +67 -0
- package/release-notes/mcp/0.8.159.md +50 -0
- package/release-notes/mcp/0.8.160.md +19 -0
- package/release-notes/testkit/1.2.74.md +12 -0
- package/release-notes/tildeskill/0.3.5.md +34 -0
- package/skills/JaypieDatadogForwarder.md +15 -0
- package/skills/cdk.md +50 -4
- package/skills/cicd-actions.md +7 -9
- package/skills/cicd-deploy.md +18 -15
- package/skills/cicd-environments.md +5 -1
- package/skills/debugging.md +6 -2
- package/skills/dynamodb.md +4 -0
- package/skills/github.md +1 -1
- package/skills/jaypie.md +1 -1
- package/skills/mcp.md +16 -1
- package/skills/migrations.md +6 -0
- package/skills/recipe-api-server.md +2 -1
- package/skills/releasenotes.md +7 -4
- package/skills/tildeskill.md +77 -2
- package/skills/variables.md +3 -1
- package/skills/waf.md +45 -0
- package/skills/web.md +25 -1
package/skills/waf.md
CHANGED
|
@@ -53,6 +53,51 @@ new JaypieDistribution(this, "Dist", {
|
|
|
53
53
|
Cost: $5/month per WebACL + $1/month per rule + $0.60 per million requests. That
|
|
54
54
|
cost is why WAF is opt-in; set `waf: true` (or a config object) to opt in.
|
|
55
55
|
|
|
56
|
+
## Log bucket
|
|
57
|
+
|
|
58
|
+
The construct-created WAF log bucket blocks all public access, enforces SSL, is
|
|
59
|
+
versioned, uses SSE-S3, retains objects for `logRetention` (365 days by
|
|
60
|
+
default), and carries `RemovalPolicy.RETAIN` with no auto-delete. It survives
|
|
61
|
+
stack deletion; delete it by hand when tearing an environment down.
|
|
62
|
+
|
|
63
|
+
CloudFormation owns the whole bucket policy, including the two
|
|
64
|
+
`delivery.logs.amazonaws.com` delivery statements. A policy statement added to
|
|
65
|
+
that bucket out of band (console, CLI, another stack) is discarded on the next
|
|
66
|
+
deploy.
|
|
67
|
+
|
|
68
|
+
A consumer-supplied `logBucket` is used as given: it needs its own hardening and
|
|
69
|
+
its own delivery policy.
|
|
70
|
+
|
|
71
|
+
## Redact headers from WAF logs
|
|
72
|
+
|
|
73
|
+
WAF logs record every request header. Jaypie always redacts
|
|
74
|
+
`authorization`, `cookie`, `x-amz-content-sha256`, and `x-api-key`
|
|
75
|
+
(`DEFAULT_WAF_REDACTED_HEADERS`). `redactedHeaders` names more:
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
new JaypieDistribution(this, "Dist", {
|
|
79
|
+
handler,
|
|
80
|
+
waf: { name: "api", redactedHeaders: ["x-session-token"] },
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- The list **merges** with the defaults rather than replacing them, so adding a
|
|
85
|
+
header can only ever redact more. There is no way to un-redact a default.
|
|
86
|
+
- Names are compared case-insensitively, as WAF matches them, so naming a
|
|
87
|
+
default again does not duplicate it.
|
|
88
|
+
- `x-amz-content-sha256` is in the default because `originAccessControl`
|
|
89
|
+
requires clients to send a SHA-256 of the request body. For a low-entropy body
|
|
90
|
+
that hash is a body fingerprint.
|
|
91
|
+
- `redactedFields` passes `wafv2.CfnLoggingConfiguration.FieldToMatchProperty`
|
|
92
|
+
entries (query string, URI path, JSON body) through and layers on top of the
|
|
93
|
+
redacted headers.
|
|
94
|
+
- WAF caps the combined list at 100 entries; exceeding it throws a
|
|
95
|
+
`ConfigurationError` at synth.
|
|
96
|
+
|
|
97
|
+
`waf.logRetention` overrides the construct's `logRetention` for the WAF log
|
|
98
|
+
bucket alone, so WAF logs and CloudFront access logs can keep different
|
|
99
|
+
retention.
|
|
100
|
+
|
|
56
101
|
## Override specific managed rule actions
|
|
57
102
|
|
|
58
103
|
Flip a named sub-rule from `block` to `count` everywhere (e.g. allow large
|
package/skills/web.md
CHANGED
|
@@ -42,14 +42,16 @@ new JaypieWebDeploymentBucket(this, "Web", {
|
|
|
42
42
|
| `defaultBehavior` | `Partial<BehaviorOptions>` | undefined — merged over the construct's default behavior; keys given win |
|
|
43
43
|
| `destination` | `LambdaDestination \| boolean` | `true` (Datadog forwarder for access-log bucket notifications) |
|
|
44
44
|
| `logBucket` | `IBucket \| string \| { exportName } \| true` | undefined — creates a new bucket if `destination !== false` |
|
|
45
|
+
| `logRetention` | `Duration \| number` | `Duration.days(365)` — retention for the log buckets the construct creates; `waf.logRetention` overrides it for the WAF bucket |
|
|
45
46
|
| `name` | `string` | `constructEnvName(component)` |
|
|
47
|
+
| `originAccessControl` | `boolean` | `false` — serve the bucket privately through the S3 REST endpoint with CloudFront OAC |
|
|
46
48
|
| `responseHeadersPolicy` | `IResponseHeadersPolicy` | undefined — full override; bypasses default security headers |
|
|
47
49
|
| `roleTag` | `string` | `CDK.ROLE.HOSTING` |
|
|
48
50
|
| `securityHeaders` | `boolean \| SecurityHeadersOverrides` | `true` |
|
|
49
51
|
| `spa` | `boolean` | `false` — viewer-request rewrite of extension-less URIs to `/index.html` |
|
|
50
52
|
| `waf` | `boolean \| JaypieWebDeploymentBucketWafConfig` | `false` (when enabled, WAF name defaults to construct id) |
|
|
51
53
|
|
|
52
|
-
Also accepts all `s3.BucketProps`
|
|
54
|
+
Also accepts all `s3.BucketProps`. With `originAccessControl: false` (the default) the bucket is a public S3 website: `autoDeleteObjects: true`, `publicReadAccess: true`, `websiteIndexDocument: "index.html"`, `websiteErrorDocument: "index.html"` — which renders an SPA deep link but answers 404; see [Single-Page App](#single-page-app). With `originAccessControl: true` the bucket is private; see [Origin Access Control](#origin-access-control).
|
|
53
55
|
|
|
54
56
|
### Bucket Name
|
|
55
57
|
|
|
@@ -67,6 +69,7 @@ Changing `component` or `name` on a deployed stack renames the bucket, which rep
|
|
|
67
69
|
- Default behavior: S3 static website origin, `REDIRECT_TO_HTTPS`. `CACHING_DISABLED` outside production; `CACHING_OPTIMIZED` in production (`isProductionEnv()`), so hashed assets get edge cache. The response headers policy sets `Cache-Control: no-store` so browsers still revalidate.
|
|
68
70
|
- No `/*` behavior is created. Paths registered afterward with `distribution.addBehavior("/app/*", origin)` are evaluated ahead of the default behavior and match in every environment — a static site and a Lambda surface can share one distribution.
|
|
69
71
|
- Access logs land in a CloudFront log bucket with Datadog forwarding by default. Set `destination: false` to skip notifications, or pass `logBucket: <existing>` to reuse a bucket.
|
|
72
|
+
- The construct-created log buckets block all public access, enforce SSL, are versioned, use SSE-S3, retain objects for `logRetention` (365 days by default), and carry `RemovalPolicy.RETAIN` with no auto-delete. They survive stack deletion; delete them by hand when tearing an environment down.
|
|
70
73
|
|
|
71
74
|
```typescript
|
|
72
75
|
const web = new JaypieWebDeploymentBucket(this, "Web", { host, zone });
|
|
@@ -107,6 +110,27 @@ new JaypieWebDeploymentBucket(this, "App", {
|
|
|
107
110
|
- Exposed as `.spaFunction`. Works without `host` and `zone`, so a deep link resolves on the CloudFront default domain before DNS is wired.
|
|
108
111
|
- Combining `spa: true` with a caller-supplied **viewer-request** association throws `ConfigurationError` at synth; CloudFront permits one function per event type. Other event types (for example viewer-response) compose, with the rewrite appended last.
|
|
109
112
|
|
|
113
|
+
### Origin Access Control
|
|
114
|
+
|
|
115
|
+
The default bucket is a public S3 website endpoint. CloudFront cannot use origin access control against a website endpoint, so the bucket stays readable around CloudFront and the WAF.
|
|
116
|
+
|
|
117
|
+
`originAccessControl: true` serves the bucket privately:
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
new JaypieWebDeploymentBucket(this, "Web", {
|
|
121
|
+
host,
|
|
122
|
+
originAccessControl: true,
|
|
123
|
+
spa: true,
|
|
124
|
+
zone,
|
|
125
|
+
});
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- The bucket gets `BlockPublicAccess.BLOCK_ALL` and `enforceSSL: true`, with no ACL, no public read, and no website configuration.
|
|
129
|
+
- The default behavior uses `origins.S3BucketOrigin.withOriginAccessControl(bucket)`, and the distribution sets `defaultRootObject: "index.html"`.
|
|
130
|
+
- Combining it with `publicReadAccess: true`, `websiteIndexDocument`, or `websiteErrorDocument` through `bucketProps` throws `ConfigurationError` at synth. Other bucket props still compose.
|
|
131
|
+
- **Pair it with `spa: true`.** The REST endpoint has no error document, and OAC grants only `s3:GetObject`, so a miss returns `403 AccessDenied` rather than the app shell. The SPA function rewrites extension-less deep links before they reach the origin, so they never miss.
|
|
132
|
+
- `isWebsite` is `false` and `bucketWebsiteUrl` no longer addresses a live endpoint.
|
|
133
|
+
|
|
110
134
|
### Security Headers
|
|
111
135
|
|
|
112
136
|
Same defaults as `JaypieDistribution`: HSTS, X-Frame-Options, CSP, Referrer-Policy, Permissions-Policy, Cross-Origin-* headers, and Server header removal (applied via a `ResponseHeadersPolicy` on the default behavior). Override the same way:
|