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

Error reading application permissions. Error: Cannot coerce empty String ("") to com.axway.apim.api.model.apps.ApplicationPermission$SharePermission value #489

Open
saper opened this issue Jul 5, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@saper
Copy link

saper commented Jul 5, 2024

APIM-CLI version

1.14.4+ e6d2e54

API-Management version

7.7.20230228

Bug description

apim -s my-environment app get -id 3a73b789-8cc2-4d04-b5a1-dd3797371022 -o json fails with an exception fetch app permissions.

Steps to reproduce

This fails for any app in my environment I have checked.

It breaks with -o json, -o yaml.

It works OK with -o csv, -wide and -ultra.

Relevant log output

2024-07-05 13:52:50,815 [APIManagerCLI] INFO : API-Manager CLI: 1.14.5-SNAPSHOT
2024-07-05 13:52:50,817 [APIManagerCLI] DEBUG: Java Version: 21.0.3
2024-07-05 13:52:50,817 [APIManagerCLI] INFO : Module: Application - E X P O R T / U T I L S  (1.14.5-SNAPSHOT)
2024-07-05 13:52:50,832 [EnvironmentProperties] DEBUG: Trying to load environment properties from file: /u/extcieslak/src/apim-cli-1.14.5-SNAPSHOT/conf/env.properties ... not found.
2024-07-05 13:52:50,837 [EnvironmentProperties] DEBUG: Loaded environment properties from file: /u/extcieslak/src/apim-cli-1.14.5-SNAPSHOT/conf/env.ews-emea.properties
2024-07-05 13:52:51,766 [APIMHttpClient] DEBUG: API Manager CLI http client timeout : 30000
2024-07-05 13:52:51,770 [APIMHttpClient] DEBUG: API Manager CLI using Http(s) proxy : localhost
2024-07-05 13:52:51,806 [RestAPICall] DEBUG: Http verb:POST and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/login
2024-07-05 13:52:52,311 [RestAPICall] DEBUG: Http verb:GET and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/currentuser
2024-07-05 13:52:52,401 [APIManagerOrganizationAdapter] WARN : Using OrgAdmin only to load all organizations.
2024-07-05 13:52:52,401 [APIManagerOrganizationAdapter] DEBUG: Load organizations from API-Manager using filter: OrgFilter [name=null, id=8ef7fc60-3f01-4d79-ae70-a292a5a90449]
2024-07-05 13:52:52,401 [APIManagerOrganizationAdapter] DEBUG: Load organization with URI: https://affected.gatway.example.com:8075/api/portal/v1.4/organizations/8ef7fc60-3f01-4d79-ae70-a292a5a90449
2024-07-05 13:52:52,402 [RestAPICall] DEBUG: Http verb:GET and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/organizations/8ef7fc60-3f01-4d79-ae70-a292a5a90449
2024-07-05 13:52:52,423 [APIManagerOrganizationAdapter] DEBUG: Organization id to be cached : /8ef7fc60-3f01-4d79-ae70-a292a5a90449
2024-07-05 13:52:52,448 [RestAPICall] DEBUG: Http verb:GET and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/config
2024-07-05 13:52:52,492 [APIManagerAdapter] INFO : Organization Administrator Self Service Enabled : false
2024-07-05 13:52:52,492 [APIManagerAdapter] INFO : Successfully connected to API-Manager (7.7.20230228) on: https://affected.gatway.example.com:8075
2024-07-05 13:52:52,494 [APIManagerCustomPropertiesAdapter] DEBUG: Read configured custom properties from API-Manager
2024-07-05 13:52:52,494 [RestAPICall] DEBUG: Http verb:GET and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/config/customproperties
2024-07-05 13:52:52,558 [APIManagerOrganizationAdapter] WARN : Using OrgAdmin only to load all organizations.
2024-07-05 13:52:52,559 [APIManagerOrganizationAdapter] DEBUG: Load organizations from API-Manager using filter: OrgFilter [name=null, id=307b0653-271b-41fb-9ef9-2cd29a15da16]
2024-07-05 13:52:52,559 [APIManagerOrganizationAdapter] DEBUG: Load organization with URI: https://affected.gatway.example.com:8075/api/portal/v1.4/organizations/307b0653-271b-41fb-9ef9-2cd29a15da16
2024-07-05 13:52:52,559 [RestAPICall] DEBUG: Http verb:GET and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/organizations/307b0653-271b-41fb-9ef9-2cd29a15da16
2024-07-05 13:52:52,594 [APIManagerOrganizationAdapter] DEBUG: Organization id to be cached : /307b0653-271b-41fb-9ef9-2cd29a15da16
2024-07-05 13:52:52,597 [APIMgrAppsAdapter] DEBUG: Found: 1 applications
2024-07-05 13:52:52,606 [RestAPICall] DEBUG: Http verb:GET and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/applications/b87e8c3a-a33f-465d-bdc2-29fac88abcef/oauthresource
2024-07-05 13:52:52,633 [RestAPICall] DEBUG: Http verb:GET and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/applications/b87e8c3a-a33f-465d-bdc2-29fac88abcef/permissions
2024-07-05 13:52:52,660 [APIManagerAdapter] DEBUG: Closing cache ...
2024-07-05 13:52:52,724 [RestAPICall] DEBUG: Http verb:DELETE and URI: https://affected.gatway.example.com:8075/api/portal/v1.4/login
2024-07-05 13:52:52,748 [ApplicationExportApp] ERROR: Can't initialize API-Manager API-Representation.
                                 | Error reading application permissions. Error: Cannot coerce empty String ("") to `com.axway.apim.api.model.apps.ApplicationPermission$SharePermission` value (but could if coercion was enabled using `CoercionConfig`)
 at [Source: (String)"[{"id":"d977d300-4d35-41f1-a88c-1d4b313323d3","userId":"815e1a5b-6c63-41df-8d96-3dd682bc59ca","permission":"","createdBy":"63680303-0794-40a7-af6f-8c90fdcdd006","createdOn":1680350735455}]"; line: 1, column: 108] (through reference chain: java.util.ArrayList[0]->com.axway.apim.api.model.apps.ApplicationPermission["permission"])
com.axway.apim.lib.error.AppException: Can't initialize API-Manager API-Representation.
        at com.axway.apim.adapter.client.apps.APIMgrAppsAdapter.getApplications(APIMgrAppsAdapter.java:142)
        at com.axway.apim.appexport.ApplicationExportApp.runExport(ApplicationExportApp.java:114)
        at com.axway.apim.appexport.ApplicationExportApp.export(ApplicationExportApp.java:90)
        at com.axway.apim.appexport.ApplicationExportApp.export(ApplicationExportApp.java:54)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:130)
        at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:72)
Caused by: com.axway.apim.lib.error.AppException: Error reading application permissions. Error: Cannot coerce empty String ("") to `com.axway.apim.api.model.apps.ApplicationPermission$SharePermission` value (but could if coercion was enabled using `CoercionConfig`)
 at [Source: (String)"[{"id":"d977d300-4d35-41f1-a88c-1d4b313323d3","userId":"815e1a5b-6c63-41df-8d96-3dd682bc59ca","permission":"","createdBy":"63680303-0794-40a7-af6f-8c90fdcdd006","createdOn":1680350735455}]"; line: 1, column: 108] (through reference chain: java.util.ArrayList[0]->com.axway.apim.api.model.apps.ApplicationPermission["permission"])
        at com.axway.apim.adapter.client.apps.APIMgrAppsAdapter.addApplicationPermissions(APIMgrAppsAdapter.java:283)
        at com.axway.apim.adapter.client.apps.APIMgrAppsAdapter.getApplications(APIMgrAppsAdapter.java:133)
        ... 7 more
Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot coerce empty String ("") to `com.axway.apim.api.model.apps.ApplicationPermission$SharePermission` value (but could if coercion was enabled using `CoercionConfig`)
 at [Source: (String)"[{"id":"d977d300-4d35-41f1-a88c-1d4b313323d3","userId":"815e1a5b-6c63-41df-8d96-3dd682bc59ca","permission":"","createdBy":"63680303-0794-40a7-af6f-8c90fdcdd006","createdOn":1680350735455}]"; line: 1, column: 108] (through reference chain: java.util.ArrayList[0]->com.axway.apim.api.model.apps.ApplicationPermission["permission"])
        at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)
        at com.fasterxml.jackson.databind.DeserializationContext.reportBadCoercion(DeserializationContext.java:1817)
        at com.fasterxml.jackson.databind.deser.std.StdDeserializer._checkCoercionFail(StdDeserializer.java:1662)
        at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._deserializeAltString(EnumDeserializer.java:364)
        at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._fromString(EnumDeserializer.java:279)
        at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:248)
        at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:359)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
        at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3772)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3755)
        at com.axway.apim.adapter.client.apps.APIMgrAppsAdapter.addApplicationPermissions(APIMgrAppsAdapter.java:273)
        ... 8 more
@saper saper added the bug Something isn't working label Jul 5, 2024
@saper saper changed the title Error reading application permissions. Error: Cannot coerce empty String ("") to com.axway.apim.api.model.apps.ApplicationPermission$SharePermission value Error reading application permissions. Error: Cannot coerce empty String ("") to com.axway.apim.api.model.apps.ApplicationPermission$SharePermission value Jul 5, 2024
@rathnapandi rathnapandi self-assigned this Oct 7, 2024
@rathnapandi
Copy link
Member

Hi Saper,
Can you call API Manager REST api and get the application details? as I dont see any error in my environment.

./apim.sh app get  -id 3cc168d8-c5c6-4e94-ac23-85de01ee508d -o json -h 10.129.144.250 -u apiadmin -p xxxxxx
2024-10-07 12:52:22,613 [APIManagerCLI] INFO : API-Manager CLI: 1.14.6-SNAPSHOT
2024-10-07 12:52:22,614 [APIManagerCLI] DEBUG: Java Version: 17.0.9
2024-10-07 12:52:22,614 [APIManagerCLI] INFO : Module: Application - E X P O R T / U T I L S  (1.14.6-SNAPSHOT)
2024-10-07 12:52:22,618 [EnvironmentProperties] DEBUG: Trying to load environment properties from file: env.properties ... not found.
2024-10-07 12:52:23,118 [APIMHttpClient] DEBUG: API Manager CLI http client timeout : 30000
2024-10-07 12:52:23,142 [RestAPICall] DEBUG: Http verb:POST and URI: https://10.129.144.250:8075/api/portal/v1.4/login
2024-10-07 12:52:23,678 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/currentuser
2024-10-07 12:52:23,796 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/config
2024-10-07 12:52:24,030 [APIManagerAdapter] INFO : Successfully connected to API-Manager (7.7.20240530) on: https://10.129.144.250:8075
2024-10-07 12:52:24,031 [APIManagerCustomPropertiesAdapter] DEBUG: Read configured custom properties from API-Manager
2024-10-07 12:52:24,031 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/config/customproperties
2024-10-07 12:52:24,179 [APIMgrAppsAdapter] DEBUG: Sending request to find existing applications: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d
2024-10-07 12:52:24,180 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d
2024-10-07 12:52:24,403 [APIManagerOrganizationAdapter] DEBUG: Load organizations from API-Manager using filter: OrgFilter [name=null, id=b790c5e6-0194-47dc-9684-e619c1247f62]
2024-10-07 12:52:24,404 [APIManagerOrganizationAdapter] DEBUG: Load organization with URI: https://10.129.144.250:8075/api/portal/v1.4/organizations/b790c5e6-0194-47dc-9684-e619c1247f62
2024-10-07 12:52:24,404 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/organizations/b790c5e6-0194-47dc-9684-e619c1247f62
2024-10-07 12:52:24,596 [APIManagerOrganizationAdapter] DEBUG: Organization id to be cached : /b790c5e6-0194-47dc-9684-e619c1247f62
2024-10-07 12:52:24,602 [APIMgrAppsAdapter] DEBUG: Found: 1 applications
2024-10-07 12:52:24,603 [APIManagerQuotaAdapter] DEBUG: Found quota with ID: 3cc168d8-c5c6-4e94-ac23-85de01ee508d in cache: {"id":"00000000-0000-0000-0000-000000000001","type":"APPLICATION","name":"Application Default","description":"Maximum message rates per application. Applied to each application unless an Application-Specific quota is configured","restrictions":[{"api":"5ff83c1a-d7cb-4f89-a596-feda70e0b77f","method":"*","type":"throttlemb","config":{"period":"day","per":"1","mb":"1000"}}],"system":true}
2024-10-07 12:52:24,608 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/proxies/5ff83c1a-d7cb-4f89-a596-feda70e0b77f
2024-10-07 12:52:24,753 [APIManagerOrganizationAdapter] DEBUG: Load organizations from API-Manager using filter: OrgFilter [name=null, id=a0a1d33d-8063-4b67-b872-0aeaeb4b5271]
2024-10-07 12:52:24,753 [APIManagerOrganizationAdapter] DEBUG: Load organization with URI: https://10.129.144.250:8075/api/portal/v1.4/organizations/a0a1d33d-8063-4b67-b872-0aeaeb4b5271
2024-10-07 12:52:24,753 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/organizations/a0a1d33d-8063-4b67-b872-0aeaeb4b5271
2024-10-07 12:52:25,005 [APIManagerOrganizationAdapter] DEBUG: Organization id to be cached : /a0a1d33d-8063-4b67-b872-0aeaeb4b5271
2024-10-07 12:52:25,007 [APIManagerAPIAdapter] DEBUG: Found: 1 exposed API(s): 
2024-10-07 12:52:25,008 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d/extclients
2024-10-07 12:52:25,206 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d/oauth
2024-10-07 12:52:25,465 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d/apikeys
2024-10-07 12:52:25,576 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d/oauthresource
2024-10-07 12:52:25,691 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d/permissions
2024-10-07 12:52:25,961 [APIManagerAPIAccessAdapter] DEBUG: Load API-Access with type: applications from API-Manager with ID: 3cc168d8-c5c6-4e94-ac23-85de01ee508d
2024-10-07 12:52:25,962 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/applications/3cc168d8-c5c6-4e94-ac23-85de01ee508d/apis
2024-10-07 12:52:26,213 [RestAPICall] DEBUG: Http verb:GET and URI: https://10.129.144.250:8075/api/portal/v1.4/proxies/c6926ba9-ca50-4d34-877f-0b42d2c2bb78
2024-10-07 12:52:26,517 [APIManagerAPIAdapter] DEBUG: Found: 1 exposed API(s): 
2024-10-07 12:52:26,519 [ApplicationExportApp] INFO : Found 1 application(s).
2024-10-07 12:52:26,521 [JsonApplicationExporter] INFO : Going to export applications into folder: /Users/rnatarajan/IdeaProjects/apim-cli-dev/distribution/target/axway-apimcli-1.14.6-SNAPSHOT/apim-cli-1.14.6-SNAPSHOT/scripts/Consuming Test App 499 2172
2024-10-07 12:52:26,541 [JsonApplicationExporter] INFO : Successfully exported application to folder: /Users/rnatarajan/IdeaProjects/apim-cli-dev/distribution/target/axway-apimcli-1.14.6-SNAPSHOT/apim-cli-1.14.6-SNAPSHOT/scripts/Consuming Test App 499 2172
2024-10-07 12:52:26,541 [ApplicationExportApp] DEBUG: Successfully exported 1 application(s).
2024-10-07 12:52:26,541 [APIManagerAdapter] DEBUG: Closing cache ...
2024-10-07 12:52:26,623 [RestAPICall] DEBUG: Http verb:DELETE and URI: https://10.129.144.250:8075/api/portal/v1.4/login

Exported output

{
  "name" : "Consuming Test App 499 2172",
  "organization" : "API Development 5172",
  "state" : "approved",
  "enabled" : true,
  "credentials" : [ ],
  "apis" : [ {
    "apiName" : "ApplicationExportTestIT-499",
    "apiVersion" : "1.0.1"
  } ],
  "permissions" : [ {
    "permission" : "view",
    "user" : "test2"
  } ],
  "appScopes" : [ ]
}

@saper
Copy link
Author

saper commented Oct 8, 2024

Can you tell me which URL shall I call?

I was also trying to get the actual HTTP request and the response by tweaking the logging properties but didn't get far with this.

@saper
Copy link
Author

saper commented Oct 8, 2024

Here is what I have tried so far to get the HTTP transactions out:

        -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog \
        -Dorg.apache.commons.logging.simplelog.showdatetime=true \
        -Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG \
        -Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=DEBUG \

@rathnapandi
Copy link
Member

Add it to your apim.sh or apim.bat file

"$_java" -Xms64m -Xmx256m -Dlog4j.configurationFile=../lib/log4j2.xml  -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG -classpath "$CP" com.axway.apim.cli.APIManagerCLI "${@}"

If compression is enabled on API gateway, add command line parameter -disableCompression to print log in plain text.

@saper
Copy link
Author

saper commented Oct 9, 2024

Thank you, this works great to see the HTTP request/response.

Looks like we are getting

[
  {
    "id": "0be172d7-3a1b-413d-8e18-a7d6e6bf861c",
    "userId": "815e1a5b-6c63-41df-8d96-3dd682bc59ca",
    "permission": "",
    "createdBy": "63680303-0794-40a7-af6f-8c90fdcdd006",
    "createdOn": 1680350847704
  }
]

as a response to the /api/portal/v1.4/applications/<app-id>/permissions endpoint.

Here is the API call:

2024/10/09 09:04:52:324 CEST [DEBUG] MainClientExec - Executing request GET /api/portal/v1.4/applications/3a73b789-8cc2-4d04-b5a1-dd3797371022/permissions HTTP/1.1
2024/10/09 09:04:52:324 CEST [DEBUG] MainClientExec - Target auth state: UNCHALLENGED
2024/10/09 09:04:52:324 CEST [DEBUG] headers - http-outgoing-1 >> GET /api/portal/v1.4/applications/3a73b789-8cc2-4d04-b5a1-dd3797371022/permissions HTTP/1.1
2024/10/09 09:04:52:324 CEST [DEBUG] headers - http-outgoing-1 >> CSRF-Token: *redacted*
2024/10/09 09:04:52:325 CEST [DEBUG] headers - http-outgoing-1 >> Host: affected.gateway.fabrikam.com:8075
2024/10/09 09:04:52:325 CEST [DEBUG] headers - http-outgoing-1 >> Connection: Keep-Alive
2024/10/09 09:04:52:325 CEST [DEBUG] headers - http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.14 (Java/21.0.4)
2024/10/09 09:04:52:325 CEST [DEBUG] headers - http-outgoing-1 >> Cookie: APIMANAGERSESSION=*redacted*; APIMANAGERSTATIC=96fb5ab2-6fc7-487c-8996-7661043b975d
2024/10/09 09:04:52:325 CEST [DEBUG] wire - http-outgoing-1 >> "GET /api/portal/v1.4/applications/3a73b789-8cc2-4d04-b5a1-dd3797371022/permissions HTTP/1.1[\r][\n]"
2024/10/09 09:04:52:325 CEST [DEBUG] wire - http-outgoing-1 >> "CSRF-Token: *redacted*
2024/10/09 09:04:52:325 CEST [DEBUG] wire - http-outgoing-1 >> "Host: affected.gateway.fabrikam.com:8075[\r][\n]"
2024/10/09 09:04:52:325 CEST [DEBUG] wire - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]"
2024/10/09 09:04:52:325 CEST [DEBUG] wire - http-outgoing-1 >> "User-Agent: Apache-HttpClient/4.5.14 (Java/21.0.4)[\r][\n]"
2024/10/09 09:04:52:325 CEST [DEBUG] wire - http-outgoing-1 >> "Cookie: APIMANAGERSESSION=*redacted*; APIMANAGERSTATIC=96fb5ab2-6fc7-487c-8996-7661043b975d[\r][\n]"
2024/10/09 09:04:52:325 CEST [DEBUG] wire - http-outgoing-1 >> "[\r][\n]"
2024/10/09 09:04:52:354 CEST [DEBUG] wire - http-outgoing-1 << "HTTP/1.1 200 OK[\r][\n]"
2024/10/09 09:04:52:354 CEST [DEBUG] wire - http-outgoing-1 << "Date: Wed, 09 Oct 2024 07:04:52 GMT[\r][\n]"
2024/10/09 09:04:52:354 CEST [DEBUG] wire - http-outgoing-1 << "Content-Type: application/json[\r][\n]"
2024/10/09 09:04:52:354 CEST [DEBUG] wire - http-outgoing-1 << "X-Frame-Options: DENY[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "X-Content-Type-Options: nosniff[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "X-XSS-Protection: 1; mode=block[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Content-Security-Policy: default-src 'none'[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Cache-Control: no-cache, no-store, must-revalidate[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Pragma: no-cache[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Expires: 0[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Server: [\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Strict-Transport-Security: max-age=31536000; includeSubDomains[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Transfer-Encoding: chunked[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "Connection: keep-alive[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "X-CorrelationID: Id-142b066757ba915d91a9c71e 0[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "bc[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "[{"id":"0be172d7-3a1b-413d-8e18-a7d6e6bf861c","userId":"815e1a5b-6c63-41df-8d96-3dd682bc59ca","permission":"","createdBy":"63680303-0794-40a7-af6f-8c90fdcdd006","createdOn":1680350847704}][\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "0[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] wire - http-outgoing-1 << "[\r][\n]"
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << HTTP/1.1 200 OK
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Date: Wed, 09 Oct 2024 07:04:52 GMT
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Content-Type: application/json
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << X-Frame-Options: DENY
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << X-Content-Type-Options: nosniff
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << X-XSS-Protection: 1; mode=block
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Content-Security-Policy: default-src 'none'
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Cache-Control: no-cache, no-store, must-revalidate
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Pragma: no-cache
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Expires: 0
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Server: 
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Strict-Transport-Security: max-age=31536000; includeSubDomains
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Transfer-Encoding: chunked
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << Connection: keep-alive
2024/10/09 09:04:52:355 CEST [DEBUG] headers - http-outgoing-1 << X-CorrelationID: Id-142b066757ba915d91a9c71e 0
2024/10/09 09:04:52:356 CEST [DEBUG] MainClientExec - Connection can be kept alive indefinitely

@saper
Copy link
Author

saper commented Oct 9, 2024

On some other gateway, where I don't have this issue, I am getting the following output (for a different app of course):

[
  {
    "id": "a95415d9-9011-4faf-a23d-c3dfd580e01b",
    "userId": "fb118d1f-dae4-4863-a3c8-afd4a5685889",
    "permission": "manage",
    "createdBy": "ebeb67ee-6651-4210-98d5-83e32f25e7f0",
    "createdOn": 1680346438281
  }
]

@saper
Copy link
Author

saper commented Oct 9, 2024

From what I can see in the user interface of the gateway, I seem to be able to manage the application.

Both gateways (one returning "" and the other one returning "manage") run 7.7.20240228 according to their GET /api/portal/v1.4/config output.

@rathnapandi
Copy link
Member

The CLI code is not accepting empty string

Find below the code.

public enum SharePermission {
view,
manage
}

Looks like an environment issue / product issue. Can you raise a support ticket and confirm empty string is a possible value?

@saper
Copy link
Author

saper commented Oct 9, 2024

Asked my colleagues to contact the support. I have also figured out that not all apps are affected. Only some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants