Using 2 Factor Authentication with EdgeTools

I found this really nice tool from Dino Chiesa on github: https://github.com/DinoChiesa/EdgeTools

I wanted to be able to list all proxies using a certain policy, however I can't make it work as the guidance in gitlab page doesn't state how to make it work with 2 Factor authentication. I also tried the --help command, however no luck either.

Anyone would have a snippet or a step by step example of how it works? I already have my .netrc file configured with username and password.

cheers

Rafael

0 2 133
2 REPLIES 2

Yes I own that repository.

I think when I put it together, I had not considered how to use 2FA when authenticating.

I have since built other tools, on top of a fairly complete JS library that wraps the Apigee Admin API.

findPoliciesByName.js might be what you want. It supports 2FA.

I'm just now looking at the readme for the library and for those tools, there is no description of how to use 2FA. But if you check the help on the tool, it gives you these options:

  -Z, --ssoZone=ARG          specify the SSO zone to use when authenticating. 
  -C, --passcode=ARG         specify the passcode to use when authenticating.

...which you can use for SSO.

I am not sure about Apigee-managed 2FA. I think that might work the same way as SSO, except you wouldn't need the zone. Just the -C parameter (passcode).

Try it and see.

Thanks Dino for your reply! it seems it doesn't work with 2FA. I have tried using the generated code from Google Authenticator as a passcode and also tried using the shared key from apigee as well, but all of these option I got the error below... When I used my personal account credentials which doesn't have 2FA it worked perfectly though! So it's a nice tool, however would be nice if could work with 2FA as well.

9995-screen-shot-2020-06-10-at-110325-am.png