代理短期云角色
持有某个角色的租约,通过平面承担该角色以获取短期凭据,使用后释放租约。
iam.assumecoordination.lease
持有某个角色的租约,通过平面承担该角色以获取短期凭据,使用后释放租约。
iam.assumecoordination.lease智能体不应持有长期云密钥。代理会对照受保护类别检查角色,要求该智能体持有对确切角色 ARN 的有效租约,然后向 STS 请求会话。签发过程记入账本,包含执行者、角色和过期时间,绝不含密钥。
响应只携带一次秘密访问密钥和会话令牌,账本从不保存它们。释放租约不会撤销已签发的凭据:它在 expirationMs 之前一直有效。STS 拒绝短于 900 秒的会话。
arn:aws:iam:: 开头的角色 ARN代码从 INTRAMEDIAL_KEY 读取密钥。请把它放在您的 shell 或密钥存储中,切勿放进要提交的文件。需要已登录用户的调用不能使用密钥:这些调用由控制台发起。
以将使用该角色的智能体身份,对确切的角色 ARN 获取租约。凭据的有效期受租约剩余时间限制。
assumed 为 true;随后是租约和过期时间。
{
"assumed": true,
"roleArn": "arn:aws:iam::123456789012:role/deploy",
"sessionName": "release-agent",
"leaseId": "lease_4b7e",
"leaseScoped": true,
"expirationMs": 1793523600000,
: ,
: ,
:
}expirationMs 结束的角色会话。iam.assumeiam-assumecoordination.leasecoordination-leasecurl -sS -X POST https://api.intramedial.com/api/v1/acp/coordination/lease \
-H "Authorization: Bearer $INTRAMEDIAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"resource": "arn:aws:iam::123456789012:role/deploy",
"actorDid": "did:web:acme.example:agent:release"
}'const res = await fetch("https://api.intramedial.com/api/v1/acp/coordination/lease", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INTRAMEDIAL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
resource: "arn:aws:iam::123456789012:role/deploy",
actorDid: "did:web:acme.example:agent:release",
}),
});
console.log(res.status, await res.json());import os, requests
res = requests.post(
"https://api.intramedial.com/api/v1/acp/coordination/lease",
headers={"Authorization": "Bearer " + os.environ["INTRAMEDIAL_KEY"]},
json={
"resource": "arn:aws:iam::123456789012:role/deploy",
"actorDid": "did:web:acme.example:agent:release",
},
timeout=30,
)
print(res.status_code, res.json())发送角色、智能体、会话名称和 web 身份令牌。响应只携带一次密钥,所以请把它保存在日志看不到的地方。
curl -sS -X POST https://api.intramedial.com/api/v1/acp/iam/assume \
-H "Authorization: Bearer $INTRAMEDIAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"roleArn": "arn:aws:iam::123456789012:role/deploy",
"actorDid": "did:web:acme.example:agent:release",
"sessionName": "release-agent",
"webIdentityToken": "eyJ…"
}'
# Save the answer to assume.json: it holds the secret once, so keep it out of logs.const res = await fetch("https://api.intramedial.com/api/v1/acp/iam/assume", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INTRAMEDIAL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
roleArn: "arn:aws:iam::123456789012:role/deploy",
actorDid: "did:web:acme.example:agent:release",
sessionName: "release-agent",
webIdentityToken: "eyJ…",
}),
});
console.log(res.status, await res.json());import os, requests
res = requests.post(
"https://api.intramedial.com/api/v1/acp/iam/assume",
headers={"Authorization": "Bearer " + os.environ["INTRAMEDIAL_KEY"]},
json={
"roleArn": "arn:aws:iam::123456789012:role/deploy",
"actorDid": "did:web:acme.example:agent:release",
"sessionName": "release-agent",
"webIdentityToken": "eyJ…",
},
timeout=30,
)
print(res.status_code, res.json())仅为需要它们的那一项任务导出密钥。它们在 expirationMs(STS 为该会话报告的过期时间)之前一直有效。
export AWS_ACCESS_KEY_ID=$(jq -r .accessKeyId assume.json)
export AWS_SECRET_ACCESS_KEY=$(jq -r .secretAccessKey assume.json)
export AWS_SESSION_TOKEN=$(jq -r .sessionToken assume.json)
# jq -r .expirationMs assume.json when STS says the credential ends任务结束时释放租约。这会阻止下一个凭据被签发,但不会收回已签发的凭据,它们在 expirationMs 之前仍然有效。如需监视请求激增,watchdog.check 会读取 iam.assume 事件。
curl -sS -X POST https://api.intramedial.com/api/v1/acp/coordination/release \
-H "Authorization: Bearer $INTRAMEDIAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"resource": "arn:aws:iam::123456789012:role/deploy",
"actorDid": "did:web:acme.example:agent:release"
}'const res = await fetch("https://api.intramedial.com/api/v1/acp/coordination/release", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INTRAMEDIAL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
resource: "arn:aws:iam::123456789012:role/deploy",
actorDid: "did:web:acme.example:agent:release",
}),
});
console.log(res.status, await res.json());import os, requests
res = requests.post(
"https://api.intramedial.com/api/v1/acp/coordination/release",
headers={"Authorization": "Bearer " + os.environ["INTRAMEDIAL_KEY"]},
json={
"resource": "arn:aws:iam::123456789012:role/deploy",
"actorDid": "did:web:acme.example:agent:release",
},
timeout=30,
)
print(res.status_code, res.json())内容复制自: /docs/iam-assume
expirationMs 之前一直有效。账本仅可追加,并封存在 Merkle 根之下。条目上的时间取自 Intramedial 自己的时钟,签名包可用已发布的公钥离线核查。
用 coordination.lease 对某个资源获取独占租约,查看持有者,并在用完后释放。
coordination.lease读取账本中租约和凭据事件的激增、突增和沉默,并从您自己的调度器运行检查。
watchdog.check询问平面:智能体能否对已连接的 SaaS 源执行操作,并在发送任何内容之前读取裁决。
saas.admit当我们向实用示例中添加新示例时,会发送一封简短的邮件。不会发送其他任何邮件,而且您可以从任意一封邮件中退订。
完全无需账户:在 7 天之内可以在各个 attest 路由上调用 35 次,所生成的回执都会被标记为测试回执。当您想继续使用时,再注册账户即可。