jenkinsci / aws-secrets-manager-credentials-provider-plugin

AWS Secrets Manager Credentials Provider for Jenkins
https://plugins.jenkins.io/aws-secrets-manager-credentials-provider/
MIT License
64 stars 42 forks source link

[feature] Use Jenkins proxy settings for Secrets Manager communication #306

Closed presPetkov closed 5 months ago

presPetkov commented 6 months ago

Link to issue: https://github.com/jenkinsci/aws-secrets-manager-credentials-provider-plugin/issues/305

Jenkins url/manage/pluginManager/advanced gives the user the option to specify Http Proxy Configuration.

This configuration is not used by the aws-secrets-manager-credentials-provider-plugin.

With this pull request I propose that the plugin uses the proxy configuration if it is provided.

Testing done

Configuration image

AWS credentials are not listed image

The error in the logs image

After installing the local build the AWS creds are listed image

Testing with the proxy not set

image

image

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
chriskilding commented 6 months ago

Thanks for your update. I'm augmenting your PR with a feature that lets people set the AWS ClientConfiguration directly. This is so that they can use different proxy settings specifically for this plugin, if they don't want it to use the Jenkins system-wide proxy configuration. Will be pushing a couple more commits as I refine this

presPetkov commented 6 months ago

Let me know when you are finished and I will take the plugin from the build in the checks and run some tests. Thanks

chriskilding commented 6 months ago

@presPetkov alright, first draft complete.

The rough outline of how the feature will work now is:

Give it a spin and let me know how it goes :)