Ministack: Free, open-source local AWS emulator - 60+ services, Terraform compatible, real databases. Free forever. MIT licensed.
Python awsaws-emulatoraws-localaws-sdkdevtoolsdockerdynamodbec2emulatorlambdalocalstacklocalstack-alternativeministackmock-awsopen-sourcepythons3sqsterraform
release v1.3.68 (#984)
Nahuel Nucera680826b5f80c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4531ffe6..59a01224 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,16 @@ All notable changes to MiniStack will be documented here.Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).Versioning follows [Semantic Versioning](https://semver.org/).+## [1.3.68] — 2026-06-25++### Fixed+- **Cognito — OAuth2 token endpoint URL-decodes HTTP Basic client credentials** — a `client_secret` containing `/` or `+` arrives in the `Authorization: Basic` header as `%2F`/`%2B` (RFC 6749 §2.3.1 form-urlencodes the client id and secret before base64). MiniStack did not decode them, so `client_secret_basic` failed with `invalid_client` for any secret with special characters. The credentials are now decoded, matching the `client_secret_post` path. Reported by @pny-nc.+- **Step Functions — `lambda:invoke.waitForTaskToken` delivers the unwrapped `Payload`** — the callback path forwarded the whole service-integration envelope (`{"FunctionName": ..., "Payload": {...}}`) to the Lambda instead of just the `Payload`, unlike the synchronous `lambda:invoke` path. A handler reading its task token / input from the top level saw them nested under `Payload`, never resumed the task, and the execution hung until timeout. Contributed by @ryan-bennett.+- **Step Functions — a failed `lambda:invoke` task sets `Cause` to a JSON-encoded error payload** — `Cause` was the bare `errorMessage` string instead of AWS's JSON object (`{"errorType": ..., "errorMessage": ..., "trace": [...]}`), so `Catch` handlers and downstream tasks that `json.loads(Cause)` to read `errorType`/`errorMessage` failed to parse it. `Cause` now matches the AWS wire form. Contributed by @ryan-bennett.+- **SNS — `lambda` subscribers are delivered to asynchronously** — fanout invoked a `lambda`-protocol subscriber synchronously inside `Publish`, so a slow or hung subscriber Lambda blocked the `Publish` call and its upstream caller (e.g. a Step Functions task publishing a notification). Delivery now runs on a background thread, matching AWS's asynchronous SNS→Lambda delivery, so `Publish` returns immediately. Contributed by @ryan-bennett.++---+## [1.3.67] — 2026-06-24### Addeddiff --git a/ministack/services/cognito.py b/ministack/services/cognito.pyindex b1b6d0eb..80e65cfb 100644--- a/ministack/services/cognito.py+++ b/ministack/services/cognito.py@@ -63,7 +63,7 @@ import stringimport timeimport zlibfrom datetime import datetime, timezone-from urllib.parse import parse_qs, quote, urlencode+from urllib.parse import parse_qs, quote, unquote_plus, urlencodefrom xml.etree.ElementTree import Element, SubElementfrom xml.etree.ElementTree import tostring as xml_tostring@@ -1231,7 +1231,12 @@ def _authenticate_client(headers: dict, form: dict):try:decoded = base64.b64decode(auth.split(" ", 1)[1]).decode("utf-8")cid, csec = decoded.split(":", 1)- return cid, csec+ # RFC 6749 §2.3.1: the client id and secret are+ # application/x-www-form-urlencoded before base64, so a secret+ # containing "/" or "+" arrives as %2F/%2B and must be decoded to+ # match the stored value. The client_secret_post path already gets+ # this via parse_qs.+ return unquote_plus(cid), unquote_plus(csec)except Exception:passreturn form.get("client_id", ""), form.get("client_secret", "")diff --git a/pyproject.toml b/pyproject.tomlindex 947966fb..4b68dec9 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.3.67"+version = "1.3.68"description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"readme = "README.md"license = { file = "LICENSE" }diff --git a/tests/test_cognito.py b/tests/test_cognito.pyindex 2c826e24..83d4cf04 100644--- a/tests/test_cognito.py+++ b/tests/test_cognito.py@@ -2194,6 +2194,25 @@ def test_oauth2_token_failed_client_auth_does_not_consume_code():assert 'access_token' in json.loads(body)+def test_oauth2_basic_auth_url_decodes_client_secret():+ """HTTP Basic client auth carries client_id/client_secret form-urlencoded+ before base64 (RFC 6749 §2.3.1), so a secret containing '/' or '+' arrives+ as %2F/%2B. _authenticate_client must decode it to match the stored secret,+ otherwise client_secret_basic fails for any secret with special characters+ (#932). The client_secret_post path already decodes via parse_qs."""+ import base64 as _b64+ from urllib.parse import quote_plus++ from ministack.services.cognito import _authenticate_client++ cid = "VxSsBWVIKMZK29W0IN6TKJN8EF"+ for secret in ("ab/cd+ef/gh", "no-specials-here"):+ basic = _b64.b64encode(f"{cid}:{quote_plus(secret)}".encode()).decode()+ got_cid, got_secret = _authenticate_client({"authorization": f"Basic {basic}"}, {})+ assert got_cid == cid+ assert got_secret == secret, f"Basic auth must decode to {secret!r}, got {got_secret!r}"++def test_oauth2_id_token_echoes_nonce():"""OIDC requires the id_token to echo the nonce from the authorize requestso clients can mitigate replay. Strict OIDC clients (oidc-client-ts,