Commit Graph

59 Commits

Author SHA1 Message Date
Shiying Chen
1b07ea9bb5 Run az account clear instead of az logout at the beginning (#377)
* az account clear

* remove catch error
2023-12-01 10:07:30 +08:00
Shiying Chen
40935f9fb5 Azure/login should logout the active account at the beginning (#376)
* logout at the beginning

* remove logout step in test case
2023-11-27 17:21:50 +08:00
Shiying Chen
34b958dce7 Fix #371: Allow optional subscriptionId in creds (#373)
* fix371

* set subId once it is given

* modify test to logout first

* update tests

* update test
2023-11-27 15:17:12 +08:00
Yan Xu
8bf3bdeba9 Support Managed Identity (#348)
* support MI for CLI

* support MI for PowerShell

* refactor and fix typo

* adjust logic according to review comments

* create a type for PS Script output and add some test cases

* rename servicePrincipalKey to servicePrincipalSecret
2023-10-20 16:38:30 +08:00
Yan Xu
bed977350c Refactor Code for better reading (#326)
* refactor

* fix test case
2023-05-29 14:15:49 +08:00
Shiying Chen
a354f8d8e8 Merge pull request #322 from MoChilia/fix-readme
Fix format error
2023-05-25 10:20:17 +08:00
MoChilia
41a42cd279 update 2023-05-25 10:13:15 +08:00
MoChilia
ddfe2f4c73 update 2023-05-24 17:14:24 +08:00
MoChilia
b1db778a6a change error handling method 2023-05-24 16:44:24 +08:00
MoChilia
13cc38b514 enable OIDC for sovereign clouds 2023-05-24 14:32:30 +08:00
Johan Karlsson
5d3578bb81 Allow passwords to start with hyphen (#241)
Co-authored-by: Balaga Gayatri <balaga-gayatri@github.com>
2023-01-13 17:51:33 +05:30
eiffel-fl
28576d9764 Add caught error to core.setFailed() message. (#243)
This will help user to diagnose their problems using Azure/login.

Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>

Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
Co-authored-by: Balaga Gayatri <balaga-gayatri@github.com>
2022-12-19 16:45:48 +05:30
Christoph Hannebauer
fb7f28b20f Improved debug output (#272)
* Improved debug output

* Improved debig output in JS file

Change in JS file corresponding to the one in the TS file

Co-authored-by: Balaga Gayatri <balaga-gayatri@github.com>
2022-12-19 16:36:23 +05:30
Balaga Gayatri
68184fbd5a [BUG FIX] Version pattern quickfix master (#244)
* Update Constants.ts

* Update Constants.js
2022-10-26 15:14:31 +05:30
Balaga Gayatri
14a755a4e2 Id token errormsg (#234)
* putting id-token generation in try catch block

* Updating node version in action.yml
2022-06-21 16:43:50 +05:30
Balaga Gayatri
e021afe0dc Handling warnings and adding OIDC promotion message (#221)
* Handling warnings and adding OIDC promotion message

* Implementing NIT suggestions
2022-05-02 19:46:30 +05:30
Balaga Gayatri
84519181a8 Adding az installation requirement to login error response (#198)
* Update main.ts

* Update main.js
2022-01-19 22:50:55 +05:30
Balaga Gayatri
25454e5e2d printing token logs (#185) 2021-12-07 00:16:39 +05:30
Balaga Gayatri
4799d94391 Adding federated token logs & optional audience parameter (#159)
* cherry pick changes

* added audience field option in input params

* added js

* removed extra spaces

* Adding logs to surface AZ-CLI and powershell errors (#171)

* removing token logs
2021-11-15 12:45:07 +05:30
Balaga Gayatri
fd4c9019e3 oidc changes for master (#158)
* oidc changes

* Update ServicePrinicipalLogin.test.ts

Co-authored-by: Kanika Pasrija <58769601+kanika1894@users.noreply.github.com>
2021-10-22 16:27:01 +05:30
Arjun Gupta
56641ce573 remove az login else block. bad merge. + tidy up some code 2020-12-30 22:12:01 +05:30
Arjun Gupta
9584e50c92 resolve merge conflict attempt #1. 2020-12-28 16:29:52 +05:30
Zainudeen V K
4440d80620 PR to include support for Sovereign cloud in azlogin action (#85)
* added support for Azure Gov cloud

* changes to Azure cloud

* az gov cloud changes

* changes as per PR comment

* chnages to include enum and valdiation

* changes to include validation

* changes

* deleted Enums.js

* changes to constant file

* added library of Consts.js

* changes from arary to set

* changes to environment input
2020-12-10 19:13:33 +05:30
aksm-ms
e7b230d17a adding params to escape symbols in az cli (#80)
* adding params to escape symbols in az cli

* addressed review comments
2020-11-06 15:37:06 +05:30
aksm-ms
45f2ccef11 adding az cli version debug logs (#76) 2020-11-03 17:12:56 +05:30
Ganeshrockz
481142a71d Added no subscription support (#73)
* Added no subscription support

* Added L0s

* added no subcriptions login support

* test changes

Co-authored-by: Ganesh S <ganeshs@CBREV-KESTUR.redmond.corp.microsoft.com>
Co-authored-by: aksm-ms <58936966+aksm-ms@users.noreply.github.com>
2020-11-03 13:49:13 +05:30
Usha N
f86425d665 Updating telemetry to remove Hashing of repo name (#66)
* Updating telemetry to remove Hashing of repo name

We have CELA sign off to log user name in telemetry instead of a Hash.. It will also help us map repo names with Azure subscriptions directly.

* Update main.ts

* adding lib/main.js

* adding main.ts

Co-authored-by: Ashish Ranjan <asranja@github.com>
Co-authored-by: aksm-ms <58936966+aksm-ms@users.noreply.github.com>
2020-10-21 10:25:56 +05:30
Rakesh Kumar
513cdfa020 login action for azurestack (#41)
* login action for azurestack

* test update for azurestack

* review changes

* review changes v2

* review changes v3
2020-08-28 09:18:43 +05:30
aksm-ms
b25b548bf8 escaping single quotes (#38) 2020-06-15 14:31:32 +05:30
aksm-ms
f41148c378 fixing special char issue in clientSecret (#36)
* fixing special char issue in clientSecret

* Removing quotes from constants

* Adding scriptbuilder.js
2020-06-12 22:11:19 +05:30
JasonTheDeveloper
eeeade0627 fix: wrap PowerShellToolRunner.psPath in "" (#31) 2020-05-13 11:06:52 +05:30
aksm-ms
cf9ec15344 making login calls silent (#19)
Co-authored-by: Deepak Sattiraju <desattir@microsoft.com>
2020-04-15 11:39:47 +05:30
aksm-ms
3ec3e73a1c Added Unit tests (#15)
* Added unit tests for Azure PowerShell

* Added unit tests

* changes in utils

* removed babel

* changed variable name of enable-PSSession

* refactor

* added ci.yml

* changes in utils test
2020-04-08 17:42:18 +05:30
Akshaya M
946067d034 added boolean for error log 2020-03-27 18:01:05 +05:30
Akshaya M
28f29173ac added log in ServicePrincipalLogin 2020-03-27 09:56:23 +05:30
Akshaya M
97c66dece8 added review comments 2020-03-24 14:17:39 +05:30
Akshaya M
db864cee1a Code refactor 2020-03-22 23:54:24 +05:30
Akshaya M
0935db3306 Added telemetry info 2020-03-20 16:32:12 +05:30
Akshaya M
ad3250b83a Added changes for review comments 2020-03-20 16:00:28 +05:30
Akshaya M
a2be320a3e added review comments 2020-03-19 19:27:30 +05:30
Akshaya M
7e72509c6b changes in main 2020-03-19 11:38:04 +05:30
aksm-ms
860e5ace46 Revert "added paths in tsconfig.json"
This reverts commit cb2f4176bf.
2020-03-17 17:26:39 +05:30
aksm-ms
cb2f4176bf added paths in tsconfig.json 2020-03-17 15:34:44 +05:30
aksm-ms
09ec3faf97 changes in setmodulepath 2020-03-17 09:46:10 +05:30
Akshaya M
04bdab0c41 changes in scriptbuilder 2020-03-16 17:10:02 +05:30
Akshaya M
c909df3338 added review comments 2020-03-16 17:07:31 +05:30
Akshaya M
7fc98cfa3d Code refactor 2020-03-16 17:01:10 +05:30
Akshaya M
3e94d97948 Code refactor 2020-03-16 15:15:59 +05:30
aksm-ms
1c43646e3a code refactor 2020-03-10 10:18:25 +05:30
aksm-ms
1c9bfa52b4 changes in loginAzurePowerShell 2020-03-09 17:40:48 +05:30