-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Developer app - update option creates new credentials everytime we run #17
Comments
👍 |
Apigee "developer" and "app" entities are app consumption operations and is different from API deployment entities like cache, targetserver etc., The API deployment is expected to happen often and API consumption in CI/CD pipeline is expected to happen less often. For the purposes of automated testing we could create some "developer" and "app" entities and a way to do it is to split the plugin invocation into 2 different steps.
|
FYI, I just found out there is a limit of 100 credentials on an App. |
Hi @msadasivam But when running the command only for Dev App and with 'create' option a new API Key is still created in top of the previous ones we have already created for this Dev App.
Please can you help me with this issue? TA |
@Carmot With the option "create" I can see that the app is skipped when it exists. Taking the example in samples in this repo you command gave me the following. [INFO] App "coolhughapp" already exists. Skipping. |
Thanks @msadasivam , Output log from our tool:
|
I've just found this in the APIGEE docs:
Looks like each time a product is updated a new api key is created. |
I think @Carmot has nailed it and found the underlying challenge. With the current implementation, it's really difficult to achieve what we need (see below) with minimal code changes.
We had to write a custom code and wire it up with our CI/CD process to achieve what we need from Developer "Apps" management perspective while we still use the plugin for other needs like API Products, KVMs, etc. |
Agree, the presence of API Products in the "app" forces a new credential. To update attributes of a developer app without impacting credentials the "apiProducts" attribute should not be present. A potential enhancement is to provide credential management goals in the plugin. |
@msadasivam @ssvaidyanathan Is there any plan to address this open issue? The more we invest in custom code the more tech debt we are accumulating and spending more time maintaining it. :) |
=== Is this key confllct issue resolved? when we do run maven install with config.option=update it will pick both deployment (kvm cache etc.) and consumption entities (apps, products, keys etc.). This again leads us to key conflict error in apps below. How can we run "update" only for deployment entities such as kvm, caches etc excluding consumption entities . Running one by one with apigee-config: is one option but doing it for each entity/goal is not best way. Is there a way we can separate out consumption entities from API deployment that will happen often. |
TL;DR
@aakashsharmaquilter I think the issue that you are highlighting is still out there. The behavior of the plugin is a little misleading as we will think that -Dapigee.config.options=update will simply update what is already available on Edge. But unfortunately, we don't see the behavior when the goal is importKeys . @msadasivam @ssvaidyanathan Your thoughts? I know I'm probably highlighting multiple issues here. Let me know if we need to create a new issue for importKeys issue. |
@aakashsharmaquilter - for your issue, you could make use of the Maven lifecycle. You can have all the deployment entities in your pom with |
You could also use apigee.config.options=none which will skip the config items.
Another alternative would be to delete the "test app" when you're done using:
That way, you'll only ever have one set of credentials. |
@dineshpalanivel - this is how the Mgmt API works, if you include the API Product while updating an app, it WILL create a new set of credentials. importKeys is meant for importing external keys to Apigee. Don't think your use case should use this. When you say you want to update the scope, can you provide some info? I am assuming you are updating scopes in the Product. Are you updating the app as well in your pipeline? |
@ssvaidyanathan If you have custom attributes and OAuth scopes at the app level and if there is a need that it goes thru changes, how do we get it accomplished? I agree with you that its the fundamental behavior of the underlying management API call to create new creds. But in our case, its byproduct that we don't want and I think that's the very purpose of this issue. :) |
I understand that :) I don't think updating a product will have any impact to an existing app that uses that product |
@ssvaidyanathan OAuth scopes could be at the product level and also at the app level. App level scopes override product level scopes. Edit: We DO NOT configure OAuth scopes as custom attributes. We manage the scopes as a part of scopes object in the json. Example: |
Got it - so you are using the Mgmt API to update the app scopes (which is not shown in the UI). The only option I can think is to come up with a feature that ignores the apiProduct config in the app so that it updates everything else passed in the payload and NOT generate a new credential. |
Correct. We use the management API to update the app scopes. |
Ok.. Will try and add that feature |
For credentials, as long as we honor the JVM argument -Dapigee.config.options, that would be great too. Coz, we have pipelines syncing up creds across two different API Gateway products and this feature would be awesome. |
thanks @ssvaidyanathan Yes corrrect as @dineshpalanivel mentioned if it just continues without error in case key exist and for new keys just add them. Similar to kvms. |
for your issue, you could make use of the Maven lifecycle. You can have all the deployment entities in your pom with install as the phase and then for the consumption entities, you can have them as deploythanks @kurtkanaskie @ssvaidyanathan will try that. |
@dineshpalanivel - I plan to just add a logic to the app goal to ignore the product (by passing an argument like |
Fixed in v1.4.5 - README section for this |
@ssvaidyanathan - For 1.4.5 it doesn't address the import key issue if key already exists. As new apps are added on platform we need some way to import keys through ci/cd. When we add new keys it imports them, but just errors out for old apps wherever key matches. This is with reference to update and "all" option. |
Please open a new issue for this. The initial issue opened was for preventing new credentials being created when app was being updated. |
thanks I have added #123 |
Thank you @ssvaidyanathan for the fix. Awesome. Now over to issue # # #123 :) |
@ssvaidyanathan why the fix is not available for Apigee X (v2.x.x) ? We are using Apigee X and facing this issue. |
Thanks for creating #128 @dfsabugal |
Thank you @ssvaidyanathan. |
Two issues:
The text was updated successfully, but these errors were encountered: