GoogleCloudPlatform / application-integration-management-toolkit

This tool lets you interact with Application Integration, Integration Connectors or Apigee Integration/Connector APIs. The tool lets you manage (create, del, get, list) integrations, connections etc.
Apache License 2.0
22 stars 16 forks source link

Authentication Profile patch #148

Closed cmgpbint closed 9 months ago

cmgpbint commented 10 months ago

When we are trying to use patch for authentication profiles it throws an error, the same payload works well via REST API call

<p>The requested URL <code>/v1/projects/<PROJECT>/locations/europe-west3/connections?updateMask=%2A</code> was not found on this server. 

 <ins>That’s all we know.</ins>
ssvaidyanathan commented 10 months ago

@cmgpbint - can you please share the command you are executing

cmgpbint commented 10 months ago

$(apigeeCONFIGS_INTEGRATIONS_CLI_GET) authconfigs update \ -t $(apigeeCONFIGS_INTEGRATIONS_CLIToken_GET) \ -f $AUTH_PROFILE_PAYLOAD \ -r $REGION \ --update-mask "*" \ -p $PROJECT

We are using a bash framework to encapsulate, but the arguments are being set correctly

ssvaidyanathan commented 10 months ago

which version are you using?

integrationcli --version
cmgpbint commented 10 months ago

We use a image, I had check and we are on 0.69

RUN export INTEGRATIONCLI_VERSION=v0.69 &&\ curl -L https://raw.githubusercontent.com/GoogleCloudPlatform/application-integration-management-toolkit/main/downloadLatest.sh | sh -

We were forced to set a version because of the LTS support, we had issues when we used downloadLatest.sh script
ssvaidyanathan commented 10 months ago

Thanks for confirming. There was a fix for Auth config update in v0.70 (https://github.com/GoogleCloudPlatform/application-integration-management-toolkit/releases/tag/v0.70)

Please update your version and retry. Let us know if the issue still exist

cmgpbint commented 10 months ago

Thanks for the feedback, I'll give you an update with LTS 0.70

ssvaidyanathan commented 10 months ago

@cmgpbint - were you able to test?

cesar-m-pinto-alb commented 10 months ago

Yes, after upgrade tthe tools to latest version ( integrationcli version 0.70 date: 2023-10-04T01:12:26Z [commit: 7968f90] )

We get the same error,

<p>The requested URL <code>/v1/projects/<PROJECT>/locations/europe-west3/connections?updateMask=%2A</code> was not found on this server. 

 <ins>That’s all we know.</ins>

worth menction when using via REST we can do it. The URL is sighly different, we are using

https://%s-integrations.googleapis.com/v1/projects/%s/locations/%s/authConfigs/%s?updateMask=*&alt=json

ssvaidyanathan commented 10 months ago

Thanks for checking @cesar-m-pinto-alb We will look into this and provide an update soon

ssvaidyanathan commented 10 months ago

We just released a beta version (v0.71.1-beta), can you please test using that and let us know if its working as expected

To install the beta version:

export INTEGRATIONCLI_VERSION=v0.71.1-beta
curl -L https://raw.githubusercontent.com/GoogleCloudPlatform/application-integration-management-toolkit/main/downloadLatest.sh | sh -
cesar-m-pinto-alb commented 10 months ago

Using the new version still having the problem

integrationcli version 0.71.1-beta date: 2023-11-15T20:43:35Z [commit: 6aa9520]

./integrationcli authconfigs update -t ya29.c.c -n hellohello-QA -p apidev-apigeex-sandbox -r europe-west1 -f hellohello-QA.json --update-mask '*'

The error is

The requested URL /v1/projects/apidev-apigeex-sandbox/locations/europe-west1/hellohello-QA?updateMask=%2A was not found on this server. That’s all we know. I had validated on Apigee and exists. Via REST API URL is different, maybe helps ` local REQUEST=$(printf 'https://%s-integrations.googleapis.com/v1/projects/%s/locations/%s/authConfigs/%s?updateMask=*&alt=json' $REGION $PROJECT $REGION $NAME)` It seems it's missing on your end **authConfigs** in the URL /v1/projects/apidev-apigeex-sandbox/locations/europe-west1/ **authConfigs** /hellohello-QA?updateMask=%2A

ssvaidyanathan commented 9 months ago

@cesar-m-pinto-alb - can you please try with 0.71.2-beta

cmgpbint commented 9 months ago

it worked.