How to restrict to create multiple credentials in developer app through management API calls?

Hi Team,

While I am creating a developer app through management API using post call it creates app credentials in the first deployment. But in case I want to run again the developer app creation call through the PUT method then it adds extra credentials to the same developer app.

Is this possible to restrict creating multiple credentials for same app? I need single credentials if I run multiple times an app.

Note: If I run the CI/CD pipeline multiple times also its creating multiple credentials for same app.

Thank you,

Sravani

Solved Solved
0 1 156
1 ACCEPTED SOLUTION

Today there is no built-in mechanism to limit the number of credentials associated to an App in Apigee.

But in case I want to run again the developer app creation call through the PUT method then it adds extra credentials to the same developer app.

At the risk of stating the obvious, if you don't want multiple distinct credentials, then don't make the PUT call to create credentials if there are existing credentials.

If making that adjustment is difficult for some reason, I can make some other suggestions.

  • keep your CI/CD the same, and Introduce a scheduled task via GCP Task Scheduler to "clean up" and remove redundant credentials.
  • Modify your CI/CD and scripts to check for existing credentials before creating new ones.
  • Modify your CI/CD and scripts to check for existing developer app and DELETE IT before creating a new developer app and credentials.
  • Modify your runtime check of credentials so that each proxy that checks credentials, also checks for other credentials on the same developer app and rejects credentials in which there are redundancies, or kicks off a job to remove redundant credentials asynchronously.

View solution in original post

1 REPLY 1

Today there is no built-in mechanism to limit the number of credentials associated to an App in Apigee.

But in case I want to run again the developer app creation call through the PUT method then it adds extra credentials to the same developer app.

At the risk of stating the obvious, if you don't want multiple distinct credentials, then don't make the PUT call to create credentials if there are existing credentials.

If making that adjustment is difficult for some reason, I can make some other suggestions.

  • keep your CI/CD the same, and Introduce a scheduled task via GCP Task Scheduler to "clean up" and remove redundant credentials.
  • Modify your CI/CD and scripts to check for existing credentials before creating new ones.
  • Modify your CI/CD and scripts to check for existing developer app and DELETE IT before creating a new developer app and credentials.
  • Modify your runtime check of credentials so that each proxy that checks credentials, also checks for other credentials on the same developer app and rejects credentials in which there are redundancies, or kicks off a job to remove redundant credentials asynchronously.