@@ -271,6 +271,19 @@ the following configuration:
271
271
- HTTP basic or digest credentials to use with the repository.
272
272
Credentials are provided in the form of "username:password".
273
273
274
+ .. warning ::
275
+
276
+ Credentials SHOULD NOT be defined statically in a smithy-build.json
277
+ file. Instead, use :ref: `environment variables <build_envars >` to
278
+ keep credentials out of source control.
279
+ * - proxyHost
280
+ - ``string ``
281
+ - The URL of the proxy to configure for this repository (for example, ``http://proxy.maven.apache.org:8080 ``).
282
+ * - proxyCredentials
283
+ - ``string ``
284
+ - HTTP credentials to use with the proxy for the repository.
285
+ Credentials are provided in the form of "username:password".
286
+
274
287
.. warning ::
275
288
276
289
Credentials SHOULD NOT be defined statically in a smithy-build.json
@@ -285,7 +298,9 @@ the following configuration:
285
298
"repositories" : [
286
299
{
287
300
"url" : " https://my_domain-111122223333.d.codeartifact.region.amazonaws.com/maven/my_repo/" ,
288
- "httpCredentials" : " aws:${CODEARTIFACT_AUTH_TOKEN}"
301
+ "httpCredentials" : " aws:${CODEARTIFACT_AUTH_TOKEN}" ,
302
+ "proxyHost" : " http://localhost:8080" ,
303
+ "proxyCredentials" : " user:${PROXY_AUTH_TOKEN}"
289
304
}
290
305
],
291
306
"dependencies" : [
@@ -324,6 +339,33 @@ variable, no default repositories are assumed when resolving the
324
339
Repositories defined in ``SMITHY_MAVEN_REPOS `` take precedence over
325
340
repositories defined through smithy-build.json configuration.
326
341
342
+ Proxy environment variables
343
+ ---------------------------
344
+
345
+ When using the Smithy CLI, the ``SMITHY_PROXY_HOST `` and ``SMITHY_PROXY_CREDENTIALS `` environment variables can be used
346
+ to configure a proxy to use for dependency resolution. Setting these environment variables will configure a common
347
+ proxy configuration for all repositories.
348
+
349
+ .. important ::
350
+
351
+ If a :ref: `Maven Repository <maven-repositories >` definition provides a proxy configuration, that configuration will
352
+ override the proxy configuration defined by the ``SMITHY_PROXY_HOST `` and ``SMITHY_PROXY_CREDENTIALS ``
353
+ environment variables.
354
+
355
+ The ``SMITHY_PROXY_HOST `` environment variable is a URL:
356
+
357
+ .. code-block ::
358
+
359
+ SMITHY_PROXY_HOST='http://localhost:8080'
360
+
361
+ The ``SMITHY_PROXY_CREDENTIALS `` environment variable is a colon-delimited value (``: ``) containing both the
362
+ username and password to use for authenticating to the proxy configured by the ``SMITHY_PROXY_HOST `` environment
363
+ variable:
364
+
365
+ .. code-block ::
366
+
367
+ SMITHY_PROXY_CREDENTIALS='user:$PROXY_PASSWORD'
368
+
327
369
328
370
.. _projections :
329
371
0 commit comments