Open nipuna-perera opened 2 months ago
This would be fantastic - I consider this a barrier for wide adoption where I work.
The main resource I am concerned with is AWS - between SecretsManager, Parameter Store, ECS, and CodeArtifact, practically all of our commands need AWS credentials. This means two - AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
- for most CI, plus AWS_SESSION_TOKEN
token when being run directly by a user with SSO login.
Not a perfect solution, but what I have tried to do in my module is this:
What are you trying to do?
Many commands that I run especially in a corporate environment require authentication of some sort. Typically this is username/password but sometimes it could be a certain file or token too.
Why is this important to you?
When using Dagger modules it's typical to split certain functionality into it's own functions and each function can end up requiring to consumer to enter credentials. Examples:
compile
,test
,deploy
etc. Each of these commands needs authentication typically in the form of credentials inserted in thesettings.xml
file which resides in the user's home directory. If I use themvn
CLI directly, it knows to look in my home directory for the settings.xml file. This isn't possible to replicate in dagger unless I explicitly pass the settings.xml file to each command. The alternative to settings.xml is to have the user/pass parameterized as env vars. However, the env vars will have to be passed into each maven command for eg:--user env:ARTIFACTORY_USR --pass env:ARTIFACTORY_PSW
This can become tedious.
How are you currently working around this?
No known workarounds at this point other than passing in user/pass/tokens or files for every command utilizing these CLIs.