Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for proxy for cli dependency resolution #2076

Merged
merged 3 commits into from
Dec 20, 2023

Conversation

hpmellema
Copy link
Contributor

@hpmellema hpmellema commented Dec 15, 2023

resolves #2029

Description of changes:
Adds support for a proxy configuration for maven repositories.

This proxy configuration can be added one of 2 ways:

  1. Via environment variables: SMITHY_PROXY_HOST and SMITHY_PROXY_CREDENTIALS . These will set a common proxy configuration for all repositories
  2. Via a specific configuration on the Maven repository definition. For example,
    "maven": {
        "repositories": [
            {
                "url": "http://localhost:1234/maven/not/there",
                "proxyHost": "http://localhost:2323",
                "proxyCredentials": "user:pass"
            }
        ],
        "dependencies": [
            "software.amazon.smithy:smithy-aws-iam-traits:1.26.0"
        ]
    }

The per-repo configuration of the proxy will override any settings set by the environment variables.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hpmellema hpmellema requested a review from a team as a code owner December 15, 2023 19:10
Copy link
Member

@mtdowling mtdowling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we've been using a SMITHY_ prefix for our owned environment variables. Is there a reason to not prefix PROXY_HOST and PROXY_CRED?

@hpmellema hpmellema changed the title Add support for authenticating HTTP proxy Add support for proxy for cli dependency resolution Dec 18, 2023
@hpmellema hpmellema merged commit 4d6b346 into smithy-lang:main Dec 20, 2023
@hpmellema hpmellema deleted the maven-proxy-support branch December 20, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Smithy CLI behind an authenticating HTTP proxy
2 participants