apim-cli icon indicating copy to clipboard operation
apim-cli copied to clipboard

APIM-cli import breaks feAPIs with basic auth w/out password

Open emmanuel-galindo opened this issue 1 year ago • 2 comments

APIM-CLI version

1.14.2

API-Management version

7.7.3

Bug description

For a feAPI that has an outbound backend servier with BASIC auth, and only username defined and password is empty, "apim api get" retrieves: " [...] "authenticationProfiles" : [ { "name" : "_default", "isDefault" : true, "parameters" : { "username" : "user", "id" : 0 }, [...]" Doing an import with this, breaks the feAPI and user gets 500. Exception in logs reads: " [...] nested fault: no password specified java.lang.NullPointerException: no password specified at com.vordel.dwe.http.ClientTransaction.basicAuthString(Native Method) at com.vordel.circuit.net.BasicAuthNConnectionHandler$BasicState.getAuthToken(BasicAuthNConnectionHandler.java:152) at com.vordel.circuit.net.BasicAuthNConnectionHandler$BasicState.expectContinue(BasicAuthNConnectionHandler.java:191) [...]"

When setting this basic (user with no password) via API Manager UI, the PUT request body reads as: " [...] "authenticationProfiles": [ { "name": "_default", "isDefault": true, "parameters": { "username": "username", "id": 0, "password": "" }, "type": "http_basic" } [...]"

Steps to reproduce

No response

Relevant log output

No response

emmanuel-galindo avatar Mar 13 '24 20:03 emmanuel-galindo

@rathnapandi this is fixed in 1.14.4 right?

emmanuel-galindo avatar Apr 24 '24 17:04 emmanuel-galindo

Hi @emmanuel-galindo, Can you test it with latest relelase?

rathnapandi avatar Jul 15 '24 05:07 rathnapandi