Skip to content

Ministack: Free, open-source local AWS emulator - 60+ services, Terraform compatible, real databases. Free forever. MIT licensed.

Feat/sts getaccesskeyinfo v1.1.46 (#169)

Nahuel Nucera19214117720d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a19cc3b1..58cf86dc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,13 +7,19 @@ Versioning follows [Semantic Versioning](https://semver.org/).
---
-## [Unreleased]
+## [1.1.46] — 2026-04-07
### Added
-- **Step Functions intrinsic functions** — `States.StringToJson`, `States.JsonMerge`, `States.Format` now work in `Parameters` and `ResultSelector`. Supports nested intrinsic calls. Enables real-world ASL definitions that use string interpolation and JSON manipulation
+- **Cloud Map (Service Discovery)** — new service with namespace lifecycle (HTTP, private/public DNS), service/instance CRUD, operation tracking, tagging, Route53 hosted zone integration. Contributed by @jgrumboe (#147)
+- **Step Functions intrinsic functions** — `States.StringToJson`, `States.JsonMerge`, `States.Format` in `Parameters` and `ResultSelector`. Supports nested intrinsic calls. Contributed by @jayjanssen (#167)
+- **STS `GetAccessKeyInfo`** — returns account ID for a given access key
+- **EC2 `ModifySnapshotAttribute` / `DescribeSnapshotAttribute`** — now actually stores and returns `createVolumePermission` instead of being stubs
+- **`ready.d` scripts** — execute after server startup for resource seeding. Contributed by @kjdev (#159)
### Tests
-- 4 new tests: `States.StringToJson`, `States.JsonMerge`, `States.Format`, nested intrinsics
+- 3 WAF tests: check_capacity, describe_managed_rule_group, list_resources_for_web_acl. Contributed by @mvanhorn (#164)
+- 2 STS tests: assume_role_returns_credentials, get_access_key_info. Contributed by @mvanhorn (#162)
+- 3 EBS tests: snapshot_attribute, volume_attribute, volumes_modifications. Contributed by @mvanhorn (#163)
---
diff --git a/ministack/services/ec2.py b/ministack/services/ec2.py
index 95384acb..f62aaaf4 100644
--- a/ministack/services/ec2.py
+++ b/ministack/services/ec2.py
@@ -1496,14 +1496,32 @@ def _copy_snapshot(p):
def _modify_snapshot_attribute(p):
+ snap_id = _p(p, "SnapshotId")
+ snap = _snapshots.get(snap_id)
+ if not snap:
+ return _error("InvalidSnapshot.NotFound", f"Snapshot '{snap_id}' not found", 400)
+ op = _p(p, "OperationType")
+ user_ids = _parse_member_list(p, "UserId")
+ perms = snap.setdefault("CreateVolumePermissions", [])
+ if op == "add":
+ for uid in user_ids:
+ if not any(pp.get("UserId") == uid for pp in perms):
+ perms.append({"UserId": uid})
+ elif op == "remove":
+ perms[:] = [pp for pp in perms if pp.get("UserId") not in user_ids]
return _xml(200, "ModifySnapshotAttributeResponse", "<return>true</return>")
def _describe_snapshot_attribute(p):
snap_id = _p(p, "SnapshotId")
+ snap = _snapshots.get(snap_id)
+ perms_xml = ""
+ if snap:
+ for pp in snap.get("CreateVolumePermissions", []):
+ perms_xml += f"<item><userId>{pp['UserId']}</userId></item>"
return _xml(200, "DescribeSnapshotAttributeResponse", f"""
<snapshotId>{snap_id}</snapshotId>
- <createVolumePermission/>""")
+ <createVolumePermission>{perms_xml}</createVolumePermission>""")
def _snapshot_inner_xml(snap):
diff --git a/ministack/services/iam_sts.py b/ministack/services/iam_sts.py
index 91daf8c2..6871c39b 100644
--- a/ministack/services/iam_sts.py
+++ b/ministack/services/iam_sts.py
@@ -25,7 +25,7 @@ IAM actions:
SimulatePrincipalPolicy, SimulateCustomPolicy.
STS actions:
- GetCallerIdentity, AssumeRole, GetSessionToken.
+ GetCallerIdentity, AssumeRole, GetSessionToken, GetAccessKeyInfo.
"""
import copy
@@ -1423,6 +1423,14 @@ async def handle_sts_request(method, path, headers, body, query_params):
f"</GetSessionTokenResult>",
ns="sts")
+ if action == "GetAccessKeyInfo":
+ access_key = _p(params, "AccessKeyId") or ""
+ return _xml(200, "GetAccessKeyInfoResponse",
+ f"<GetAccessKeyInfoResult>"
+ f"<Account>{ACCOUNT_ID}</Account>"
+ f"</GetAccessKeyInfoResult>",
+ ns="sts")
+
return _error(400, "InvalidAction", f"Unknown STS action: {action}", ns="sts")
diff --git a/pyproject.toml b/pyproject.toml
index 7990b1f2..2c53e33e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "ministack"
-version = "1.1.45"
+version = "1.1.46"
description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"
readme = "README.md"
license = { file = "LICENSE" }