api-services-portal
api-services-portal copied to clipboard
Regenerate credential displays error when authorization scope is changed from Kong API Key with ACL flow to Client Credentials
Step 1: Sign in as Janis Step 2 : Select the environment of the product that has Kong API Key with ACL flow and access request is approved for the environment Step 3: Change the authorization scope from Kong API Key with ACL to Client Credential flow Step 4: Upload the plugin to Kong Step 5: Sign in as Harley Step 6: Navigate to my Access page Step 7: Select the Product and the environment whose Authorization scope has been updated Step 8: Click on Regenerate Credential button
Actual Result : Regenerate credential displays error when authorization scope is changed from Kong API Key with ACL flow to Client Credentials
Expected Result : 1)Regenerate credential should display correct client ID and Secret credential when authorization scope is changed from Kong API Key with ACL flow to Client Credentials 2)Service should be accessible with new credential
APS-log:
apsportal | debug: [keystone.svc-access] Query [lookupCredentialReferenceByServiceAccess] result {"data":{"allServiceAccesses":[{"id":"8","consumerType":"client","productEnvironment":{"id":"3","name":"test","additionalDetailsToRequest":"This is a automation testEditing dev environment","flow":"client-credentials","credentialIssuer":{"id":"6","clientAuthenticator":"client-secret"}},"application":{"name":"For Test Env","owner":{"name":"Harley Jones","username":"harley","email":"[email protected]"}},"consumer":{"id":"8","username":"CD299A7D-943A0515ACD","customId":"CD299A7D-943A0515ACD","extForeignKey":"315beb33-fe33-4fc7-b153-b691eb9c39ae"},"credentialReference":"{"keyAuthPK":"abcdfd64-fa6f-48da-8116-2742100cde40","clientId":"CD299A7D-943A0515ACD"}"}]}}
apsportal | debug: [keystone.prod-env] [lookupEnvironmentAndIssuerUsingWhereClause] WHERE {"id":"3"}
apsportal | error: [general] GraphQL Error: Client ID not found CD299A7D-943A0515ACD
apsportal |
apsportal | GraphQL request:3:5
apsportal | 2 | mutation genCredential($id: ID!) {
apsportal | 3 | regenerateCredentials(id: $id) {
apsportal | | ^
apsportal | 4 | credential
apsportal | {"level":50,"time":1670305164172,"pid":23,"hostname":"14e00e3feffa","name":"graphql","message":"Client ID not found CD299A7D-943A0515ACD","locations":[{"line":3,"column":5}],"path":["regenerateCredentials"],"uid":"clbbskh3300040nrugps3hy5b","name":"GraphQLError","generatedMessage":false,"code":"ERR_ASSERTION","actual":0,"expected":1,"operator":"strictEqual","stack":"KeycloakClientService.
Although this is an error, it is a very boundary case, so I am going to label as wontfix but if we have free cycles we could look at later.