@intentius/chant-lexicon-aws 0.124.22 → 0.124.24
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/dist/api/credential-chain.d.ts +114 -0
- package/dist/api/credential-chain.d.ts.map +1 -0
- package/dist/api/read-client.d.ts +20 -0
- package/dist/api/read-client.d.ts.map +1 -1
- package/dist/caller-identity.d.ts +25 -6
- package/dist/caller-identity.d.ts.map +1 -1
- package/dist/codegen/generate.d.ts.map +1 -1
- package/dist/codegen/property-overlay.d.ts +60 -0
- package/dist/codegen/property-overlay.d.ts.map +1 -0
- package/dist/codegen/property-overlay.json +19 -0
- package/dist/integrity.json +4 -4
- package/dist/manifest.json +1 -1
- package/dist/meta.json +7 -0
- package/dist/okf/types/Runtime.md +1 -0
- package/dist/op/activities/floci.d.ts +10 -1
- package/dist/op/activities/floci.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +2 -2
- package/src/api/credential-chain.test.ts +70 -0
- package/src/api/credential-chain.ts +536 -0
- package/src/api/read-client.ts +54 -0
- package/src/caller-identity.test.ts +301 -16
- package/src/caller-identity.ts +43 -21
- package/src/codegen/generate.ts +23 -1
- package/src/codegen/property-overlay.json +19 -0
- package/src/codegen/property-overlay.test.ts +61 -0
- package/src/codegen/property-overlay.ts +125 -0
- package/src/composites/agentcore-agent.test.ts +26 -1
- package/src/generated/index.d.ts +2 -0
- package/src/generated/lexicon-aws.json +7 -0
- package/src/op/activities/floci.test.ts +26 -0
- package/src/op/activities/floci.ts +17 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AWS credential chain, as the AWS CLI walks it, for `chant lifecycle
|
|
3
|
+
* whoami` (#3954).
|
|
4
|
+
*
|
|
5
|
+
* `resolveCredentials` (./sigv4.ts) reads the three environment variables and
|
|
6
|
+
* nothing else. That is right for the read transport's synchronous signing
|
|
7
|
+
* seam, and it made whoami wrong for anyone whose shell holds a profile rather
|
|
8
|
+
* than keys: `AWS_PROFILE=dev` with an SSO session came back as "no identity
|
|
9
|
+
* is configured" while `aws sts get-caller-identity` answered. This module is
|
|
10
|
+
* the asynchronous half: it resolves what the CLI would sign with and hands
|
|
11
|
+
* back literal credentials plus a label for where they came from.
|
|
12
|
+
*
|
|
13
|
+
* There is still no `@aws-sdk/*` here, for the reason the read transport gives:
|
|
14
|
+
* a lexicon keeps that tree out. The chain is small enough to state.
|
|
15
|
+
*
|
|
16
|
+
* ## Order
|
|
17
|
+
*
|
|
18
|
+
* 1. `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` (+ `AWS_SESSION_TOKEN`).
|
|
19
|
+
* They win over `AWS_PROFILE`, as they do in the AWS CLI, and as they do
|
|
20
|
+
* in chant's own read transport, which signs with nothing else. (The JS
|
|
21
|
+
* SDK v3 skips the environment when `AWS_PROFILE` is set; the CLI does
|
|
22
|
+
* not, and the CLI is what an operator checks whoami against.) When both
|
|
23
|
+
* are set, the label says the profile was not used.
|
|
24
|
+
* 2. The profile `AWS_PROFILE` names, else `default` when one exists, read
|
|
25
|
+
* from `AWS_CONFIG_FILE` (`~/.aws/config`) and
|
|
26
|
+
* `AWS_SHARED_CREDENTIALS_FILE` (`~/.aws/credentials`). Within a profile:
|
|
27
|
+
* `role_arn` (with `source_profile` or `credential_source = Environment`),
|
|
28
|
+
* then static keys, then SSO (`sso_session` or the legacy
|
|
29
|
+
* `sso_start_url`), then `credential_process`.
|
|
30
|
+
*
|
|
31
|
+
* Not resolved, and said so rather than skipped: `web_identity_token_file`,
|
|
32
|
+
* `mfa_serial`, `credential_source` other than `Environment`, and the
|
|
33
|
+
* instance-metadata and container endpoints.
|
|
34
|
+
*
|
|
35
|
+
* ## SSO
|
|
36
|
+
*
|
|
37
|
+
* The token `aws sso login` cached under `~/.aws/sso/cache/` is read, and when
|
|
38
|
+
* its access token has expired but it carries a refresh token, it is refreshed
|
|
39
|
+
* through SSO OIDC the way the CLI does. The refreshed token is used for this
|
|
40
|
+
* call and NOT written back; whoami is read-only. A missing, expired or
|
|
41
|
+
* refused session is a `no-credentials` answer naming
|
|
42
|
+
* `aws sso login --profile <p>`.
|
|
43
|
+
*
|
|
44
|
+
* ## Credential material
|
|
45
|
+
*
|
|
46
|
+
* Nothing this module returns in a label or an error carries a key, a secret,
|
|
47
|
+
* a session token or an SSO bearer token. `credential_process` output is
|
|
48
|
+
* credential JSON, so a malformed one is described, never echoed.
|
|
49
|
+
*/
|
|
50
|
+
import { type AwsReadClientOptions } from "./read-client.js";
|
|
51
|
+
import type { AwsCredentials } from "./sigv4.js";
|
|
52
|
+
/** One HTTP exchange for the SSO portal and OIDC calls. Injected by tests. */
|
|
53
|
+
export type CredentialChainHttp = (url: string, init: {
|
|
54
|
+
method: "GET" | "POST";
|
|
55
|
+
headers: Record<string, string>;
|
|
56
|
+
body?: string;
|
|
57
|
+
}) => Promise<{
|
|
58
|
+
status: number;
|
|
59
|
+
text: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** Runs a `credential_process` command line. Injected by tests. */
|
|
62
|
+
export type CredentialProcessRunner = (command: string) => Promise<{
|
|
63
|
+
exitCode: number;
|
|
64
|
+
stdout: string;
|
|
65
|
+
stderr: string;
|
|
66
|
+
}>;
|
|
67
|
+
export interface CredentialChainOptions {
|
|
68
|
+
/** Defaults to `process.env`. */
|
|
69
|
+
env?: Record<string, string | undefined>;
|
|
70
|
+
/** Reads a file, `undefined` when it does not exist. Defaults to the filesystem. */
|
|
71
|
+
readFile?: (path: string) => string | undefined;
|
|
72
|
+
/** The home directory `~/.aws` hangs off. Defaults to `HOME`, then `os.homedir()`. */
|
|
73
|
+
home?: string;
|
|
74
|
+
/** SSO portal and OIDC transport. Defaults to `fetch`. */
|
|
75
|
+
http?: CredentialChainHttp;
|
|
76
|
+
/** `credential_process` runner. Defaults to a shell `exec`. */
|
|
77
|
+
runProcess?: CredentialProcessRunner;
|
|
78
|
+
/** STS transport for `role_arn` profiles. The `credentials` field is set per call. */
|
|
79
|
+
sts?: AwsReadClientOptions;
|
|
80
|
+
/** Clock for token and credential expiry. */
|
|
81
|
+
now?: () => Date;
|
|
82
|
+
}
|
|
83
|
+
export interface ResolvedChainCredentials {
|
|
84
|
+
credentials: AwsCredentials;
|
|
85
|
+
/** Where they came from, e.g. `profile dev (sso session acme)`. Never a credential value. */
|
|
86
|
+
source: string;
|
|
87
|
+
/** The profile that resolved them, when one did. */
|
|
88
|
+
profile?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface UnresolvedChainCredentials {
|
|
91
|
+
reason: "no-credentials" | "read-failed";
|
|
92
|
+
detail: string;
|
|
93
|
+
}
|
|
94
|
+
export type CredentialChainResult = {
|
|
95
|
+
resolved: ResolvedChainCredentials;
|
|
96
|
+
} | {
|
|
97
|
+
unresolved: UnresolvedChainCredentials;
|
|
98
|
+
};
|
|
99
|
+
type Section = Record<string, string>;
|
|
100
|
+
/**
|
|
101
|
+
* The INI dialect of the AWS shared files: `[section]`, `key = value`, `#` and
|
|
102
|
+
* `;` comments on their own line (not inline: a `credential_process` command
|
|
103
|
+
* line may hold either character). An indented line under a key with an empty value is a nested
|
|
104
|
+
* setting (`s3 =` / ` max_concurrent_requests = 10`); nothing here reads
|
|
105
|
+
* those, so they are dropped rather than mistaken for top-level keys.
|
|
106
|
+
*/
|
|
107
|
+
export declare function parseIni(text: string): Record<string, Section>;
|
|
108
|
+
/**
|
|
109
|
+
* Resolve credentials the way the AWS CLI does. Returns literal credentials
|
|
110
|
+
* and their source, or a typed refusal that says what to do about it.
|
|
111
|
+
*/
|
|
112
|
+
export declare function resolveCredentialChain(options?: CredentialChainOptions): Promise<CredentialChainResult>;
|
|
113
|
+
export {};
|
|
114
|
+
//# sourceMappingURL=credential-chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-chain.d.ts","sourceRoot":"","sources":["../../src/api/credential-chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;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6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,gBAAgB,GAAG,aAAa,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,EAAE,wBAAwB,CAAA;CAAE,GACtC;IAAE,UAAU,EAAE,0BAA0B,CAAA;CAAE,CAAC;AAE/C,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtC;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsB9D;AAgFD;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyCjH"}
|
|
@@ -188,6 +188,26 @@ export interface CallerIdentity {
|
|
|
188
188
|
* and the narrower the surface, the fewer ways a credential reaches a report.
|
|
189
189
|
*/
|
|
190
190
|
export declare function getCallerIdentity(options?: AwsReadClientOptions): Promise<CallerIdentity>;
|
|
191
|
+
/** Temporary credentials `sts:AssumeRole` hands back, with their expiry. */
|
|
192
|
+
export interface AssumedRoleCredentials {
|
|
193
|
+
accessKeyId: string;
|
|
194
|
+
secretAccessKey: string;
|
|
195
|
+
sessionToken: string;
|
|
196
|
+
expiration?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* `sts:AssumeRole` — the call behind a shared-config profile with `role_arn`
|
|
200
|
+
* (#3954). Signed with the source credentials the caller passes in
|
|
201
|
+
* `options.credentials`, on the same Query transport as
|
|
202
|
+
* {@link getCallerIdentity}. The response is credential material, so it goes
|
|
203
|
+
* back to the caller and never into an error message.
|
|
204
|
+
*/
|
|
205
|
+
export declare function assumeRole(params: {
|
|
206
|
+
roleArn: string;
|
|
207
|
+
sessionName: string;
|
|
208
|
+
externalId?: string;
|
|
209
|
+
durationSeconds?: number;
|
|
210
|
+
}, options?: AwsReadClientOptions): Promise<AssumedRoleCredentials>;
|
|
191
211
|
/** One live resource, as Cloud Control describes it. */
|
|
192
212
|
export interface CloudControlDescription {
|
|
193
213
|
identifier: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-client.d.ts","sourceRoot":"","sources":["../../src/api/read-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAmC,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpF,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM1F,sFAAsF;AACtF,MAAM,MAAM,WAAW,GAAG,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACvD,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAO/C,2EAA2E;AAC3E,qBAAa,YAAa,SAAQ,KAAK;IAGnC,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,gGAAgG;IAChG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM;IAJxB,YACE,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,MAAM;IACvB,gGAAgG;IACvF,IAAI,CAAC,EAAE,MAAM,YAAA,EAIvB;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EA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AAM,CAAA;CAAE,EAC/F,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAkCjC;AAID,wDAAwD;AACxD,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAoDD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,CAQrF;AAWD,8DAA8D;AAC9D,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAGzC;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,oBAAyB,EAClC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACtC,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAqBpC"}
|
|
@@ -20,21 +20,40 @@
|
|
|
20
20
|
*
|
|
21
21
|
* ## Credentials
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
23
|
+
* Resolved the way the AWS CLI resolves them (#3954), by
|
|
24
|
+
* `./api/credential-chain.ts`: environment keys, then the profile
|
|
25
|
+
* `AWS_PROFILE` names (or `default`) from the shared config and credentials
|
|
26
|
+
* files, through static keys, `role_arn`, SSO sessions and
|
|
27
|
+
* `credential_process`. Before #3954 only the environment keys were read, so
|
|
28
|
+
* `AWS_PROFILE=dev` on an SSO session answered "no identity is configured"
|
|
29
|
+
* while `aws sts get-caller-identity` answered with a principal. An expired
|
|
30
|
+
* SSO session is `no-credentials` naming `aws sso login --profile <p>`.
|
|
31
|
+
*
|
|
32
|
+
* The native read transport still signs with environment keys only
|
|
33
|
+
* (`resolveCredentials` in ./api/sigv4.ts; #3958). So a profile-sourced row says
|
|
34
|
+
* what the CLI, and anything shelling out to it, would act as; it does not
|
|
35
|
+
* yet say what `describeResources` signs with. The `source` column names the
|
|
36
|
+
* profile, so the difference is visible.
|
|
37
|
+
*
|
|
38
|
+
* Against an endpoint override the chain is not walked: the emulator call is
|
|
39
|
+
* unsigned whatever resolves, and a whoami against Floci should not start an
|
|
40
|
+
* SSO refresh or a `credential_process`.
|
|
29
41
|
*
|
|
30
42
|
* No credential value is ever returned. The identity is the principal ARN the
|
|
31
43
|
* service itself answers with, and the scope is an account and a region.
|
|
32
44
|
*/
|
|
33
45
|
import type { DescribeIdentityOptions, DescribeIdentityResult } from "@intentius/chant/lexicon";
|
|
34
46
|
import { type AwsReadClientOptions } from "./api/read-client.js";
|
|
47
|
+
import { type CredentialChainOptions } from "./api/credential-chain.js";
|
|
35
48
|
/** Options this module needs beyond the contract — the injectable transport, for tests. */
|
|
36
49
|
export interface CallerIdentityOptions extends DescribeIdentityOptions {
|
|
37
50
|
client?: AwsReadClientOptions;
|
|
51
|
+
/**
|
|
52
|
+
* The credential chain's seams: shared-file reads, the SSO and
|
|
53
|
+
* `credential_process` transports, the clock. Its `env` defaults to the
|
|
54
|
+
* client's, and its STS transport to the client's `http`.
|
|
55
|
+
*/
|
|
56
|
+
chain?: CredentialChainOptions;
|
|
38
57
|
}
|
|
39
58
|
/**
|
|
40
59
|
* The AWS `describeIdentity`. Returns the STS principal and the account+region
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caller-identity.d.ts","sourceRoot":"","sources":["../src/caller-identity.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"caller-identity.d.ts","sourceRoot":"","sources":["../src/caller-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAKL,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA0B,KAAK,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AA+B7F,2FAA2F;AAC3F,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,sBAAsB,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAuEtG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,mCAAmC,CAAC;AAmC3C,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AA0IhD;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAkBlF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAgBjF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backfilled properties (chant #3953).
|
|
3
|
+
*
|
|
4
|
+
* The Registry spec is pinned by content (src/spec/pin.ts), so a property AWS
|
|
5
|
+
* adds after the pin was accepted does not reach the generated types until the
|
|
6
|
+
* pin moves. Moving it is a reviewed, whole-spec decision: the 2026-08-05 pin
|
|
7
|
+
* against the October upstream is 185 resource types apart. When one property
|
|
8
|
+
* is needed before that, it goes here instead of being cast past the types.
|
|
9
|
+
*
|
|
10
|
+
* Each entry names a top-level property and the schema fragment to add for it,
|
|
11
|
+
* copied from the live Registry schema. It is merged into the raw schema before
|
|
12
|
+
* parsing, so the property reaches the `.d.ts` and the lexicon registry by the
|
|
13
|
+
* same path a spec property does. The overlay has no way to mark a property
|
|
14
|
+
* create-only, so it only suits properties that are updatable in place.
|
|
15
|
+
*
|
|
16
|
+
* Precedence follows the enum overlay (#1497): where the spec already declares
|
|
17
|
+
* the property, the spec wins and the entry is reported as redundant, so a pin
|
|
18
|
+
* bump surfaces the entries it retires.
|
|
19
|
+
*/
|
|
20
|
+
/** One backfilled property. */
|
|
21
|
+
export interface PropertyOverlayEntry {
|
|
22
|
+
/** CloudFormation type name, e.g. `AWS::BedrockAgentCore::Runtime`. */
|
|
23
|
+
type: string;
|
|
24
|
+
/** Top-level property name, added under `/properties`. */
|
|
25
|
+
property: string;
|
|
26
|
+
/** The chant issue that asked for it. */
|
|
27
|
+
issue: number;
|
|
28
|
+
/** Where the schema fragment was copied from. */
|
|
29
|
+
source: string;
|
|
30
|
+
/** ISO date the fragment was last read from `source`. */
|
|
31
|
+
reviewed: string;
|
|
32
|
+
/** JSON Schema for the property, as the Registry schema declares it. */
|
|
33
|
+
schema: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
/** What happened to one entry during a generation run. */
|
|
36
|
+
export interface PropertyOverlayApplication {
|
|
37
|
+
entry: PropertyOverlayEntry;
|
|
38
|
+
/** `applied` added the property; `redundant` found the spec already declares it. */
|
|
39
|
+
outcome: "applied" | "redundant";
|
|
40
|
+
}
|
|
41
|
+
/** The backfilled entries, in file order. */
|
|
42
|
+
export declare function propertyOverlayEntries(): PropertyOverlayEntry[];
|
|
43
|
+
/** Entries grouped by CloudFormation type name. */
|
|
44
|
+
export declare function propertyOverlayByType(entries?: PropertyOverlayEntry[]): Map<string, PropertyOverlayEntry[]>;
|
|
45
|
+
/** Add the entries for one CloudFormation type to its raw schema bytes. */
|
|
46
|
+
export declare function applyPropertyOverlay(data: Buffer | string, entries: PropertyOverlayEntry[]): {
|
|
47
|
+
data: Buffer | string;
|
|
48
|
+
applications: PropertyOverlayApplication[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Fail on an entry whose type the run never saw. Only a run over the real
|
|
52
|
+
* schema zip is strict; a fixture run legitimately lacks most types.
|
|
53
|
+
*/
|
|
54
|
+
export declare function assertPropertyOverlayCoverage(entries: PropertyOverlayEntry[], seenTypes: Set<string>, strict: boolean): void;
|
|
55
|
+
/** One warning line per entry the spec has caught up with. */
|
|
56
|
+
export declare function redundantPropertyOverlayWarnings(applications: PropertyOverlayApplication[]): Array<{
|
|
57
|
+
file: string;
|
|
58
|
+
error: string;
|
|
59
|
+
}>;
|
|
60
|
+
//# sourceMappingURL=property-overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-overlay.d.ts","sourceRoot":"","sources":["../../src/codegen/property-overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,+BAA+B;AAC/B,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,0DAA0D;AAC1D,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,oFAAoF;IACpF,OAAO,EAAE,SAAS,GAAG,WAAW,CAAC;CAClC;AAED,6CAA6C;AAC7C,wBAAgB,sBAAsB,IAAI,oBAAoB,EAAE,CAE/D;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,oBAAoB,EAA6B,GACzD,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAQrC;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,OAAO,EAAE,oBAAoB,EAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,YAAY,EAAE,0BAA0B,EAAE,CAAA;CAAE,CAyBvE;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,oBAAoB,EAAE,EAC/B,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EACtB,MAAM,EAAE,OAAO,GACd,IAAI,CAQN;AAED,8DAA8D;AAC9D,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,0BAA0B,EAAE,GACzC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CASxC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Properties CloudFormation has shipped since the pinned Registry spec (src/spec/pin.ts) was accepted (chant #3953). Hand-maintained, merged into the raw schema at codegen time by src/codegen/property-overlay.ts. Each entry is copied from the live Registry schema; retire it when a pin bump (#3960) brings the property in; generation warns when it does.",
|
|
3
|
+
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"type": "AWS::BedrockAgentCore::Runtime",
|
|
6
|
+
"property": "PlatformVersion",
|
|
7
|
+
"issue": 3953,
|
|
8
|
+
"source": "https://schema.cloudformation.us-east-1.amazonaws.com/CloudformationSchema.zip (aws-bedrockagentcore-runtime.json)",
|
|
9
|
+
"reviewed": "2026-10-12",
|
|
10
|
+
"schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The version of the runtime platform",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 128,
|
|
15
|
+
"pattern": "^[^\\s]+$"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
package/dist/integrity.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
5
|
-
"meta.json": "
|
|
6
|
-
"types/index.d.ts": "
|
|
4
|
+
"manifest.json": "fae84698def2ad2fd045076d2c14ec1dd6450bcc71226aa78b6c23853a2913c7",
|
|
5
|
+
"meta.json": "435429f998bf94568544f01780e35c28b73e7d030520d59d4025867d272cdb75",
|
|
6
|
+
"types/index.d.ts": "9e99bb26113f101eb7073759e1b02b8d06aac73379254a64a5e492d52506156c",
|
|
7
7
|
"rules/hardcoded-region.ts": "957eadcaa9f39cc17d21437565d7a94607d9b082cf28918b178fa067f07498a9",
|
|
8
8
|
"rules/iam-wildcard.ts": "10f5065fa2bbf2c8ce23dfb475a56df33f280df87784e44fec641b2584cbf333",
|
|
9
9
|
"rules/s3-encryption.ts": "6611f3977d40314c31e6d4af99829a25ea71a529a6dfcaff425549c8aa54c29a",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"skills/chant-aws-eks.md": "8789255709ff004ad0a875fd5999edcdc66fc6e33d710db058d9f42703bcfdfe",
|
|
74
74
|
"skills/chant-aws-carve-terraform.md": "8780b94ce60aded935938d5ef20ea667738354051da1bf9ca6d70d9886f65d21"
|
|
75
75
|
},
|
|
76
|
-
"composite": "
|
|
76
|
+
"composite": "8eee28c89f29c109a68a7110a2e2f3cfa123686437cb404eda119465264444f3"
|
|
77
77
|
}
|
package/dist/manifest.json
CHANGED
package/dist/meta.json
CHANGED
|
@@ -87930,6 +87930,13 @@
|
|
|
87930
87930
|
"WorkloadIdentityDetails": "WorkloadIdentityDetails",
|
|
87931
87931
|
"FailureReason": "FailureReason"
|
|
87932
87932
|
},
|
|
87933
|
+
"propertyConstraints": {
|
|
87934
|
+
"PlatformVersion": {
|
|
87935
|
+
"pattern": "^[^\\s]+$",
|
|
87936
|
+
"minLength": 1,
|
|
87937
|
+
"maxLength": 128
|
|
87938
|
+
}
|
|
87939
|
+
},
|
|
87933
87940
|
"createOnly": [
|
|
87934
87941
|
"AgentRuntimeName"
|
|
87935
87942
|
],
|
|
@@ -25,6 +25,7 @@ resource_type: AWS::BedrockAgentCore::Runtime
|
|
|
25
25
|
- `FilesystemConfigurations` (`Runtime_FilesystemConfiguration[]`, optional): Filesystem configurations for the agent runtime
|
|
26
26
|
- `LastUpdatedAt` (`string`, optional): When resource was last updated
|
|
27
27
|
- `LifecycleConfiguration` (`Runtime_LifecycleConfiguration`, optional): Lifecycle configuration for managing runtime sessions
|
|
28
|
+
- `PlatformVersion` (`string`, optional): The version of the runtime platform
|
|
28
29
|
- `ProtocolConfiguration` (`Runtime_ProtocolConfiguration`, optional): Protocol configuration for the agent runtime
|
|
29
30
|
- `RequestHeaderConfiguration` (`Runtime_RequestHeaderConfiguration`, optional): Configuration for HTTP request headers
|
|
30
31
|
- `Status` (`Runtime_AgentStatus`, optional): Current status of the agent
|
|
@@ -4,8 +4,17 @@ export interface FlociUpArgs {
|
|
|
4
4
|
name?: string;
|
|
5
5
|
/** Host port mapped to the emulator's `:4566`. Default: `4566`. */
|
|
6
6
|
port?: number;
|
|
7
|
-
/** Floci image. Default: `floci/floci:
|
|
7
|
+
/** Floci image. Default: the pinned `floci/floci:1.5.34`. */
|
|
8
8
|
image?: string;
|
|
9
|
+
/** Docker network the container joins, e.g. a compose network other containers reach Floci on. */
|
|
10
|
+
network?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Extra Floci settings, passed to the container as `-e KEY=VALUE`. Every key
|
|
13
|
+
* must start with `FLOCI_`; any other key is refused rather than passed on.
|
|
14
|
+
*/
|
|
15
|
+
settings?: Record<string, string>;
|
|
16
|
+
/** Publish the port on 127.0.0.1 only, instead of every host interface. Default: `false`. */
|
|
17
|
+
loopback?: boolean;
|
|
9
18
|
/** Mount the docker socket — Floci needs it for the ECR backing registry. Default: `false`. */
|
|
10
19
|
dockerSocket?: boolean;
|
|
11
20
|
/** `AWS_REGION` exported for subsequent steps. Default: `us-east-1`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floci.d.ts","sourceRoot":"","sources":["../../../src/op/activities/floci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAapG,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"floci.d.ts","sourceRoot":"","sources":["../../../src/op/activities/floci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAapG,MAAM,WAAW,WAAW;IAC1B,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+FAA+F;IAC/F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wFAAwF;AACxF,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzE;AAED,iFAAiF;AACjF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAO7E;AAeD,+EAA+E;AAC/E,eAAO,MAAM,UAAU,EAAE,YAAkD,CAAC;AAE5E;4DAC4D;AAC5D,eAAO,MAAM,cAAc,EAAE,kBAQ5B,CAAC;AAMF,eAAO,MAAM,kBAAkB,0BAAyB,CAAC;AACzD,eAAO,MAAM,cAAc,0BAAqB,CAAC;AACjD,eAAO,MAAM,cAAc,0BAAqB,CAAC;AAEjD,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,IAAI,GAAE,WAAgB,GAAG,MAAM,CAU9D;AAED;;;;;;;;;GASG;AACH,wBAAsB,OAAO,CAAC,IAAI,GAAE,WAAgB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBzG;AAED,kFAAkF;AAClF,wBAAsB,SAAS,CAAC,IAAI,GAAE,aAAkB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7F"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30885,6 +30885,8 @@ export declare class Runtime {
|
|
|
30885
30885
|
LastUpdatedAt?: string;
|
|
30886
30886
|
/** Lifecycle configuration for managing runtime sessions */
|
|
30887
30887
|
LifecycleConfiguration?: Runtime_LifecycleConfiguration;
|
|
30888
|
+
/** The version of the runtime platform */
|
|
30889
|
+
PlatformVersion?: string;
|
|
30888
30890
|
/** Protocol configuration for the agent runtime */
|
|
30889
30891
|
ProtocolConfiguration?: Runtime_ProtocolConfiguration;
|
|
30890
30892
|
/** Configuration for HTTP request headers */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-aws",
|
|
3
|
-
"version": "0.124.
|
|
3
|
+
"version": "0.124.24",
|
|
4
4
|
"description": "AWS CloudFormation lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"typescript": "^5.9.3"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@intentius/chant": "^0.124.
|
|
83
|
+
"@intentius/chant": "^0.124.24"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared-file parser and the refusals of the credential chain (#3954).
|
|
3
|
+
* Every seam is injected; nothing reads `~/.aws` or reaches a network.
|
|
4
|
+
*/
|
|
5
|
+
import { describe, test, expect } from "vitest";
|
|
6
|
+
import { parseIni, resolveCredentialChain } from "./credential-chain";
|
|
7
|
+
|
|
8
|
+
const HOME = "/home/op";
|
|
9
|
+
const files = (config: string) => ({
|
|
10
|
+
home: HOME,
|
|
11
|
+
readFile: (path: string) => (path === `${HOME}/.aws/config` ? config : undefined),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
describe("parseIni", () => {
|
|
15
|
+
test("reads sections and keys, skips comments and nested settings, keeps ; and # inside values", () => {
|
|
16
|
+
const parsed = parseIni(
|
|
17
|
+
[
|
|
18
|
+
"# a comment",
|
|
19
|
+
"[default]",
|
|
20
|
+
"region = eu-west-1",
|
|
21
|
+
"s3 =",
|
|
22
|
+
" max_concurrent_requests = 10",
|
|
23
|
+
"output = json",
|
|
24
|
+
"",
|
|
25
|
+
"[profile tool]",
|
|
26
|
+
"; another comment",
|
|
27
|
+
"credential_process = sh -c 'a; b # c'",
|
|
28
|
+
].join("\n"),
|
|
29
|
+
);
|
|
30
|
+
expect(parsed).toEqual({
|
|
31
|
+
default: { region: "eu-west-1", output: "json" },
|
|
32
|
+
"profile tool": { credential_process: "sh -c 'a; b # c'" },
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
describe("resolveCredentialChain refusals", () => {
|
|
38
|
+
test("a source_profile loop is refused, not followed forever", async () => {
|
|
39
|
+
const result = await resolveCredentialChain({
|
|
40
|
+
env: { AWS_PROFILE: "a" },
|
|
41
|
+
...files("[profile a]\nrole_arn = arn:aws:iam::1:role/a\nsource_profile = b\n[profile b]\nrole_arn = arn:aws:iam::1:role/b\nsource_profile = a\n"),
|
|
42
|
+
});
|
|
43
|
+
expect(result).toEqual({
|
|
44
|
+
unresolved: { reason: "no-credentials", detail: "profile a: source_profile loops (a -> b -> a)" },
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test("mfa_serial and web identity profiles say what chant does not resolve", async () => {
|
|
49
|
+
const mfa = await resolveCredentialChain({
|
|
50
|
+
env: { AWS_PROFILE: "m" },
|
|
51
|
+
...files("[profile m]\nrole_arn = arn:aws:iam::1:role/m\nsource_profile = m2\nmfa_serial = arn:aws:iam::1:mfa/me\n"),
|
|
52
|
+
});
|
|
53
|
+
expect(mfa).toMatchObject({ unresolved: { detail: expect.stringContaining("mfa_serial") } });
|
|
54
|
+
const web = await resolveCredentialChain({
|
|
55
|
+
env: { AWS_PROFILE: "w" },
|
|
56
|
+
...files("[profile w]\nweb_identity_token_file = /tmp/t\nrole_arn = x\n"),
|
|
57
|
+
});
|
|
58
|
+
expect(web).toMatchObject({ unresolved: { reason: "no-credentials" } });
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test("an SSO profile with no cached token names aws sso login", async () => {
|
|
62
|
+
const result = await resolveCredentialChain({
|
|
63
|
+
env: { AWS_PROFILE: "s" },
|
|
64
|
+
...files("[profile s]\nsso_start_url = https://a/start\nsso_region = us-east-1\nsso_account_id = 1\nsso_role_name = R\n"),
|
|
65
|
+
});
|
|
66
|
+
expect(result).toMatchObject({
|
|
67
|
+
unresolved: { reason: "no-credentials", detail: expect.stringContaining("run `aws sso login --profile s`") },
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
});
|