Issuer ID Android Setup

Hi all,
we are trying to setup a PoC and we finished installing the cert-issuer and cert-viewer both working on the BTC testnet.
Two question we have in order to complete the PoC and propose the implementation to our University.
Firt is related to the Issuer ID link we see in the cert-vewer page which is pointing to a link ending with samples/2.0/issuer-testnet.json. The json returned need to be hosted by our university website I think but there is no guidance or tool to set it up?

Second question is related to the Andorid app already available in the play store how can we configure it with out cert-issuer PoC?

Thanks in advance for help and the great tool you are developing
Dario

Hi @crivelli,
About the issuer identification page, cert-tools has a utility to help with that. If the instructions in the cert-tools README aren’t sufficient, please let us know.

About the Android app, it is available now. Within the app, you select “add issuer” to add the issuer’s identification endpoint.

Again, let us know if this is unclear; it’s possible we need more documentation here.

Thanks,
Kim

Hi Kim,
thanks for the quick feeback
we recreated the json with the utility but it seems that we have problem with the POST request made by the android app,
in the log I see the error:
TypeError: insert_introduction() missing 1 required positional argument: ‘introduction’

the url we are using is pointing the the json created with the utility suggested and also being correctly being redirected to the introductionURL, once the POST req reach the cert-viewer url “/intro” in the log we see the this error

Are we missing something?

Thanks for you help
Dario

Hi @kim, we aren’t using mondo Db at that time but in order to start the cert-viewer we had to insert a fake url as it was mandatory even if not used and generated error otherwise, can that be part of the issue?

Hi @crivelli

can that be part of the issue?
yes, but we could give a much better error message there. Feel free to open a github issue.

You do need mongo running to insert the intros at this point. There are instructions in the cert-viewer README (let me know if you’re having a hard time finding or using them) to do this. Essentially, we provided a Dockerfile for this, so it should be straightforward, after you install docker anyway. If you prefer, you can run it without docker installed, i.e. just hitting mongodb directly.

Keep me posted.
Thanks,
Kim

Hi @kim ,

I tried to set up the whole with mongodb but I have to admit that Im not and expert, if possible can you give us a more step-by-step procedure to use the cert-viwer with mongodb?

BTW we installed mongodb restore the content from the seed folder and configured the file according:
mongodb_uri=mongodb://localhost:1212/test

Once we insert the url into the android app the following stack trace is visible into cert-viewer console

2017-11-08 16:52:20,033 - root - ERROR - Unhandled Exception: insert_introduction() missing 1 required positional argument: 'introduction’
Traceback (most recent call last):
File “/usr/lib/python3.4/site-packages/flask/app.py”, line 1612, in full_dispatch_request
rv = self.dispatch_request()
File “/usr/lib/python3.4/site-packages/flask/app.py”, line 1598, in dispatch_request
return self.view_functionsrule.endpoint
TypeError: insert_introduction() missing 1 required positional argument: ‘introduction’

thanks again for your help
Dario

Hi @kim
just to complete the mentioned error, using the "load_gfs.py -c conf_local.ini " command the certificates are loaded into mongodb and retrived correctly by the webapp, the only thing missing is the error when we click submit from the android app

Dario

Hi @kim,
this is a tcp dump of the request set by the app:

…H[;.POST /intro/ HTTP/1.1
Content-Type: application/json; charset=UTF-8
Content-Length: 66
Host: blockchain.ti-edu.ch
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/3.8.0

{“bitcoinAddress”:“1L99KTtNLu9DbCc2iLwv5xdKd8CKBiN6SJ”,“nonce”:""}

Hi @kim,
hope you’re doing fine,
sorry to bother you had you the time to look after our exception? we really would like to have a demo app android to show to the CIO

thaks
Dario

Hi Dario,
I apologize; I’m slammed with work and don’t have an ETA for debugging this.
Thanks,
Kim

Hi Dario,
I took a quick look, and I have some debugging tips. I have to apologize in advance that the introduction endpoint isn’t supported and so it’s possible it’s drifted quite a bit.

I’d recommend setting a breakpoint in the various insert_introduction endpoints in cert-viewer. From your info, it seems clear that it’s making into cert-viewer. However, I’m guessing there is an argument mismatch. If you step through it in a debugger, you should be able to pinpoint where it’s failing pretty quickly.

Thanks,
Kim

Hi, @kim
I followed your suggestion but I come to a point were I’m in trouble understating the introduction REST service exposed
If I look at the code in “introduction_store_bridge.py” it seams that the data the Android or IOS app is sending is never “parsed”.
I seed from a tcpdump that the data is send in form of only the btc address but in the flask app the function is not getting these:
the function insert_introduction(introduction) need to have and introduction as parameter but the same is not retrived I think
app.add_url_rule(’/intro/’, view_func=introduction_store_bridge.insert_introduction, methods=[‘POST’, ]) is not pasing the parameter to the function, can you confirm that call is correct?

ho is the part then that is parsing the send input for the intro endpoint?

Pls firgive me is something is wrong I’m not a expert in python I tried reverse engeneering the error

Thanks again for your help
Dario