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
Open to doing it as well as receiving contribution. What does it require? Is Maven capable of authenticating using a short-lived Azure token as opposed to a PAT?
At least for NPM, it has different properties for PAT (password) vs Token authentication. It also possible to specify an environment variable name in the configuration file. Do you know if the settings.xml supports a variable? Otherwise, the file would have to be rewritten with the value of the token.
The pattern used, because the tokens are short-lived, is to add a bash alias that replaces the CLI mvn with a script that generates a token on the fly, stores it in environment variable, then calls the CLI. So something like that, or a variant that writes the token into settings.xml would be the thing to try. The question would be whether the token will work as the password. It doesn't for other tools, AFAIK.
Activity
markphip commentedon Aug 8, 2023
Open to doing it as well as receiving contribution. What does it require? Is Maven capable of authenticating using a short-lived Azure token as opposed to a PAT?
markphip commentedon Aug 8, 2023
Should add I only know what I see here: https://learn.microsoft.com/en-us/azure/devops/artifacts/maven/install?view=azure-devops
At least for NPM, it has different properties for PAT (password) vs Token authentication. It also possible to specify an environment variable name in the configuration file. Do you know if the settings.xml supports a variable? Otherwise, the file would have to be rewritten with the value of the token.
The pattern used, because the tokens are short-lived, is to add a bash alias that replaces the CLI
mvnwith a script that generates a token on the fly, stores it in environment variable, then calls the CLI. So something like that, or a variant that writes the token into settings.xml would be the thing to try. The question would be whether the token will work as the password. It doesn't for other tools, AFAIK.