Skip to content

Commit c4d8ce4

Browse files
committed
docs: use Container authentication description from the Go repo
1 parent 489d528 commit c4d8ce4

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

Authentication.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,25 @@ service = ExampleService(authenticator=authenticator)
204204
```
205205

206206
## Container
207-
The `ContainerAuthenticator` will read a compute resource token from the file system (typically, a container running on a system like IKS) and will perform the necessary interactions with the IAM token service to obtain a suitable bearer token for the compute resource. The authenticator will also obtain a new bearer token when the current token expires. The bearer token is then added to each outbound request in the `Authorization` header in the form:
208-
209-
```
210-
Authorization: Bearer <bearer-token>
207+
The `ContainerAuthenticator` is intended to be used by application code
208+
running inside a compute resource managed by the IBM Kubernetes Service (IKS)
209+
in which a secure compute resource token (CR token) has been stored in a file
210+
within the compute resource's local file system.
211+
The CR token is similar to an IAM apikey except that it is managed automatically by
212+
the compute resource provider (IKS).
213+
This allows the application developer to:
214+
- avoid storing credentials in application code, configuraton files or a password vault
215+
- avoid managing or rotating credentials
216+
217+
The `ContainerAuthenticator` will retrieve the CR token from
218+
the compute resource in which the application is running, and will then perform
219+
the necessary interactions with the IAM token service to obtain an IAM access token
220+
using the IAM "get token" operation with grant-type `cr-token`.
221+
The authenticator will repeat these steps to obtain a new IAM access token when the
222+
current access token expires.
223+
The IAM access token is added to each outbound request in the `Authorization` header in the form:
224+
```
225+
Authorization: Bearer <IAM-access-token>
211226
```
212227

213228
### Properties

0 commit comments

Comments
 (0)