08-11-2016 10:10 AM
I need to implement JWT authentication with labview, how can it be done?
Solved! Go to Solution.
08-12-2016
11:15 AM
- last edited on
05-21-2024
03:20 PM
by
Content Cleaner
I guess you can try to play with this procedure.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LgPSAU&l=en-US
Any specific reason you want to use JSON?
08-14-2016 12:02 AM
My Labview applivation need to get data from another Oracle based application (Not Labview).
The data is available in a web service with JWT authentication, I also need to deliver data in the same way (web service with JWT).
I didn't find any labview based tool or (activeX, .net) tool I can use for encryption decryption JWT.
08-15-2016
03:26 PM
- last edited on
05-21-2024
03:21 PM
by
Content Cleaner
You will have to use the Import Web Service Wizard for authentication.
https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/platform/webservice/main-panel/main...
08-18-2016
01:28 PM
- last edited on
05-21-2024
03:23 PM
by
Content Cleaner
I am not aware of an existing JWT library for LabVIEW. You can see from the JWT site that to creating and parsing JWT requires:
JSON encoder / decoder
base64 encode / decode
and a signature / encryption method (commonly HMACSHA256 built this depends on the Oracle application)
JSON encoding and decoding is available since LabVIEW 2013: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/menus/categories/programming/string/flatte...
The other two are not available from NI, but have implementations in the LabVIEW community:
Base64:
https://forums.ni.com/t5/Example-Code/Fast-Base64-Encoder-Decoder-using-LabVIEW/ta-p/3503281
Signature:
https://lavag.org/files/file/198-encryption/
https://forums.ni.com/t5/Example-Code/Cryptography/ta-p/3494085
So unfortunately JWT support is not provided by default, but all the pieces needed to implement it should be there.
08-28-2016 06:53 AM
Thank you for the detailed answer, It seems like this is the best way to implement it.
Dor
09-01-2016 04:30 PM
I think JKI JSON is best fit for JSON serialization and deserialization needs with web services.
09-01-2016 04:38 PM
Hi Tomi,
Just to clarify we were discussing JSON Web Tokens which is used as a component of some authentication / authorization systems.
My understanding is the JKI JSON package just handles JSON parsing. It does not implement JWT / RFC 7519 correct?
If that's the case the JKI JSON package could be used for the JSON parsing, but there were more components being discussed in this thread.
09-01-2016 11:13 PM
Milan, sorry for confusion. I was proposing using JKI JSON as part of the toolchain in creation of JWT implementation for LabVIEW. LabVIEW native JSON is not very useful in libraries as it is strongly typed and usually you don't know the type of the data at edit time when writing general purpose libraries (such as JWT library).
02-28-2019 05:36 AM - edited 02-28-2019 05:37 AM
Hi dor-s!
How did you solve the signature issue?
Did you use HMACSHA256 encryption method or RSA Signature with SHA-256 encryption method?
HMACSHA256 is easy to do with the libraries in https://lavag.org/files/file/198-encryption/ but I'm having problems with RSA Signature with SHA-256. Is there any library or VI for this?
Thanks in advance