Passing service account email in CI/CD shared-pom.xml file

Hi,

I am trying to use google apis to retrieve the analytics data by an apigee proxy for which I am using below Property of HTTPTargetConnection to generate google access token.

https://cloud.google.com/apigee/docs/api-platform/security/google-auth/overview

<Authentication>
  <GoogleAccessToken>
    <Scopes>
      <Scope>https://www.googleapis.com/auth/cloud-platform</Scope>
    </Scopes>
  </GoogleAccessToken>
</Authentication>

To use this I have to use a service account to deploy the proxy. I can deploy the proxy by UI and enter the service account name and it does the work.

Now I need to automate this step in my CI/CD. I tried to use below tag in shared-pom.xml in env properties. But it did not work.

<apigee.googletoken.email>my-serviceAccount-email</apigee.googletoken.email>

And it is throwing “requires a service account identity, but one was not provided with the request.”

Could you please share the correct config in pom file, so that the service account can be passed in the queryparam, similar to the ‘override’ param?

Hello @ayan8902

Your configuration is correct: <apigee.googletoken.email>my-serviceAccount-email</apigee.googletoken.email> but you need to have correctly configured the version of the maven plugin, I remember that I had some months ago the same problem and the way that I fixed was setting the last version of the apigee maven plugin… the current version is: 2.5.1 (https://github.com/apigee/apigee-deploy-maven-plugin)

Hi @AldoMeneses86 ,

Thanks for your response. I will try your suggested version.

The maven plugin version I am using is 2.1.0, could you please confirm if this version doesn’t support the ‘<apigee.googletoken.email>’?

Regards,

Ayan Biswas

Hello @ayan8902

You can check it on: https://github.com/apigee/apigee-deploy-maven-plugin/releases

Best