Skip to content
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

Discovery agent fails to create credential #68

Open
cbordier opened this issue Sep 27, 2022 · 1 comment
Open

Discovery agent fails to create credential #68

cbordier opened this issue Sep 27, 2022 · 1 comment

Comments

@cbordier
Copy link
Collaborator

When the first time I asked credentials, after the access request, my credentials remained in PENDING state and the agent logs shows the following:

{"level":"info","message":"processing access request for api APIGEE-PetStore-OAuth to app pet-shelter","time":"2022-09-26T21:10:46-07:00"} {"level":"info","message":"creating api product APIGEE-PetStore-OAuth-freemium-2 for api APIGEE-PetStore-OAuth","time":"2022-09-26T21:10:47-07:00"} {"level":"info","message":"provisioning credentials for app pet-shelter","time":"2022-09-26T21:10:50-07:00"} {"level":"info","message":"processing access request for api APIGEE-PetStore-OAuth to app pet-shelter","time":"2022-09-26T21:10:46-07:00"} {"level":"info","message":"creating api product APIGEE-PetStore-OAuth-freemium-2 for api APIGEE-PetStore-OAuth","time":"2022-09-26T21:10:47-07:00"} {"level":"info","message":"provisioning credentials for app pet-shelter","time":"2022-09-26T21:10:50-07:00"} {"level":"error","message":"subscription provisioning - at least one product access is required for a credential","time":"2022-09-26T21:10:51-07:00"} {"component":"serviceClient","level":"error","message":"failed to link sub resource state to resource first-apigee: [Error Code 1120] - error making a request to Amplify: status - 400, title - Validation error, detail - [#/name: is not a valid enum value]","package":"sdk.apic","time":"2022-09-26T21:10:51-07:00"} {"action":"CREATED","component":"credentialHandler","error":"[Error Code 1120] - error making a request to Amplify: status - 400, title - Validation error, detail - [#/name: is not a valid enum value]","level":"error","message":"error creating subresources","name":"first-apigee","package":"sdk.agent.handler","resource":"Credential","sequence":2782324,"time":"2022-09-26T21:10:52-07:00"}

@jcollins-axway
Copy link
Collaborator

jcollins-axway commented Sep 27, 2022

Seems to be a race condition.

Possible resolution

  • Create locking between access request and credential handlers
  • Locks should be associated with managed application

To determine

  • What happens when last access request removed from managed application that still has credentials
  • What happens if credential request received when no access requests exist on managed application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants