mattyschell / test-agol-update

Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Test using a personal ArcGIS Online account for integration testing #2

Closed mattyschell closed 1 year ago

mattyschell commented 1 year ago

The ESRI experts recommend using a personal account for integration testing. This is typically how they do it.

Try this out. I see at least two items to confirm:

  1. The python post-process will need to be able to authenticate with a personal account ideally plugged into the same externalized credential file. How much effort will it be for someone else to run the integration tests? Will they have to read long confusing instructions or can they just go.

  2. Similarly the FME publishing process has a web connection (?) that is authenticated to the headless ArcGIS Online account. What would it take to use a personal account instead? What is the level of effort to transfer an FME workspace with a personal account web connection to another person?

mattyschell commented 1 year ago

The python post-process will need to be able to authenticate with a personal account ideally plugged into the same externalized credential file. How much effort will it be for someone else to run the integration tests? Will they have to read long confusing instructions or can they just go.

I don't think this is possible. My named user doesn't have a password in the ArcGIS Online organization but generateToken requires a password.

https://developers.arcgis.com/rest/users-groups-and-items/generate-token.htm

I think the ESRI experts suggested this approach because they have named users with passwords in each ArcGIS Online Organization that they support. Matt-NYC, Matt-DVRPC, etc. I could set up Matt-NYC instead of using a textxxx headless account but functionally those are the same thing and the headless account with my name as the head is more confusing.

Also after working with my personal account for a few tries...

ValueError: got response {'error': {'code': 400, 'message': 'Unable to generate token.', 'details': ['Too many invalid logins. Please try again later.']}} from generateToken

... which fair enough. But also, enough of this.

mattyschell commented 1 year ago

I also took a look at OAUTH token, which is now the default for arcgis:

https://developers.arcgis.com/rest/users-groups-and-items/authorize.htm

It expects authentication using an application id instead of a user. Again, not a good fit for purpose, but consider revisiting especially if I am misunderstanding.