You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
service = ExampleService(authenticator=authenticator)
203
204
```
204
205
206
+
## 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>
211
+
```
212
+
213
+
### Properties
214
+
- cr_token_filename: (optional) The name of the file containing the injected CR token value. If not specified, then `/var/run/secrets/tokens/vault-token` is used as the default value. The application must have `read` permissions on the file containing the CR token value.
215
+
- iam_profile_name: (optional) The name of the linked trusted IAM profile to be used when obtaining the IAM access token (a CR token might map to multiple IAM profiles). One of `iam_profile_name` or `iam_profile_id` must be specified.
216
+
- iam_profile_id: (optional) The ID of the linked trusted IAM profile to be used when obtaining the IAM access token (a CR token might map to multiple IAM profiles). One of `iam_profile_name` or `iam_profile_id` must be specified.
217
+
- url: (optional) The URL representing the IAM token service endpoint. If not specified, a suitable default value is used.
218
+
- client_id/client_secret: (optional) The `client_id` and `client_secret` fields are used to form a "basic auth" Authorization header for interactions with the IAM token server. If neither field is specified, then no Authorization header will be sent with token server requests. These fields are optional, but must be specified together.
219
+
- disable_ssl_verification: (optional) A flag that indicates whether verificaton of the server's SSL certificate should be disabled or not. The default value is `False`.
220
+
- scope (optional): the scope to be associated with the IAM access token.
221
+
If not specified, then no scope will be associated with the access token.
222
+
- proxies (optional): The proxy endpoint to use for HTTP(S) requests.
223
+
- headers: (optional) A set of key/value pairs that will be sent as HTTP headers in requests made to the IAM token service.
224
+
225
+
### Programming example
226
+
```python
227
+
from ibm_cloud_sdk_core.authenticators import ContainerAuthenticatior
service = ExampleService(authenticator=authenticator)
245
+
```
246
+
205
247
## No Auth Authentication
206
248
The `NoAuthAuthenticator` is a placeholder authenticator which performs no actual authentication function. It can be used in situations where authentication needs to be bypassed, perhaps while developing or debugging an application or service.
0 commit comments