Author Message
MajGab8852
Joined: Feb 22, 2017
Messages: 16
Offline
I'm trying to get the Avaya Aura Web Gateway sample app (devclient.war) to work, but it seems to be broken. We have AAWG 3.8.1 installed and configured in a 2 server HA, it is able to connect to SMGR and AMS as well. I would like to test the token based authentication, because I'd like to implement the same in our own application. I'm opening the devclient webpage like so:

https://<aawg-ha-fqdn>:8443/devclient/testapp/index.html?calledNumber=456&displayname=SampleUser123

Based on the TestToolCheatSheet.pdf linked in the devclient website itself, these parameters should cause token authentication, and that itself is working, the website calls the getEncryptedToken endpoint to get a token. The website is able to successfully discover the available services as well. However, when I try to activate the calls service, the next HTTP call fails with error "401 Unauthorized". Based on the network tab of Chrome, I can see that in case of the successful discovery call, the HTTP Authorization header is set to "ESGToken xxx" where xxx is the token value. This Authorization header is missing in case of the calls service activation. I added it to the JavaScript source, and now it's a different error: "404 Not Found". I checked the logs on both AAWG servers, and one of the servers compains it is not able to find the user, the other says user id is invalid.

Server 1 logs:


FINE 17 Dec 2020 21:06:55,011 http-appr-8451-exec-10 com.avaya.csa.services - (ClientService.java:461) getClientInstance: clientId[372d8144-b4e7-494d-bbea-185ca56921aa]
INFO 17 Dec 2020 21:06:55,011 http-appr-8451-exec-10 com.avaya.csa.provider - (ServiceExceptionMapper.java:92) Sending error response 404 : Client does not exist. [CLIENT_NOT_FOUND(4040008)]


Server 2 logs:


FINE 17 Dec 2020 21:06:50,392 http-appr-8451-exec-6 com.avaya.csa.services - (ClientService.java:461) getClientInstance: clientId[372d8144-b4e7-494d-bbea-185ca56921aa]
ERROR 17 Dec 2020 21:06:50,392 http-appr-8451-exec-6 com.avaya.csa.provider - (ServiceExceptionMapper.java:92) Sending error response 404 : Invalid UserId '2176158180125741' [NOT_VALID_USER(4040003)]


The original request was routed to Server 2 and user was created there, and even initially the same user query (getClientInstance) also worked:


FINE 17 Dec 2020 21:06:41,849 http-appr-8451-exec-7 com.avaya.csa.services - (ClientService.java:203) createClient: userId[8107007035081083] userType[GUEST] clientId[] userDisplayName[SampleUser123] maxInactiveInterval[1800]
FINE 17 Dec 2020 21:06:41,849 http-appr-8451-exec-7 com.avaya.csa.services - (ClientService.java:501) setExpiration clientId[372d8144-b4e7-494d-bbea-185ca56921aa] set to 2020-12-17T21:36:41.849+04:00
FINE 17 Dec 2020 21:06:41,849 http-appr-8451-exec-7 com.avaya.csa.services - (ClientService.java:250) createClient clientInstance [userId=8107007035081083, userType=GUEST, timestamp=1608226601849, maxInactiveInterval=1800, contact=456, notificationServiceReferences=null]
FINE 17 Dec 2020 21:06:41,849 http-appr-8451-exec-7 com.avaya.csa.services - (ClientService.java:461) getClientInstance: clientId[372d8144-b4e7-494d-bbea-185ca56921aa]
FINE 17 Dec 2020 21:06:42,098 Resource worker-16 com.avaya.csa.notification.bridge.telephony - (TelephonySubscriptionValidationCallback.java:39) validateSubscription: user[8107007035081083] resource[https://<aawg-ha-fqdn>:443/csa/bsid/372d8144-b4e7-494d-bbea-185ca56921aa/resources/tenants/999/users/self/clients/372d8144-b4e7-494d-bbea-185ca56921aa/calls]


So I'm assuming it wasn't replicated to Server 1, which is strange in itself. But I'm not sure why Server 2 says invalid user id for every further getClientInstance request, I'm not even sure where the numbers in the error messages come from, for the same client id the number in the error message is always different.
CraigJohnson5
Joined: Oct 24, 2013
Messages: 413
Offline
Please open a Technical Support ticket, and we can discuss your DevConnect support options for this issue.
Go to:   
Mobile view