Commit Graph

17 Commits

Author SHA1 Message Date
jwoa95 40ee0e7822 feat(cloudfront): forward viewer headers, cookies and query strings per origin request policy (#4230)
Custom origins only ever received the origin custom headers: the serving
controller built each origin request from them alone and dropped the
query string, whatever cache policy, origin request policy or legacy
ForwardedValues the matched cache behavior carried.

CloudFrontOriginRequestBuilder now decides what reaches the origin. With
a cache policy it forwards the union of the cache policy's
ParametersInCacheKeyAndForwardedToOrigin and the origin request policy
(every HeaderBehavior, CookieBehavior and QueryStringBehavior value).
Without one it applies legacy ForwardedValues, including the headers
CloudFront forwards by default. It also adds what CloudFront always
sends: Host for the origin unless the viewer Host is forwarded,
User-Agent "Amazon CloudFront", X-Forwarded-For, Via and X-Amz-Cf-Id.
Authorization is kept on the methods CloudFront does not cache, and
CloudFront-Forwarded-Proto, -Viewer-Address and -Viewer-Http-Version are
generated when a policy asks for them. Origin custom headers now replace
every same-named viewer header, and signing parameters are still never
forwarded.

The eight AWS managed origin request policies are served by their AWS
IDs and cannot be updated or deleted. With no origin request policy and
nothing selected by the cache policy, no cookies or query strings are
forwarded, as before.

Closes #4217

(cherry picked from commit f8f1b56ce9e9a1cbd63642ec1c4144fe8f6dd661)
2026-10-24 13:53:10 -04:00
jwoa95 aef858a47c feat(cloudfront): serve POST, PUT, PATCH and DELETE viewer requests (#4229)
The serving controller only declared GET, HEAD and OPTIONS, so a write
method on a distribution host matched the resource class but no method
and fell through to a bare 405, even when the cache behavior allowed all
seven methods.

POST, PUT, PATCH and DELETE are now served under the same AllowedMethods
check (403 "Invalid method." otherwise) and the same trusted key group
enforcement as the read methods. Custom origins receive the method, the
viewer request body, its Content-Type and its Authorization header, with
Content-Length taken from the body; GET and HEAD still reach the origin
without Authorization, as on CloudFront. In-process S3 origins answer
these methods with 403 Access Denied instead of forwarding them, which
is documented.

Closes #4216

(cherry picked from commit 4ca0e085cd9064cf7672cb050049e9564b48ed55)
2026-10-24 13:53:10 -04:00
Zakaria e557be1bc6 Merge pull request 'feat(cognito): show the client's identity providers on the hosted login page' (#3) from feat/cognito-hosted-login-providers into main
Reviewed-on: #3
2026-10-24 16:18:07 +00:00
Zakaria 174cb600d4 feat(cognito): show the client's identity providers on the hosted login page
The hosted login page now offers a "Continue with <provider>" button for each
of the app client's other SupportedIdentityProviders, carrying the same
authorize parameters (state, nonce, PKCE) into the federated flow, as Cognito's
managed login does. A client that lists only external providers gets the
buttons without the password form instead of an error.
2026-10-24 12:14:04 -04:00
Zakaria 2e7ebefca9 Merge pull request 'feat(cognito): hosted login page, PKCE and refresh-token grant' (#2) from feat/cognito-hosted-login into main
Reviewed-on: #2
2026-10-24 15:46:36 +00:00
Zakaria f4bbb6fab4 feat(cognito): hosted login page, PKCE and refresh-token grant
The pool's own users can now sign in through /oauth2/authorize the way apps
expect Cognito to work: without identity_provider (or with COGNITO) the
browser lands on a hosted login page, and a correct password redirects to the
registered callback with a one-time code.

- GET/POST /cognito-idp/login (and /login on custom domains), with a CSRF
  cookie and the same password rules and Pre/Post Authentication triggers as
  USER_PASSWORD_AUTH; wrong passwords, unknown and unconfirmed users get the
  same answer until the password is right
- a one-hour browser session, so the next authorize skips the form unless it
  sends prompt=login, and /logout with LogoutURLs validation
- PKCE S256 on both hosted and federated codes, and nonce in the ID token
- refresh_token grant on /oauth2/token
- codes now fire Pre Token Generation with TokenGeneration_HostedAuth instead
  of skipping the trigger
2026-10-24 11:09:37 -04:00
Zakaria e7fb8bb8d6 Merge pull request 'fix(docker): use Floci's address on the configured docker network' (#1) from fix/prefer-configured-docker-network into main
Reviewed-on: #1
2026-10-24 05:43:01 +00:00
Zakaria a1510d8cd6 fix(docker): use Floci's address on the configured docker network
Spawned containers (Lambda, RDS, EKS, EC2, ...) join services.docker-network,
but the address they were given to reach Floci was its IP on the first
user-defined network it is attached to. Once Floci is also attached to an
emulated VPC network, that address is unreachable and every Lambda times out
with "Failed to get next invocation". Prefer the configured network when
Floci is attached to it.
2026-10-24 01:35:31 -04:00
Zakaria bbe7e19554 small fixes 2026-10-15 10:25:56 -04:00
Zakaria 33c480e7e1 feat: Lightsail + svg animation + ec2 bug fixes 2026-10-11 14:19:49 -04:00
Zakaria 019570d8a4 bug fixes: backend services patches - Implemented and deployed systemd-backed AMIs 2026-10-07 13:22:32 -04:00
Zakaria 7135c81050 feat: Fargate, ECS, ALB,Codebuild, CodePipeline 2026-10-02 09:54:55 -04:00
Zakaria 283fcc7ab8 RDS port issue fixed 2026-09-30 18:38:54 -04:00
Zakaria 23d24288cd backend services patching 2026-09-30 17:46:10 -04:00
Zakaria cede01969e feat: paginate step functions executions 2026-09-27 23:35:21 -04:00
Zakaria 0aef7fb2d8 second first commit 2026-09-22 08:57:00 -04:00
Zakaria e88d7e2ff3 first commit 2026-09-22 08:55:56 -04:00