I'm implementing a client per basex api shown here: https://docs.basex.org/wiki/Server_Protocol#Authentication
I'm working on digest auth and I can get back the realm and timestamp. I'm getting an access denied however when I send the username and token. My questions are:
1) What tips are there for debugging authentication implementation? I've set logs.debug to true in .basex and and tail them. I can see access denied but there's no info to help me debug. I'd like to at least see what the server is receiving. Any way to do that? BTW, my token creation is correct per the example in the docs.
2) It's taking a long time, 60s, for the test to run. Any way to speed that up?
Any information on the platform, programming language and the way in which the socket is opened would be helpfull😉
Ben
Erik Peterson ep@ardec.com schreef op 26 oktober 2022 00:42:41 CEST:
I'm implementing a client per basex api shown here: https://docs.basex.org/wiki/Server_Protocol#Authentication
I'm working on digest auth and I can get back the realm and timestamp. I'm getting an access denied however when I send the username and token. My questions are:
- What tips are there for debugging authentication implementation? I've
set logs.debug to true in .basex and and tail them. I can see access denied but there's no info to help me debug. I'd like to at least see what the server is receiving. Any way to do that? BTW, my token creation is correct per the example in the docs.
- It's taking a long time, 60s, for the test to run. Any way to speed that
up?
Hi Erik,
I'm working on digest auth and I can get back the realm and timestamp. I'm getting an access denied however when I send the username and token.
If you say “access denied”, does it mean you’re getting the 01 error code, as mentioned in the documentation [1]? And I assume the token is the hash value?
- What tips are there for debugging authentication implementation?
You could compare your implementation with e.g. the Java implementation [2].
- It's taking a long time, 60s, for the test to run. Any way to speed that up?
If a client request is rejected by the server, subsequent requests of the same client will be delayed. I guess that’s what you’ve been observing in your tests. You can restart the server to get rid of the delays.
Feel free to give us more information on the programming language you are working on.
Best, Christian
[1] https://github.com/BaseXdb/basex/blob/9/basex-examples/src/main/java/org/bas... [2] https://docs.basex.org/wiki/Server_Protocol#Digest
basex-talk@mailman.uni-konstanz.de