Skip to content

Commit b2aa1a7

Browse files
authored
docs(providers): show how to import a profile before creating a provider (#5777)
The Providers overview read as though profiles ship with the gateway. A new gateway starts with an empty profile catalog, so every `provider create` example on the page failed until the reader found the import step elsewhere. Rewrite the overview as one walkthrough that starts from an empty gateway: import an inline read-only GitHub REST profile, create a provider from it, attach it to a sandbox and make an authenticated request, then update and remove the profile. Link the repository's `providers/` directory, at the matching release tag, for profiles for other services. Signed-off-by: Kris Hicks <khicks@nvidia.com>
1 parent db7d7a6 commit b2aa1a7

3 files changed

Lines changed: 319 additions & 510 deletions

File tree

‎docs/how-it-works/providers/aws.mdx‎

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,51 @@ openshell provider create \
4545
--credential AWS_SESSION_TOKEN=FwoGZX...
4646
```
4747

48+
### Gateway-Managed STS Credentials
49+
4850
To have the gateway mint and rotate STS credentials for you instead of supplying
4951
them statically, use the `aws` or `aws-s3` profile with the `aws_sts_assume_role`
50-
refresh strategy. A single `sts:AssumeRole` mints all three env vars
51-
(`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`) that the
52-
signer reads. See [Manage Providers](/how-it-works/providers/overview#aws-sts).
52+
refresh strategy. The gateway calls `sts:AssumeRole` and writes
53+
`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` to the
54+
provider record atomically. The profiles declare `AWS_SECRET_ACCESS_KEY` and
55+
`AWS_SESSION_TOKEN` as `additional_outputs` of the `AWS_ACCESS_KEY_ID` refresh,
56+
so create the provider with `--runtime-credentials` and no placeholder
57+
credential:
58+
59+
```shell
60+
openshell provider create --name my-aws --type aws-s3 --runtime-credentials
61+
62+
openshell provider refresh configure my-aws \
63+
--credential-key AWS_ACCESS_KEY_ID \
64+
--strategy aws-sts-assume-role \
65+
--material role_arn="arn:aws:iam::123456789012:role/SandboxS3Writer" \
66+
--material session_name="openshell-sandbox"
67+
68+
openshell provider refresh rotate my-aws --credential-key AWS_ACCESS_KEY_ID
69+
```
70+
71+
The gateway resolves its own AWS credentials using the default credential chain
72+
(instance role, IRSA, ECS task role, environment variables). For gateways not
73+
running on AWS, provide explicit IAM keys as refresh material:
74+
75+
```shell
76+
openshell provider refresh configure my-aws \
77+
--credential-key AWS_ACCESS_KEY_ID \
78+
--strategy aws-sts-assume-role \
79+
--material role_arn="arn:aws:iam::123456789012:role/SandboxS3Writer" \
80+
--material aws_access_key_id="$AWS_ACCESS_KEY_ID" \
81+
--secret-material-env aws_secret_access_key=AWS_SECRET_ACCESS_KEY
82+
```
83+
84+
Pass the long-lived secret with `--secret-material-env` so the CLI reads it
85+
from its own environment instead of expanding it into a process argument, where
86+
it would be visible in the host process table. For temporary source credentials
87+
(AWS SSO or a prior `AssumeRole`), also pass
88+
`--secret-material-env aws_session_token=AWS_SESSION_TOKEN`. It requires the
89+
`aws_access_key_id` and `aws_secret_access_key` pair.
90+
91+
Use the generic `aws` profile for multi-service access and scope endpoints with
92+
sandbox network policy. Use `aws-s3` for S3-specific endpoint rules.
5393

5494
## Policy Configuration
5595

0 commit comments

Comments
 (0)